Bugzilla – Attachment 131067 Details for
Bug 30177
When changing patron categories of existing accounts it should not reset message prefs without warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30177: When editing an existing patron set message_prefs_dirty to true
Bug-30177-When-editing-an-existing-patron-set-mess.patch (text/plain), 1.90 KB, created by
Lucas Gass (lukeg)
on 2022-02-24 16:21:46 UTC
(
hide
)
Description:
Bug 30177: When editing an existing patron set message_prefs_dirty to true
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-02-24 16:21:46 UTC
Size:
1.90 KB
patch
obsolete
>From 5e40d52e668473f7862434770cffc3f203662345 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 24 Feb 2022 16:17:11 +0000 >Subject: [PATCH] Bug 30177: When editing an existing patron set > message_prefs_dirty to true > >1 - Define default messaging preferences for a patron category >2 - Go into an existing account and change the patron category to the one set in step 1. >3 - Confirm that the messaging prefs have been reset to that of the default patron category >4 - Apply patch >5 - Repeat Step 2, this time you should see a warning asking if you want to set messaging prefs to the category default >6 - Press OK and save. Confirm that the messaging prefs are now set to the default for that category >7 - Try it again with an existing account and press Cancel this time. Notice that there should be no change to the patron messaging prefs. >8 - Try making a new patron and switching the category, you should see no warning and the message prefs should be proberly set to the defaults of any category you choose. >--- > koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js b/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js >index 3babbbd1f2..4c95d9042b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js >@@ -6,6 +6,10 @@ $(document).ready(function(){ > message_prefs_dirty = true; > }); > >+ if ( window.location.href.indexOf("op=add") === -1 ) { >+ message_prefs_dirty = true; // unless op=add consider the message prefs dirty >+ } >+ > if( $("#messaging_prefs_loading").length ){ // This element only appears in the template if op=add > $('#categorycode_entry').change(function() { > var messaging_prefs_loading = $("#messaging_prefs_loading"); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30177
:
131067
|
131342
|
131417