Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-22470

Action Bar "Submit" tries to validate disabled fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 15.0.17.32
    • Fix Version/s: 15.0.17.33
    • Component/s: FreePBX Framework
    • Labels:
      None
    • ToDo:

      Description

      Action bar click event function ins script.legacy.js can call warnInvalid() for disabled fields if an enabled field is also invalid.

      The click event function checks for invaild fields using html's checkValidity() function. 

      checkValidity iself ignores disabled fields, but a disabled field can still have an invalid status when checked individually. The loop used if after failing checkValidity checks each field's validity status without regard to the disabled property.

      If all enabled fields are valid, checkValidity succeeds and all proceeds as expected.

      The problem manifests if an enabled field is invalid and a disabled field is also invalid.  The result is checkValidity fails because of the enabled field, but the loop may find and try to warn/give focus to the disabled field.

      Proposed fix is simple:  add a field.willValidate check to the loop code and ignore anything checkValidity ignores.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jerrm jerrm
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.