From 9912e384043df1224a5a1735a8f3fec3caddd8fc Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 6 Feb 2013 08:02:18 -0800 Subject: [PATCH] Bug 9556: fix setting messaging prefs when changing patron category As a result of accumulated changes to field names returned by the members/default_messageprefs.pl service, the JavaScript to change the patron messaging preferences to the category default when changing a patron's category in the patron editor stopped working. To test: [1] Turn on the EnhancedMessagingPreferences feature. [2] Set message preference defaults for at least two patron categories. [3] Before applying the patch, create a new patron record using one of the categories you set prefs for, then change the category, then change it back again. You will see that numeric settings like the number of days for advanced notices will change, but checkboxes won't change. [4] Apply the patch, then create a new patron record and try changing the patron category. You will see that all of the preferences will get updated to the category default each time you change the category. Signed-off-by: Galen Charlton Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov --- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 5ceb36502c..edabba0c1f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1404,8 +1404,8 @@ var attrid = item.message_attribute_id; var transports = ['email', 'rss', 'sms']; $.each(transports, function(j, transport) { - if (item['transport-' + transport] != ' ') { - $('#' + transport + attrid).attr('checked', item['transport-' + transport]); + if (item['transports_' + transport] == 1) { + $('#' + transport + attrid).attr('checked', 'checked'); } else { $('#' + transport + attrid).removeAttr('checked'); } -- 2.39.5