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

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/members.js (-33 / +5 lines)
Lines 98-135 function check_form_borrowers(nav){ Link Here
98
        }
98
        }
99
    }
99
    }
100
100
101
    if (document.form.BorrowerMandatoryField.value==='')
102
    {}
103
    else
104
    {
105
        var champ_verif = document.form.BorrowerMandatoryField.value.split ('|');
106
        message += MSG_MISSING_MANDATORY;
107
        message += "\n";
108
        for (var i=0; i<champ_verif.length; i++) {
109
            if (document.getElementsByName(""+champ_verif[i]+"")[0]) {
110
                var val_champ=eval("document.form."+champ_verif[i]+".value");
111
                var ref_champ=eval("document.form."+champ_verif[i]);
112
                //check if it's a select
113
                if (ref_champ.type=='select-one'){
114
                    // check to see if first option is selected and is blank
115
                    if (ref_champ.options[0].selected &&
116
                        ref_champ.options[0].text === ''){
117
                        // action if field is empty
118
                        message_champ+=champ_verif[i]+"\n";
119
                        //test to know if you must show a message with error
120
                        statut=1;
121
                    }
122
                } else {
123
                    if ( val_champ === '' ) {
124
                        // action if the field is not empty
125
                        message_champ+=champ_verif[i]+"\n";
126
                        statut=1;
127
                    }
128
                }
129
            }
130
        }
131
    }
132
133
    if ( document.form.password.value != document.form.password2.value ){
101
    if ( document.form.password.value != document.form.password2.value ){
134
            if ( message_champ !== '' ){
102
            if ( message_champ !== '' ){
135
                message_champ += "\n";
103
                message_champ += "\n";
Lines 182-185 $(document).ready(function(){ Link Here
182
            $("#debarreduntil").hide();
150
            $("#debarreduntil").hide();
183
        }
151
        }
184
    });
152
    });
185
});
153
    var mandatory_fields = $("input[name='BorrowerMandatoryField']").val().split ('|');
154
    $(mandatory_fields).each(function(){
155
        $("[name='"+this+"']").attr('required', 'required');
156
    });
157
});
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-2 lines)
Lines 83-89 Link Here
83
        var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
83
        var MSG_DUPLICATE_PATRON = _("Warning: Duplicate patron");
84
        var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
84
        var MSG_DUPLICATE_ORGANIZATION = _("Warning: Duplicate organization");
85
        var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
85
        var MSG_LATE_EXPIRY = _("Warning: Expiration date falls before enrollment date");
86
        var MSG_MISSING_MANDATORY = _("The following fields are mandatory:");
87
        var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
86
        var MSG_DUPLICATE_SUSPICION = _("Please confirm whether this is a duplicate patron");
88
        var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
87
        var MSG_PASSWORD_MISMATCH = _("The passwords entered do not match");
89
//]]>
88
//]]>
90
- 

Return to bug 11002