Lines 99-105
Link Here
|
99 |
<div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div> |
99 |
<div class="alert">You typed in the wrong characters in the box before submitting. Please try again.</div> |
100 |
[% END %] |
100 |
[% END %] |
101 |
|
101 |
|
102 |
[% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] |
102 |
[% IF patron.guarantor_relationships |
|
|
103 |
&& !Koha.Preference('OPACPrivacy') |
104 |
&& ( Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') |
105 |
|| Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') ) |
106 |
%] |
103 |
<fieldset class="rows" id="memberentry_privacy"> |
107 |
<fieldset class="rows" id="memberentry_privacy"> |
104 |
<legend id="privacy_legend">Privacy</legend> |
108 |
<legend id="privacy_legend">Privacy</legend> |
105 |
<ol> |
109 |
<ol> |
Lines 117-122
Link Here
|
117 |
<a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a> |
121 |
<a id="update_privacy_guarantor_checkouts" href="#" class="btn">Update</a> |
118 |
<span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span> |
122 |
<span id="update_privacy_guarantor_checkouts_message" class="alert" style="display:none"></span> |
119 |
</span> |
123 |
</span> |
|
|
124 |
</li> |
125 |
|
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 |
|
142 |
<li> |
120 |
<span class="hint"> |
143 |
<span class="hint"> |
121 |
Guaranteed by |
144 |
Guaranteed by |
122 |
[% FOREACH gr IN patron.guarantor_relationships %] |
145 |
[% FOREACH gr IN patron.guarantor_relationships %] |
Lines 129-134
Link Here
|
129 |
</ol> |
152 |
</ol> |
130 |
</fieldset> |
153 |
</fieldset> |
131 |
[% END %] |
154 |
[% END %] |
|
|
155 |
|
132 |
[% IF ( extended_unique_id_failed_code ) %] |
156 |
[% IF ( extended_unique_id_failed_code ) %] |
133 |
<div class="alert" id="extended_unique_id_failed"><a href="#patron-attr-start-[% extended_unique_id_failed_code %]">[% extended_unique_id_failed_description _ ': ' %]</a> Value is already in use ([% extended_unique_id_failed_value %])</div> |
157 |
<div class="alert" id="extended_unique_id_failed"><a href="#patron-attr-start-[% extended_unique_id_failed_code %]">[% extended_unique_id_failed_description _ ': ' %]</a> Value is already in use ([% extended_unique_id_failed_value %])</div> |
134 |
[% END %] |
158 |
[% END %] |
Lines 1002-1021
Link Here
|
1002 |
} |
1026 |
} |
1003 |
}); |
1027 |
}); |
1004 |
|
1028 |
|
1005 |
[% IF borrower.guarantorid && !Koha.Preference('OPACPrivacy') && Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] |
1029 |
[% IF patron.guarantor_relationships && !Koha.Preference('OPACPrivacy') %] |
1006 |
$('#update_privacy_guarantor_checkouts').click( function() { |
1030 |
|
1007 |
$.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json') |
1031 |
[% IF Koha.Preference('AllowPatronToSetCheckoutsVisibilityForGuarantor') %] |
1008 |
.done(function( data ) { |
1032 |
$('#update_privacy_guarantor_checkouts').click( function() { |
1009 |
var message; |
1033 |
$.post( "/cgi-bin/koha/svc/patron/show_checkouts_to_relatives", { privacy_guarantor_checkouts: $('#privacy_guarantor_checkouts').val() }, null, 'json') |
1010 |
if ( data.success ) { |
1034 |
.done(function( data ) { |
1011 |
message = _("Your setting has been updated!"); |
1035 |
var message; |
1012 |
} else { |
1036 |
if ( data.success ) { |
1013 |
message = _("Unable to update your setting!"); |
1037 |
message = _("Your setting has been updated!"); |
1014 |
} |
1038 |
} else { |
1015 |
|
1039 |
message = _("Unable to update your setting!"); |
1016 |
$('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); |
1040 |
} |
1017 |
}); |
1041 |
|
1018 |
}); |
1042 |
$('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); |
|
|
1043 |
}); |
1044 |
}); |
1045 |
[% END %] |
1046 |
|
1047 |
[% IF Koha.Preference('AllowPatronToSetFinesVisibilityForGuarantor') %] |
1048 |
$('#update_privacy_guarantor_fines').click( function() { |
1049 |
$.post( "/cgi-bin/koha/svc/patron/show_fines_to_relatives", { privacy_guarantor_fines: $('#privacy_guarantor_fines').val() }, null, 'json') |
1050 |
.done(function( data ) { |
1051 |
var message; |
1052 |
if ( data.success ) { |
1053 |
message = _("Your setting has been updated!"); |
1054 |
} else { |
1055 |
message = _("Unable to update your setting!"); |
1056 |
} |
1057 |
|
1058 |
$('#update_privacy_guarantor_fines_message').fadeIn("slow").text( message ).delay( 5000 ).fadeOut("slow"); |
1059 |
}); |
1060 |
}); |
1061 |
[% END %] |
1019 |
[% END %] |
1062 |
[% END %] |
1020 |
|
1063 |
|
1021 |
$(".patron-attributes").on( 'click', '.clear-attribute', function() { |
1064 |
$(".patron-attributes").on( 'click', '.clear-attribute', function() { |