Lines 51-60
$(document).ready(function() {
Link Here
|
51 |
$(toggle_from).each(function() { |
51 |
$(toggle_from).each(function() { |
52 |
var input_label = $(this).attr('for'); |
52 |
var input_label = $(this).attr('for'); |
53 |
if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) { |
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') ); |
54 |
$(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); |
55 |
return; |
55 |
return; |
|
|
56 |
} |
57 |
if( $(this).next().val() != '' ) { |
58 |
$(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() ); |
56 |
} |
59 |
} |
57 |
if( $(this).next().val() != '' ) { $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );} |
|
|
58 |
}); |
60 |
}); |
59 |
|
61 |
|
60 |
$(".toggler").toggle(); |
62 |
$(".toggler").toggle(); |
Lines 1108-1123
$(document).ready(function() {
Link Here
|
1108 |
$(document).ready(function () { |
1110 |
$(document).ready(function () { |
1109 |
$("#entryform").hide(); |
1111 |
$("#entryform").hide(); |
1110 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
1112 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
1111 |
var qaddfields = "[% FOREACH field IN q_add_f.unique %][% field %] [% END %]"; |
1113 |
var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]]; |
|
|
1114 |
var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields |
1112 |
$("#entryform label").each(function () { |
1115 |
$("#entryform label").each(function () { |
1113 |
var input_label = $(this).attr('for'); |
1116 |
var input_label = $(this).attr('for'); |
1114 |
if ( input_label == 'sex-female' ) { input_label='sex'; } |
1117 |
if ( input_label == 'sex-female' ) { |
1115 |
else if ( input_label == 'btitle' ) { input_label='title'; } |
1118 |
input_label='sex'; |
|
|
1119 |
} |
1120 |
else if ( input_label == 'btitle' ) { |
1121 |
input_label='title'; |
1122 |
} |
1123 |
if ( skipped_fields.indexOf( input_label ) != -1 ) { input_label=""; } |
1116 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
1124 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
1117 |
$(this).parent().clone().appendTo("#quick_add_list"); |
1125 |
$(this).parent().clone().appendTo("#quick_add_list"); |
1118 |
if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); |
1126 |
if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); |
|
|
1127 |
} |
1128 |
}); |
1129 |
if( $("#memberentry_guarantor").length ) { |
1130 |
$("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0); |
1119 |
} |
1131 |
} |
1120 |
}); |
|
|
1121 |
$("#quick_add_form").show(); |
1132 |
$("#quick_add_form").show(); |
1122 |
}); |
1133 |
}); |
1123 |
</script> |
1134 |
</script> |
1124 |
- |
|
|