Bug 21813: In-page JavaScript causes error on patron entry page
authorOwen Leonard <oleonard@myacpl.org>
Mon, 12 Nov 2018 17:35:25 +0000 (17:35 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 10 Jan 2019 13:52:23 +0000 (13:52 +0000)
commita6326b80c64e3dae593f1a1bc520adfb62c9758e
tree679a066d88dadd3660fbe837b5cefb4d89040cbe
parent8102f6dc70623786c3247e008a0601cfd234d1e6
Bug 21813: In-page JavaScript causes error on patron entry page

This patch removes a block of JavaScript from memberentrygen.tt which
was being included in the page before jQuery is loaded. This causes a
JavaScript error.

To test, apply the patch, regenerate CSS, and clear your browser cache
if necessary.

 - In Administration -> Patron categories, confirm that you have two
    patron categories with different default messaging preferences
    defined.
 - Go to Patrons -> New patron
   - Create a new patron using one of the categories with messaging
     preferences.
   - Confirm that when you switch the category selection to the other
     patron category, the patron messaging preference checkboxes are
     changed to the default for that category.
     - A "Loading" indicator should appear above the checkboxes to show
      that an operation is in process. It should disappear when new
      default prefs are loaded.
   - Manually change one or more patron messaging preference checkboxes.
   - Switch the patron category again and confirm that you are prompted
     to confirm resetting the preferences to the default for that
     category.
 - Perform the same set of tests when editing a patron.
   - Defaults should not be loaded during the edit process.
 - Confirm that there are no other JavaScript errors in the console.
 - Test again with EnhancedMessagingPreferences disabled.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3607fdfe7966b4db8cb69331f097278d09363fd2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js