Lines 44-63
$(document).ready(function() {
Link Here
|
44 |
var toggle_to = ''; |
44 |
var toggle_to = ''; |
45 |
var toggle_from = ''; |
45 |
var toggle_from = ''; |
46 |
if( $("#entryform:visible").length ) { |
46 |
if( $("#entryform:visible").length ) { |
47 |
toggle_to = "#quick_add_form label"; |
47 |
toggle_to = "#quick_add_form "; |
48 |
toggle_from = "#entryform label"; |
48 |
toggle_from = "#entryform "; |
49 |
} else { |
49 |
} else { |
50 |
toggle_to="#entryform label"; |
50 |
toggle_to="#entryform "; |
51 |
toggle_from = "#quick_add_form label"; |
51 |
toggle_from = "#quick_add_form "; |
52 |
} |
52 |
} |
53 |
$(toggle_from).each(function() { |
53 |
$(toggle_from).each(function() { |
54 |
var input_label = $(this).attr('for'); |
54 |
var input_label = $(this).attr('for'); |
55 |
if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) { |
55 |
if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) { |
56 |
$(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); |
56 |
$(toggle_to+"label[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); |
57 |
return; |
57 |
return; |
58 |
} |
58 |
} |
|
|
59 |
if ( input_label == 'city' ) { |
60 |
$(toggle_to+"#select_city").val( $(toggle_from+"#select_city").val() ); |
61 |
} |
59 |
if( $(this).next().val() != '' ) { |
62 |
if( $(this).next().val() != '' ) { |
60 |
$(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() ); |
63 |
$(toggle_to+"label[for='"+input_label+"']").next().val( $(this).next().val() ); |
61 |
} |
64 |
} |
62 |
}); |
65 |
}); |
63 |
|
66 |
|
Lines 1196-1202
$(document).ready(function() {
Link Here
|
1196 |
</form> |
1199 |
</form> |
1197 |
<script> |
1200 |
<script> |
1198 |
$(document).ready(function () { |
1201 |
$(document).ready(function () { |
1199 |
|
1202 |
var passwd_mandatory = [% IF mandatorypassword %]0[% ELSE %]1[% END %]; |
1200 |
$("#entryform,#saverecord").hide(); |
1203 |
$("#entryform,#saverecord").hide(); |
1201 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
1204 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
1202 |
var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]]; |
1205 |
var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]]; |
Lines 1212-1218
$(document).ready(function() {
Link Here
|
1212 |
if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; } |
1215 |
if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; } |
1213 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
1216 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
1214 |
$(this).parent().clone().appendTo("#quick_add_list"); |
1217 |
$(this).parent().clone().appendTo("#quick_add_list"); |
1215 |
if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); |
1218 |
if( input_label === 'password' && passwd_mandatory ) $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); |
1216 |
} |
1219 |
} |
1217 |
}); |
1220 |
}); |
1218 |
if( $("#memberentry_guarantor").length ) { |
1221 |
if( $("#memberentry_guarantor").length ) { |
1219 |
- |
|
|