View | Details | Raw Unified | Return to bug 3534
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +1 lines)
Lines 103-109 Patrons: Link Here
103
         - pref: PatronQuickAddFields
103
         - pref: PatronQuickAddFields
104
           class: multi
104
           class: multi
105
         - (separate columns with |)
105
         - (separate columns with |)
106
         - "add these fields to the patron quick add form when entering a new patron. Displays only mandatory fields and fields specified here"
106
         - "add these fields to the patron quick add form when entering a new patron. Displays only mandatory fields and fields specified here. If applicable the guarantor form will be shown as well, individual fields in that form will be ignored."
107
     -
107
     -
108
         - "Use the SMS::Send::"
108
         - "Use the SMS::Send::"
109
         - pref: SMSSendDriver
109
         - pref: SMSSendDriver
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-10 / +20 lines)
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
- 

Return to bug 3534