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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc (-2 / +1 lines)
Lines 237-248 Link Here
237
                        />
237
                        />
238
                    [% ELSIF ( mv.type == 'replacementprice' ) %]
238
                    [% ELSIF ( mv.type == 'replacementprice' ) %]
239
                        <input
239
                        <input
240
                            class="decimal valid input_marceditor [% kohafield | html %]"
240
                            class="replacement_price_decimal valid input_marceditor [% kohafield | html %]"
241
                            type="text"
241
                            type="text"
242
                            id="[% mv.id | html %]"
242
                            id="[% mv.id | html %]"
243
                            name="[% kohafield | html %]"
243
                            name="[% kohafield | html %]"
244
                            value="[% mv.value | html %]"
244
                            value="[% mv.value | html %]"
245
                            aria-invalid="false"
246
                        />
245
                        />
247
                    [% END %]
246
                    [% END %]
248
247
(-)a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js (-1 / +14 lines)
Lines 188-193 $(document).ready(function () { Link Here
188
        decimal_rate: true,
188
        decimal_rate: true,
189
    });
189
    });
190
190
191
    jQuery.validator.addMethod(
192
        "replacement_price_decimal_rate",
193
        function (value, element) {
194
            return (
195
                this.optional(element) || /^\d{1,6}(\.\d{1,2})?$/.test(value)
196
            );
197
        },
198
        __("Please enter up to 6 digits before the decimal and 2 digits after.")
199
    );
200
201
    jQuery.validator.addClassRules("replacement_price_decimal", {
202
        replacement_price_decimal_rate: true,
203
    });
204
191
    $("#logout").on("click", function () {
205
    $("#logout").on("click", function () {
192
        logOut();
206
        logOut();
193
    });
207
    });
194
- 

Return to bug 38839