Lines 33-38
$(document).ready(function() {
Link Here
|
33 |
[% END %] |
33 |
[% END %] |
34 |
}); |
34 |
}); |
35 |
|
35 |
|
|
|
36 |
$(document).ready(function() { |
37 |
|
38 |
var toggle_quick_add = $(".toggle_quick_add"); |
39 |
$(toggle_quick_add).click(function(e){ |
40 |
toggle_quick_add.toggle(); |
41 |
e.preventDefault(); |
42 |
var toggle_to = ''; |
43 |
var toggle_from = ''; |
44 |
if( $("#entryform:visible").length ) { |
45 |
toggle_to = "#quick_add_form label"; |
46 |
toggle_from = "#entryform label"; |
47 |
} else { |
48 |
toggle_to="#entryform label"; |
49 |
toggle_from = "#quick_add_form label"; |
50 |
} |
51 |
$(toggle_from).each(function() { |
52 |
var input_label = $(this).attr('for'); |
53 |
if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) { |
54 |
$(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); |
55 |
return; |
56 |
} |
57 |
if( $(this).next().val() != '' ) { $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );} |
58 |
}); |
59 |
|
60 |
$(".toggler").toggle(); |
61 |
}); |
62 |
|
63 |
$(".save_quick_add").click(function(){ |
64 |
$("#quick_add_form").validate(); |
65 |
if( $("#quick_add_form").valid()){ |
66 |
$('.toggle_quick_add').click(); |
67 |
$('#entryform button[name="save"]').click(); |
68 |
} |
69 |
else {return false;} |
70 |
}); |
71 |
|
72 |
}); |
73 |
|
36 |
var MSG_SEPARATOR = _("Separator must be / in field %s"); |
74 |
var MSG_SEPARATOR = _("Separator must be / in field %s"); |
37 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field %s"); |
75 |
var MSG_INCORRECT_DAY = _("Invalid day entered in field %s"); |
38 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s"); |
76 |
var MSG_INCORRECT_MONTH = _("Invalid month entered in field %s"); |
Lines 59-70
$(document).ready(function() {
Link Here
|
59 |
[% INCLUDE 'header.inc' %] |
97 |
[% INCLUDE 'header.inc' %] |
60 |
[% INCLUDE 'patron-search.inc' %] |
98 |
[% INCLUDE 'patron-search.inc' %] |
61 |
|
99 |
|
62 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › |
100 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › |
63 |
[% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %] |
101 |
[% IF (firstname || surname ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]</a> ›[% END %] |
64 |
<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> |
102 |
<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> |
65 |
</div> |
103 |
</div> |
66 |
[% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %] |
104 |
[% IF ( opadd ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %] |
67 |
|
105 |
|
68 |
<div id="bd"> |
106 |
<div id="bd"> |
69 |
<div id="yui-main"> |
107 |
<div id="yui-main"> |
70 |
<div class="yui-b"> |
108 |
<div class="yui-b"> |
Lines 85-91
$(document).ready(function() {
Link Here
|
85 |
|
123 |
|
86 |
[% UNLESS ( no_add ) %] |
124 |
[% UNLESS ( no_add ) %] |
87 |
<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> |
125 |
<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> |
88 |
|
126 |
|
|
|
127 |
[% IF quickadd && opadd && !check_member %] |
128 |
<a href="#" class="toggle_quick_add"><i class="fa fa-plus-square"></i> Show full form</a> |
129 |
<a href="#" class="toggle_quick_add" style="display:none"><i class="fa fa-minus-square"></i> Show brief form</a> |
130 |
[% END %] |
131 |
|
89 |
[% IF ( check_member ) %] |
132 |
[% IF ( check_member ) %] |
90 |
<div class="dialog alert"> |
133 |
<div class="dialog alert"> |
91 |
<h3>Duplicate patron record?</h3> |
134 |
<h3>Duplicate patron record?</h3> |
Lines 118-129
$(document).ready(function() {
Link Here
|
118 |
<li id="ERROR_cardnumber">Cardnumber length is incorrect.</li> |
161 |
<li id="ERROR_cardnumber">Cardnumber length is incorrect.</li> |
119 |
[% END %] |
162 |
[% END %] |
120 |
[% IF ( ERROR_age_limitations ) %] |
163 |
[% IF ( ERROR_age_limitations ) %] |
121 |
<li id="ERROR_age_limitations">Patron's age is incorrect for their category. |
164 |
<li id="ERROR_age_limitations">Patron's age is incorrect for their category. |
122 |
Ages allowed are [% age_low %]-[% age_high %].</li> |
165 |
Ages allowed are [% age_low %]-[% age_high %].</li> |
123 |
[% END %] |
166 |
[% END %] |
124 |
[% IF ( ERROR_branch ) %] |
167 |
[% IF ( ERROR_branch ) %] |
125 |
<li id="ERROR_branch">Library is invalid.</li> |
168 |
<li id="ERROR_branch">Library is invalid.</li> |
126 |
[% END %] |
169 |
[% END %] |
127 |
[% IF ( ERROR_dateofbirth ) %] |
170 |
[% IF ( ERROR_dateofbirth ) %] |
128 |
<li id="ERROR_dateofbirth">Date of birth is invalid.</li> |
171 |
<li id="ERROR_dateofbirth">Date of birth is invalid.</li> |
129 |
[% END %] |
172 |
[% END %] |
Lines 156-162
$(document).ready(function() {
Link Here
|
156 |
[% END %] |
199 |
[% END %] |
157 |
|
200 |
|
158 |
|
201 |
|
159 |
[% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off"> |
202 |
[% UNLESS ( check_member ) %]<form name="form" id="entryform" action="/cgi-bin/koha/members/memberentry.pl" method="post" autocomplete="off" class="toggler" > |
160 |
<input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %] |
203 |
<input type="hidden" name="nodouble" value="[% nodouble %]" /> [% END %] |
161 |
<!-- field always hidden in different form (1,2,3) --> |
204 |
<!-- field always hidden in different form (1,2,3) --> |
162 |
<input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" /> |
205 |
<input type="hidden" name="BorrowerMandatoryField" value="[% BorrowerMandatoryField %]" /> |
Lines 430-436
$(document).ready(function() {
Link Here
|
430 |
<legend id="contact_lgd">Contact</legend><ol> |
473 |
<legend id="contact_lgd">Contact</legend><ol> |
431 |
[% UNLESS nophone %] |
474 |
[% UNLESS nophone %] |
432 |
<li> |
475 |
<li> |
433 |
[% IF ( mandatoryphone ) %] |
476 |
[% IF ( mandatoryphone ) %] |
434 |
<label for="phone" class="required"> |
477 |
<label for="phone" class="required"> |
435 |
[% ELSE %] |
478 |
[% ELSE %] |
436 |
<label for="phone"> |
479 |
<label for="phone"> |
Lines 480-486
$(document).ready(function() {
Link Here
|
480 |
[% END %] |
523 |
[% END %] |
481 |
[% UNLESS noemailpro %] |
524 |
[% UNLESS noemailpro %] |
482 |
<li> |
525 |
<li> |
483 |
[% IF ( mandatoryemailpro ) %] |
526 |
[% IF ( mandatoryemailpro ) %] |
484 |
<label for="emailpro" class="required"> |
527 |
<label for="emailpro" class="required"> |
485 |
[% ELSE %] |
528 |
[% ELSE %] |
486 |
<label for="emailpro"> |
529 |
<label for="emailpro"> |
Lines 693-699
$(document).ready(function() {
Link Here
|
693 |
<label for="opacnote" class="required"> |
736 |
<label for="opacnote" class="required"> |
694 |
[% ELSE %] |
737 |
[% ELSE %] |
695 |
<label for="opacnote"> |
738 |
<label for="opacnote"> |
696 |
[% END %] |
739 |
[% END %] |
697 |
OPAC note: </label> |
740 |
OPAC note: </label> |
698 |
<textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea> |
741 |
<textarea id="opacnote" name="opacnote" cols="55" rows="5">[% UNLESS opduplicate %][% opacnote %][% END %]</textarea> |
699 |
<div class="hint">This message appears on this patron's user page in the OPAC</div> |
742 |
<div class="hint">This message appears on this patron's user page in the OPAC</div> |
Lines 702-708
$(document).ready(function() {
Link Here
|
702 |
[% END %] |
745 |
[% END %] |
703 |
[% UNLESS noborrowernotes %] |
746 |
[% UNLESS noborrowernotes %] |
704 |
<li> |
747 |
<li> |
705 |
[% IF ( mandatoryborrowernotes ) %] |
748 |
[% IF ( mandatoryborrowernotes ) %] |
706 |
<label for="borrowernotes" class="required"> |
749 |
<label for="borrowernotes" class="required"> |
707 |
[% ELSE %] |
750 |
[% ELSE %] |
708 |
<label for="borrowernotes"> |
751 |
<label for="borrowernotes"> |
Lines 1044-1050
$(document).ready(function() {
Link Here
|
1044 |
[% END %] [% END %] |
1087 |
[% END %] [% END %] |
1045 |
|
1088 |
|
1046 |
</form> |
1089 |
</form> |
1047 |
|
1090 |
|
|
|
1091 |
[% IF quickadd && opadd && !check_member %] |
1092 |
<form id="quick_add_form" class="toggler"> |
1093 |
<fieldset class="rows quick_add"><legend>Quick add</legend> |
1094 |
<ol id="quick_add_list"> |
1095 |
</ol> |
1096 |
</fieldset> |
1097 |
|
1098 |
<fieldset class="action"> |
1099 |
<input type="button" class="save_quick_add" value="Save" /> |
1100 |
<a class="cancel" href="/cgi-bin/koha/members/member.pl">Cancel</a> |
1101 |
</fieldset> |
1102 |
|
1103 |
</form> |
1104 |
<script> |
1105 |
$(document).ready(function () { |
1106 |
$("#entryform").hide(); |
1107 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
1108 |
var qaddfields = "[% FOREACH field IN q_add_f.unique %][% field %] [% END %]"; |
1109 |
$("#entryform label").each(function () { |
1110 |
var input_label = $(this).attr('for'); |
1111 |
if ( input_label == 'sex-female' ) { input_label='sex'; } |
1112 |
else if ( input_label == 'btitle' ) { input_label='title'; } |
1113 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
1114 |
$(this).parent().clone().appendTo("#quick_add_list"); |
1115 |
if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); |
1116 |
} |
1117 |
}); |
1118 |
$("#quick_add_form").show(); |
1119 |
}); |
1120 |
</script> |
1121 |
[% END %] |
1048 |
</div> |
1122 |
</div> |
1049 |
</div> |
1123 |
</div> |
1050 |
|
1124 |
|