Page MenuHomeIn-Portal Phabricator
  • Changed Files
  • branches/5.2.x/core/admin_templates/js/forms.js

INP-1778 Auto-focus correct form control on error
ClosedPublic

Authored by erik on Jan 17 2020, 8:06 AM.

Details

Summary

Fixed js for proper error field focusing.

Test Plan

Preparations

In the core\units\users\users_event_handler.php replace line

`$form_fields['Status']['default'] = STATUS_ACTIVE;

with:

$form_fields['Status']['default'] = null;
$form_fields['Status']['required'] = 1;

Testing

  1. Go to User Management & Users section
  2. Press Add toolbar button
  3. Enter required Password, Re-enter Password and E-mail fields
  4. Press Save toolbar button
  5. Confirm that form shows error and is scrolled to the Status field
  6. Choose some value for Status field
  7. Input abc in the Modified date field
  8. Press Save toolbar button
  9. Confirm that form shows error and is scrolled to the Modified field

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

erik created this revision.Jan 17 2020, 8:06 AM
erik requested review of this revision.Jan 17 2020, 8:06 AM
erik edited the test plan for this revision. (Show Details)Jan 17 2020, 8:09 AM
alex accepted this revision.Jan 21 2020, 9:23 AM
This revision is now accepted and ready to land.Jan 21 2020, 9:23 AM
This revision was automatically updated to reflect the committed changes.