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 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
- 

Return to bug 3534