Lines 35-44
$(document).ready(function() {
Link Here
|
35 |
$(toggle_from).each(function() { |
35 |
$(toggle_from).each(function() { |
36 |
var input_label = $(this).attr('for'); |
36 |
var input_label = $(this).attr('for'); |
37 |
if ( input_label == 'sex-male' || input_label == 'sex-none' || input_label == 'sex-female' ) { |
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') ); |
38 |
$(toggle_to+"[for='"+input_label+"']").next().prop('checked', $(this).next().prop('checked') ); |
39 |
return; |
39 |
return; |
|
|
40 |
} |
41 |
if( $(this).next().val() != '' ) { |
42 |
$(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() ); |
40 |
} |
43 |
} |
41 |
if( $(this).next().val() != '' ) { $(toggle_to+"[for='"+input_label+"']").next().val( $(this).next().val() );} |
|
|
42 |
}); |
44 |
}); |
43 |
|
45 |
|
44 |
$(".toggler").toggle(); |
46 |
$(".toggler").toggle(); |
Lines 1095-1110
$(document).ready(function() {
Link Here
|
1095 |
$(document).ready(function () { |
1097 |
$(document).ready(function () { |
1096 |
$("#entryform").hide(); |
1098 |
$("#entryform").hide(); |
1097 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
1099 |
[% q_add_f = Koha.Preference('PatronQuickAddFields').split('\|') %] |
1098 |
var qaddfields = "[% FOREACH field IN q_add_f.unique %][% field %] [% END %]"; |
1100 |
var qaddfields = [[% FOREACH field IN q_add_f.unique %]"[% field %]",[% END %]]; |
|
|
1101 |
var skipped_fields = ["contactname","contactfirstname","relationship"]; //Guarantor form is pulled as a whole, ignore individual fields |
1099 |
$("#entryform label").each(function () { |
1102 |
$("#entryform label").each(function () { |
1100 |
var input_label = $(this).attr('for'); |
1103 |
var input_label = $(this).attr('for'); |
1101 |
if ( input_label == 'sex-female' ) { input_label='sex'; } |
1104 |
if ( input_label == 'sex-female' ) { |
1102 |
else if ( input_label == 'btitle' ) { input_label='title'; } |
1105 |
input_label='sex'; |
|
|
1106 |
} |
1107 |
else if ( input_label == 'btitle' ) { |
1108 |
input_label='title'; |
1109 |
} |
1110 |
if ( skipped_fields.indexOf( input_label ) == -1 ) { input_label=""; } |
1103 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
1111 |
if( qaddfields.indexOf( input_label ) != -1 || $(this).attr('class') == 'required' ){ |
1104 |
$(this).parent().clone().appendTo("#quick_add_list"); |
1112 |
$(this).parent().clone().appendTo("#quick_add_list"); |
1105 |
if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); |
1113 |
if( input_label == 'password') $("#entryform label[for='password2']").parent().clone().appendTo("#quick_add_list"); |
|
|
1114 |
} |
1115 |
}); |
1116 |
if( $("#memberentry_guarantor").length ) { |
1117 |
$("#memberentry_guarantor").clone().appendTo("#quick_add_list").css("margin",0); |
1106 |
} |
1118 |
} |
1107 |
}); |
|
|
1108 |
$("#quick_add_form").show(); |
1119 |
$("#quick_add_form").show(); |
1109 |
}); |
1120 |
}); |
1110 |
</script> |
1121 |
</script> |
1111 |
- |
|
|