Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14353

Fix formNavigate to work with multiple forms & ajax

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.5
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Sprint 1

      Description

      The formNavigate.js does not work reliably with the following:

      • forms with ajax-loaded content
      • popup forms
      • tabbed forms
      • multiple forms on the same page

      It also doesn't do a good job of tracking changes and often gives false-positive warnings.

      Steps to fix;

      • Migrate tpl include to a form class variable
      • Update core form renderer to add variable to markup
      • Add function to CRM.utils (Common.js) to detect form changes
      • Add global crmLoad event listener to store initial state of form elements
      • Add global onBeforeUnload handler to check for unsaved changes

      reference: http://dustinmartin.net/monitoring-a-form-for-changes-with-jquery/

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                colemanw Coleman Watts
                Reporter:
                colemanw Coleman Watts
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: