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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt (-3 / +16 lines)
Lines 197-203 Link Here
197
    [% END %]
197
    [% END %]
198
[% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
198
[% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
199
[% IF ( enter ) %]
199
[% IF ( enter ) %]
200
    <form action="updatesupplier.pl" name="updatesupplier" style="display:block" class="validated" method="post">
200
    <form action="updatesupplier.pl" name="updatesupplier" id="updatesupplier" style="display:block" method="post">
201
        <input type="hidden" name="op" value="add_validated" />
201
        <div id="toolbar" class="btn-toolbar">
202
        <div id="toolbar" class="btn-toolbar">
202
            <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> Save</button>
203
            <button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> Save</button>
203
            [% IF ( booksellerid ) %]
204
            [% IF ( booksellerid ) %]
Lines 346-352 Link Here
346
                <input type="hidden" name="tax_rate" value="0" />
347
                <input type="hidden" name="tax_rate" value="0" />
347
            [% END %]
348
            [% END %]
348
            <li><label for="discount">Discount: </label>
349
            <li><label for="discount">Discount: </label>
349
                <input type="text" size="6" id="discount" name="discount" value="[% discount | format ('%.1f') %]" />%</li>
350
                <input type="text" size="6" id="discount" name="discount" value="[% discount | html %]"/> % - Example: 7.5 %</li>
350
            <li>
351
            <li>
351
                <label for="deliverytime">Delivery time: </label>
352
                <label for="deliverytime">Delivery time: </label>
352
                <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime | html %]" /> days
353
                <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime | html %]" /> days
Lines 516-521 Link Here
516
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
517
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
517
    [% Asset.js("lib/hc-sticky.js") | $raw %]
518
    [% Asset.js("lib/hc-sticky.js") | $raw %]
518
    [% Asset.js("js/acq.js") | $raw %]
519
    [% Asset.js("js/acq.js") | $raw %]
520
    [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
519
    [% INCLUDE 'datatables.inc' %]
521
    [% INCLUDE 'datatables.inc' %]
520
    <script>
522
    <script>
521
        function confirm_deletion() {
523
        function confirm_deletion() {
Lines 678-683 Link Here
678
        }
680
        }
679
681
680
        var Sticky;
682
        var Sticky;
683
        jQuery.validator.addMethod("decimal_separator", function(value, element){
684
                var pattern = /^\d+(\.\d{1})?$/;
685
                return this.optional(element) || value.match(pattern);
686
            }, _("Respect decimal separator format"));
681
687
682
         $(document).ready(function() {
688
         $(document).ready(function() {
683
            var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
689
            var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
Lines 728-733 Link Here
728
                stickTo: "main",
734
                stickTo: "main",
729
                stickyClass: "floating"
735
                stickyClass: "floating"
730
            });
736
            });
737
738
            $('#updatesupplier').validate({
739
                rules: {
740
                    discount: {
741
                        decimal_separator: true,
742
                    },
743
                },
744
            });
731
        });
745
        });
732
    </script>
746
    </script>
733
[% END %]
747
[% END %]
734
- 

Return to bug 35087