Lines 17-22
$(document).ready(function() {
Link Here
|
17 |
[% END %] |
17 |
[% END %] |
18 |
}); |
18 |
}); |
19 |
|
19 |
|
|
|
20 |
$(document).ready(function() { |
21 |
|
22 |
var toggle_quick_add = $(".toggle_quick_add"); |
23 |
$(toggle_quick_add).click(function(e){ |
24 |
toggle_quick_add.toggle(); |
25 |
e.preventDefault(); |
26 |
var toggle_to = ''; |
27 |
var toggle_from = ''; |
28 |
if( $("#entryform:visible").length ) { |
29 |
toggle_to = "#quick_add_form label"; |
30 |
toggle_from = "#entryform label"; |
31 |
} else { |
32 |
toggle_to="#entryform label"; |
33 |
toggle_from = "#quick_add_form label"; |
34 |
} |
35 |
$(toggle_from).each(function() { |
36 |
var input_label = $(this).attr('for'); |
37 |
if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) { |
38 |
$(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); |
39 |
return; |
40 |
} |
41 |
if( $(this).next().val() != '' ) { $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );} |
42 |
}); |
43 |
|
44 |
$(".toggler").toggle(); |
45 |
}); |
46 |
|
47 |
$(".save_quick_add").click(function(){ |
48 |
$("#quick_add_form").validate(); |
49 |
if( $("#quick_add_form").valid()){ |
50 |
$('.toggle_quick_add').click(); |
51 |
$('#entryform button[name="save"]').click(); |
52 |
} |
53 |
else {return false;} |
54 |
}); |
55 |
|
56 |
}); |
57 |
|
20 |
var MSG_SEPARATOR = _("Separator must be / in field %s"); |
58 |
var MSG_SEPARATOR = _("Separator must be / in field %s"); |
21 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field %s"); |
59 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field %s"); |
22 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s"); |
60 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s"); |
Lines 43-54
$(document).ready(function() {
Link Here
|
43 |
[% INCLUDE 'header.inc' %] |
81 |
[% INCLUDE 'header.inc' %] |
44 |
[% INCLUDE 'patron-search.inc' %] |
82 |
[% INCLUDE 'patron-search.inc' %] |
45 |
|
83 |
|
46 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › |
84 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › |
47 |
[% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %] |
85 |
[% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %] |
48 |
<strong>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron ([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</strong> |
86 |
<strong>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron ([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</strong> |
49 |
</div> |
87 |
</div> |
50 |
[% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %] |
88 |
[% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %] |
51 |
|
89 |
|
52 |
<div id="bd"> |
90 |
<div id="bd"> |
53 |
<div id="yui-main"> |
91 |
<div id="yui-main"> |
54 |
<div class="yui-b"> |
92 |
<div class="yui-b"> |
Lines 69-75
$(document).ready(function() {
Link Here
|
69 |
|
107 |
|
70 |
[% UNLESS ( no_add ) %] |
108 |
[% UNLESS ( no_add ) %] |
71 |
<h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</h1> |
109 |
<h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</h1> |
72 |
|
110 |
|
|
|
111 |
[% IF quickadd && opadd && !check_member %] |
112 |
<a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a> |
113 |
<a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a> |
114 |
[% END %] |
115 |
|
73 |
[% IF ( check_member ) %] |
116 |
[% IF ( check_member ) %] |
74 |
<div class="dialog alert"> |
117 |
<div class="dialog alert"> |
75 |
<h3>Duplicate patron record?</h3> |
118 |
<h3>Duplicate patron record?</h3> |
Lines 102-113
$(document).ready(function() {
Link Here
|
102 |
<li id="ERROR_cardnumber">Cardnumber length is incorrect.</li> |
145 |
<li id="ERROR_cardnumber">Cardnumber length is incorrect.</li> |
103 |
[% END %] |
146 |
[% END %] |
104 |
[% IF ( ERROR_age_limitations ) %] |
147 |
[% IF ( ERROR_age_limitations ) %] |
105 |
<li id="ERROR_age_limitations">Patron's age is incorrect for their category. |
148 |
<li id="ERROR_age_limitations">Patron's age is incorrect for their category. |
106 |
Ages allowed are [% age_low %]-[% age_high %].</li> |
149 |
Ages allowed are [% age_low %]-[% age_high %].</li> |
107 |
[% END %] |
150 |
[% END %] |
108 |
[% IF ( ERROR_branch ) %] |
151 |
[% IF ( ERROR_branch ) %] |
109 |
<li id="ERROR_branch">Library is invalid.</li> |
152 |
<li id="ERROR_branch">Library is invalid.</li> |
110 |
[% END %] |
153 |
[% END %] |
111 |
[% IF ( ERROR_dateofbirth ) %] |
154 |
[% IF ( ERROR_dateofbirth ) %] |
112 |
<li id="ERROR_dateofbirth">Date of birth is invalid.</li> |
155 |
<li id="ERROR_dateofbirth">Date of birth is invalid.</li> |
113 |
[% END %] |
156 |
[% END %] |
Lines 140-146
$(document).ready(function() {
Link Here
|
140 |
[% END %] |
183 |
[% END %] |
141 |
|
184 |
|
142 |
|
185 |
|
143 |
[% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off"> |
186 |
[% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" > |
144 |
<input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %] |
187 |
<input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %] |
145 |
<!-- field always hidden in different form (1,2,3) --> |
188 |
<!-- field always hidden in different form (1,2,3) --> |
146 |
<input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" /> |
189 |
<input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" /> |
Lines 398-404
$(document).ready(function() {
Link Here
|
398 |
<legend id="contact_lgd">Contact</legend><ol> |
441 |
<legend id="contact_lgd">Contact</legend><ol> |
399 |
[% UNLESS nophone %] |
442 |
[% UNLESS nophone %] |
400 |
<li> |
443 |
<li> |
401 |
[% IF ( mandatoryphone ) %] |
444 |
[% IF ( mandatoryphone ) %] |
402 |
<label for="phone" class="required"> |
445 |
<label for="phone" class="required"> |
403 |
[% ELSE %] |
446 |
[% ELSE %] |
404 |
<label for="phone"> |
447 |
<label for="phone"> |
Lines 448-454
$(document).ready(function() {
Link Here
|
448 |
[% END %] |
491 |
[% END %] |
449 |
[% UNLESS noemailpro %] |
492 |
[% UNLESS noemailpro %] |
450 |
<li> |
493 |
<li> |
451 |
[% IF ( mandatoryemailpro ) %] |
494 |
[% IF ( mandatoryemailpro ) %] |
452 |
<label for="emailpro" class="required"> |
495 |
<label for="emailpro" class="required"> |
453 |
[% ELSE %] |
496 |
[% ELSE %] |
454 |
<label for="emailpro"> |
497 |
<label for="emailpro"> |
Lines 661-667
$(document).ready(function() {
Link Here
|
661 |
<label for="opacnote" class="required"> |
704 |
<label for="opacnote" class="required"> |
662 |
[% ELSE %] |
705 |
[% ELSE %] |
663 |
<label for="opacnote"> |
706 |
<label for="opacnote"> |
664 |
[% END %] |
707 |
[% END %] |
665 |
OPAC note: </label> |
708 |
OPAC note: </label> |
666 |
<textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea> |
709 |
<textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea> |
667 |
<div class="hint">This message appears on this patron's user page in the OPAC</div> |
710 |
<div class="hint">This message appears on this patron's user page in the OPAC</div> |
Lines 670-676
$(document).ready(function() {
Link Here
|
670 |
[% END %] |
713 |
[% END %] |
671 |
[% UNLESS noborrowernotes %] |
714 |
[% UNLESS noborrowernotes %] |
672 |
<li> |
715 |
<li> |
673 |
[% IF ( mandatoryborrowernotes ) %] |
716 |
[% IF ( mandatoryborrowernotes ) %] |
674 |
<label for="borrowernotes" class="required"> |
717 |
<label for="borrowernotes" class="required"> |
675 |
[% ELSE %] |
718 |
[% ELSE %] |
676 |
<label for="borrowernotes"> |
719 |
<label for="borrowernotes"> |
Lines 1017-1023
$(document).ready(function() {
Link Here
|
1017 |
<button type="submit" name="save" onclick="return check_form_borrowers();"> |
1060 |
<button type="submit" name="save" onclick="return check_form_borrowers();"> |
1018 |
<i class="fa fa-save"></i> Save |
1061 |
<i class="fa fa-save"></i> Save |
1019 |
</button> |
1062 |
</button> |
1020 |
[% IF ( opadd ) %] |
1063 |
[% IF ( opadd ) %] |
1021 |
<a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a> |
1064 |
<a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a> |
1022 |
[% ELSE %] |
1065 |
[% ELSE %] |
1023 |
<a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a> |
1066 |
<a class="cancel" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Cancel</a> |
Lines 1025-1032
$(document).ready(function() {
Link Here
|
1025 |
</fieldset> |
1068 |
</fieldset> |
1026 |
[% END %] |
1069 |
[% END %] |
1027 |
</fieldset> |
1070 |
</fieldset> |
|
|
1071 |
|
1028 |
</form> |
1072 |
</form> |
1029 |
|
1073 |
|
|
|
1074 |
[% IF quickadd && opadd && !check_member %] |
1075 |
<form id="quick_add_form" class="toggler"> |
1076 |
<fieldset class="rows quick_add"><legend>Quick add</legend> |
1077 |
<ol id="quick_add_list"> |
1078 |
</ol> |
1079 |
</fieldset> |
1080 |
|
1081 |
<fieldset class="action"> |
1082 |
<input type="button" class="save_quick_add" value="Save" /> |
1083 |
<a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a> |
1084 |
</fieldset> |
1085 |
|
1086 |
</form> |
1087 |
<script> |
1088 |
$(document).ready(function () { |
1089 |
$("#entryform").hide(); |
1090 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
1091 |
var qaddfields = "[% FOREACH field IN q_add_f.unique %][% field %] [% END %]"; |
1092 |
$("#entryform label").each(function () { |
1093 |
var input_label = $(this).attr('for'); |
1094 |
if ( input_label == 'sex-female' ) { input_label='sex'; } |
1095 |
else if ( input_label == 'btitle' ) { input_label='title'; } |
1096 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
1097 |
$(this).parent().clone().appendTo("#quick_add_list"); |
1098 |
if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); |
1099 |
} |
1100 |
}); |
1101 |
$("#quick_add_form").show(); |
1102 |
}); |
1103 |
</script> |
1104 |
[% END %] |
1030 |
</div> |
1105 |
</div> |
1031 |
</div> |
1106 |
</div> |
1032 |
|
1107 |
|