|
Lines 100-109
Link Here
|
| 100 |
<div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div> |
100 |
<div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div> |
| 101 |
[% END %] |
101 |
[% END %] |
| 102 |
|
102 |
|
| 103 |
[% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] |
103 |
[% IF has_guarantor_flag && !Koha.Preference('OPACPrivacy') && ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') || Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) %] |
| 104 |
<fieldset class="rows" id="memberentry_privacy"> |
104 |
<fieldset class="rows" id="memberentry_privacy"> |
| 105 |
<legend id="privacy_legend">Privacy</legend> |
105 |
<legend id="privacy_legend">Privacy</legend> |
| 106 |
<ol> |
106 |
<ol> |
|
|
107 |
[% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] |
| 107 |
<li> |
108 |
<li> |
| 108 |
<label>Allow your guarantor to view your current checkouts?</label> |
109 |
<label>Allow your guarantor to view your current checkouts?</label> |
| 109 |
<select id="privacy_guarantor_checkouts"> |
110 |
<select id="privacy_guarantor_checkouts"> |
|
Lines 118-123
Link Here
|
| 118 |
<a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a> |
119 |
<a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a> |
| 119 |
<span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span> |
120 |
<span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span> |
| 120 |
</span> |
121 |
</span> |
|
|
122 |
</li> |
| 123 |
[% END %] |
| 124 |
|
| 125 |
[% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %] |
| 126 |
<li> |
| 127 |
<label>Allow your guarantor to view your current fines?</label> |
| 128 |
<select id="privacy_guarantor_fines"> |
| 129 |
<option value="0">No</option> |
| 130 |
[% IF borrower.privacy_guarantor_fines %] |
| 131 |
<option value="1" selected="selected">Yes</option> |
| 132 |
[% ELSE %] |
| 133 |
<option value="1">Yes</option> |
| 134 |
[% END %] |
| 135 |
</select> |
| 136 |
<span class="hint"> |
| 137 |
<a id="update_privacy_guarantor_fines" href="#" class="btn">Update</a> |
| 138 |
<span id="update_privacy_guarantor_fines_message" class="alert" style="display:none"></span> |
| 139 |
</span> |
| 140 |
</li> |
| 141 |
[% END %] |
| 142 |
|
| 143 |
<li> |
| 121 |
<span class="hint"> |
144 |
<span class="hint"> |
| 122 |
Guaranteed by |
145 |
Guaranteed by |
| 123 |
[% FOREACH gr IN patron.guarantor_relationships %] |
146 |
[% FOREACH gr IN patron.guarantor_relationships %] |
|
Lines 1019-1038
Link Here
|
| 1019 |
} |
1042 |
} |
| 1020 |
}); |
1043 |
}); |
| 1021 |
|
1044 |
|
| 1022 |
[% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] |
1045 |
[% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %] |
| 1023 |
$('#update_privacy_guarantor_checkouts').click( function() { |
1046 |
|
| 1024 |
$.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json') |
1047 |
[% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] |
| 1025 |
.done(function( data ) { |
1048 |
$('#update_privacy_guarantor_checkouts').click( function() { |
| 1026 |
var message; |
1049 |
$.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json') |
| 1027 |
if ( data.success ) { |
1050 |
.done(function( data ) { |
| 1028 |
message = _("Your setting has been updated!"); |
1051 |
var message; |
| 1029 |
} else { |
1052 |
if ( data.success ) { |
| 1030 |
message = _("Unable to update your setting!"); |
1053 |
message = _("Your setting has been updated!"); |
| 1031 |
} |
1054 |
} else { |
| 1032 |
|
1055 |
message = _("Unable to update your setting!"); |
| 1033 |
$('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); |
1056 |
} |
| 1034 |
}); |
1057 |
|
| 1035 |
}); |
1058 |
$('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); |
|
|
1059 |
}); |
| 1060 |
}); |
| 1061 |
[% END %] |
| 1062 |
|
| 1063 |
[% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %] |
| 1064 |
$('#update_privacy_guarantor_fines').click( function() { |
| 1065 |
$.post( "/cgi-bin/koha/svc/patron/show_fines_to_relatives", { privacy_guarantor_fines: $('#privacy_guarantor_fines').val() }, null, 'json') |
| 1066 |
.done(function( data ) { |
| 1067 |
var message; |
| 1068 |
if ( data.success ) { |
| 1069 |
message = _("Your setting has been updated!"); |
| 1070 |
} else { |
| 1071 |
message = _("Unable to update your setting!"); |
| 1072 |
} |
| 1073 |
|
| 1074 |
$('#update_privacy_guarantor_fines_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); |
| 1075 |
}); |
| 1076 |
}); |
| 1077 |
[% END %] |
| 1036 |
[% END %] |
1078 |
[% END %] |
| 1037 |
|
1079 |
|
| 1038 |
$(".patron-attributes").on( 'click', '.clear-attribute', function() { |
1080 |
$(".patron-attributes").on( 'click', '.clear-attribute', function() { |