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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/validator-strings.inc (+1 lines)
Lines 12-17 Link Here
12
            digits: _("Please enter only digits."),
12
            digits: _("Please enter only digits."),
13
            equalTo: _("Please enter the same value again."),
13
            equalTo: _("Please enter the same value again."),
14
            number: _("Please add amount in valid format: 0.00"),
14
            number: _("Please add amount in valid format: 0.00"),
15
            missing_fields: _("There are some required fields missing from this field set. Please fill them."),
15
            maxlength: $.validator.format(_("Please enter no more than {0} characters.")),
16
            maxlength: $.validator.format(_("Please enter no more than {0} characters.")),
16
            minlength: $.validator.format(_("Please enter at least {0} characters.")),
17
            minlength: $.validator.format(_("Please enter at least {0} characters.")),
17
            rangelength: $.validator.format(_("Please enter a value between {0} and {1} characters long.")),
18
            rangelength: $.validator.format(_("Please enter a value between {0} and {1} characters long.")),
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-2 / +18 lines)
Lines 240-245 $(document).ready(function(){ Link Here
240
        jQuery.validator.messages.phone);
240
        jQuery.validator.messages.phone);
241
241
242
    $("#entryform").validate({
242
    $("#entryform").validate({
243
        ignore: "",
243
        rules: {
244
        rules: {
244
            email: {
245
            email: {
245
                email: true
246
                email: true
Lines 268-274 $(document).ready(function(){ Link Here
268
            else
269
            else
269
                form.beenSubmitted = true;
270
                form.beenSubmitted = true;
270
                form.submit();
271
                form.submit();
271
            }
272
        },
273
        invalidHandler: function(form, validator) {
274
            var error_msg = jQuery.validator.messages.missing_fields;
275
            // First remove error messages so that it doesn't
276
            // show in fieldset without errors
277
            $("fieldset").each(function(){
278
                $("#"+$(this).attr("id")+"-error").remove();
279
            });
280
            $(validator.errorList).each(function() {
281
                var fieldset = $(this.element.closest("fieldset"));
282
                var fieldset_id = fieldset.attr("id");
283
                //Add error message only if it doesn't already exist
284
                if(!$("#"+fieldset_id+"-error").length){
285
                    fieldset.find("legend").before('<span id="'+fieldset_id+'-error" class="required">'+error_msg+'</span>');
286
                }
287
            });
288
        }
272
    });
289
    });
273
290
274
    var mrform = $("#manual_restriction_form");
291
    var mrform = $("#manual_restriction_form");
275
- 

Return to bug 34671