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