Browse Source

fixed validation so empty titles cant be submitted

9.x-3.0
Paul Pound 2 weeks ago
parent
commit
f2a011a94a
  1. 4
      src/Form/RoblibIllLoanForm.php

4
src/Form/RoblibIllLoanForm.php

@ -76,6 +76,7 @@ class RoblibIllLoanForm extends FormBase
\Drupal::moduleHandler()->loadInclude('upei_roblib_ill', 'inc', 'includes/db');
upei_roblib_ill_log_request($payload, $err);
}
}
$trigger = $form_state->getTriggeringElement();
if ($trigger['#value'] != 'Lookup DOI' && empty($form_state->get('step'))) {
@ -86,7 +87,6 @@ class RoblibIllLoanForm extends FormBase
$form_state->setErrorByName('Title', t('Item Type is required.'));
}
}
}
}
/**
@ -531,4 +531,4 @@ Freedom of Information and Protection of Privacy Act and will be protected
return $form;
}
}
}

Loading…
Cancel
Save