Lines 1083-1134
Link Here
|
1083 |
[% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %] |
1083 |
[% IF ( step_5 ) %][% IF ( EnhancedMessagingPreferences ) %] |
1084 |
<fieldset class="rows" id="memberentry_messaging_prefs"> |
1084 |
<fieldset class="rows" id="memberentry_messaging_prefs"> |
1085 |
<legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend> |
1085 |
<legend id="patron_messaging_prefs_lgd">Patron messaging preferences</legend> |
1086 |
[% IF ( opadd ) %] |
1086 |
<div id="messaging_prefs_loading" class="form-message" style="display:none"> |
1087 |
<!-- handle changing prefs if creating new patron and changing |
1087 |
<img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading new messaging defaults |
1088 |
the patron category |
1088 |
</div> |
1089 |
--> |
|
|
1090 |
<script type="text/javascript">//<![CDATA[ |
1091 |
$(document).ready(function(){ |
1092 |
var message_prefs_dirty = false; |
1093 |
$('#memberentry_messaging_prefs > *').change(function() { |
1094 |
message_prefs_dirty = true; |
1095 |
}); |
1096 |
$('#categorycode_entry').change(function() { |
1097 |
var categorycode = $(this).val(); |
1098 |
if (message_prefs_dirty) { |
1099 |
if (!confirm(_("Change messaging preferences to default for this category?"))) { |
1100 |
return; |
1101 |
} |
1102 |
} |
1103 |
$.getJSON('/cgi-bin/koha/members/default_messageprefs.pl?categorycode=' + categorycode, |
1104 |
function(data) { |
1105 |
$.each(data.messaging_preferences, function(i, item) { |
1106 |
var attrid = item.message_attribute_id; |
1107 |
var transports = ['email', 'rss', 'sms']; |
1108 |
$.each(transports, function(j, transport) { |
1109 |
if (item['transports_' + transport] == 1) { |
1110 |
$('#' + transport + attrid).prop('checked', true); |
1111 |
} else { |
1112 |
$('#' + transport + attrid).prop('checked', false); |
1113 |
} |
1114 |
}); |
1115 |
if (item.digest && item.digest != ' ') { |
1116 |
$('#digest' + attrid).prop('checked', true); |
1117 |
} else { |
1118 |
$('#digest' + attrid).prop('checked', false); |
1119 |
} |
1120 |
if (item.takes_days == '1') { |
1121 |
$('[name=' + attrid + '-DAYS]').val('' + item.days_in_advance); |
1122 |
} |
1123 |
}); |
1124 |
message_prefs_dirty = false; |
1125 |
} |
1126 |
); |
1127 |
}); |
1128 |
}); |
1129 |
//]]> |
1130 |
</script> |
1131 |
[% END %] |
1132 |
<input type="hidden" name="setting_messaging_prefs" value="1" /> |
1089 |
<input type="hidden" name="setting_messaging_prefs" value="1" /> |
1133 |
[% INCLUDE 'messaging-preference-form.inc' %] |
1090 |
[% INCLUDE 'messaging-preference-form.inc' %] |
1134 |
[% IF ( SMSSendDriver ) %] |
1091 |
[% IF ( SMSSendDriver ) %] |
Lines 1299-1304
Link Here
|
1299 |
var LABEL_CHANGE = _("Change"); |
1256 |
var LABEL_CHANGE = _("Change"); |
1300 |
var LABEL_SET_TO_PATRON = _("Set to patron"); |
1257 |
var LABEL_SET_TO_PATRON = _("Set to patron"); |
1301 |
var LABEL_AGE = _("Age"); |
1258 |
var LABEL_AGE = _("Age"); |
|
|
1259 |
var MSG_MESSAGING_DFEAULTS = _("Change messaging preferences to default for this category?"); |
1302 |
|
1260 |
|
1303 |
[% IF quickadd && opadd && !check_member %] |
1261 |
[% IF quickadd && opadd && !check_member %] |
1304 |
$(document).ready(function () { |
1262 |
$(document).ready(function () { |