Add patron shows under login section a html script tag in memberentry_messaging_prefs: / *').change(function() { message_prefs_dirty = true; }); $('#categorycode').change(function() { var categorycode = $(this).val(); if (message_prefs_dirty) { if (!confirm('Change messaging preferences to default for this category?')) { return; } } $.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode, function(data) { $.each(data.messaging_preferences, function(i, item) { 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]); } else { $('#' + transport + attrid).removeAttr('checked'); } }); if (item.digest && item.digest != ' ') { $('#digest' + attrid).attr('checked', item.digest); } else { $('#digest' + attrid).removeAttr('checked'); } if (item.takes_days == '1') { $('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance); } }); message_prefs_dirty = false; } ); }); }); //]]>
This appears with EnhancedMessagingPreferences set to Allow. The code is in koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt The JS code can be hidden with <!-- ... -->. The confirm message needs to be between " (double quotes), can't produce a situation to trigger it. Don't know if this code is used.
Created attachment 15104 [details] [review] Bug 9529 - Adding a patron shows javascript on screen under login section A typo in my patch for Bug 9265 (HTML5 switch) left an extra quotation mark in a <script> tag on the patron entry form, causing JavaScript code to be output as text instead of interpreted. This patch corrects it. To test, apply the patch, enable EnhancedMessagingPreferences, and load the patron entry form. You should see no JavaScript on screen around the 'Patron messaging preferences' fieldset.
Created attachment 15106 [details] [review] Bug 9529 - Adding a patron shows javascript on screen under login section A typo in my patch for Bug 9265 (HTML5 switch) left an extra quotation mark in a <script> tag on the patron entry form, causing JavaScript code to be output as text instead of interpreted. This patch corrects it. To test, apply the patch, enable EnhancedMessagingPreferences, and load the patron entry form. You should see no JavaScript on screen around the 'Patron messaging preferences' fieldset. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Created attachment 15130 [details] [review] Bug 9529 - Adding a patron shows javascript on screen under login section A typo in my patch for Bug 9265 (HTML5 switch) left an extra quotation mark in a <script> tag on the patron entry form, causing JavaScript code to be output as text instead of interpreted. This patch corrects it. To test, apply the patch, enable EnhancedMessagingPreferences, and load the patron entry form. You should see no JavaScript on screen around the 'Patron messaging preferences' fieldset. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch has been pushed to master.