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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (-12 / +19 lines)
Lines 99-109 Link Here
99
<ol>
99
<ol>
100
100
101
    <li>
101
    <li>
102
        <label for="paid">Amount paid: </label>
102
        <label for="paid">Amount being paid: </label>
103
        <input name="paid" id="paid" value="[% amountoutstanding | $Price %]"/>
103
        <input name="paid" id="paid" value="[% amountoutstanding | $Price %]"/>
104
    </li>
104
    </li>
105
    <li>
105
    <li>
106
        <label for="collected">Collect from patron: </label>
106
        <label for="collected">Collected from patron: </label>
107
        <input id="collected" value="[% amountoutstanding | $Price %]"/>
107
        <input id="collected" value="[% amountoutstanding | $Price %]"/>
108
    </li>
108
    </li>
109
    <li>
109
    <li>
Lines 125-132 Link Here
125
</ol>
125
</ol>
126
</fieldset>
126
</fieldset>
127
127
128
    <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
128
        <div class="action">
129
        <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a></div>
129
            <input type="submit" name="submitbutton" value="Confirm" />
130
            <a class="cancel" href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a>
131
        </div>
130
    </form>
132
    </form>
131
[% ELSIF ( writeoff_individual ) %]
133
[% ELSIF ( writeoff_individual ) %]
132
    <form name="woindivfine" id="woindivfine" action="/cgi-bin/koha/members/pay.pl" method="post" >
134
    <form name="woindivfine" id="woindivfine" action="/cgi-bin/koha/members/pay.pl" method="post" >
Lines 248-264 Link Here
248
</div>
250
</div>
249
251
250
<!-- Modal -->
252
<!-- Modal -->
251
<a class="hidden" href="#confirm_change_form" data-toggle="modal"></a>
252
<div id="confirm_change_form" class="modal" tabindex="-1" role="dialog" aria-hidden="true">
253
<div id="confirm_change_form" class="modal" tabindex="-1" role="dialog" aria-hidden="true">
253
    <div class="modal-dialog">
254
    <div class="modal-dialog">
254
        <div class="modal-content">
255
        <div class="modal-content">
255
            <div class="modal-header">
256
            <div class="modal-header">
256
                <h3>Amount collected higher than paid</h3>
257
                <h3>The amount collected is more than the outstanding charge</h3>
257
            </div>
258
            </div>
258
            <div class="modal-body">
259
            <div class="modal-body">
259
                <p>The amount collected from the patron is higher than the amount paid.</p>
260
                <p>The amount collected from the patron is higher than the amount to be paid.</p>
260
                <p>The change to give is <b><span id="modal_change">0.00</span></b>.</p>
261
                <p>The change to give is <b><span id="modal_change">0.00</span></b>.</p>
261
                <p>Do you still confirm the payment?</p>
262
                <p>Confirm this payment?</p>
262
            </div>
263
            </div>
263
            <div class="modal-footer">
264
            <div class="modal-footer">
264
                <button class="btn btn-default approve" id="modal_submit" type="button"><i class="fa fa-check"></i> Yes</button>
265
                <button class="btn btn-default approve" id="modal_submit" type="button"><i class="fa fa-check"></i> Yes</button>
Lines 271-277 Link Here
271
[% MACRO jsinclude BLOCK %]
272
[% MACRO jsinclude BLOCK %]
272
    [% INCLUDE 'str/members-menu.inc' %]
273
    [% INCLUDE 'str/members-menu.inc' %]
273
    [% Asset.js("js/members-menu.js") | $raw %]
274
    [% Asset.js("js/members-menu.js") | $raw %]
274
    <script type= "text/javascript">
275
    <script>
275
        $(document).ready(function() {
276
        $(document).ready(function() {
276
            var forms = $('#payindivfine, #payfine');
277
            var forms = $('#payindivfine, #payfine');
277
            var change = $('#change')[0];
278
            var change = $('#change')[0];
Lines 285-298 Link Here
285
            });
286
            });
286
287
287
            if (change != undefined) {
288
            if (change != undefined) {
288
                forms.bind('submit', function(e) {
289
                forms.on("submit", function(e) {
289
                    if (change.innerHTML > 0.00) {
290
                    if (change.innerHTML > 0.00) {
290
                        e.preventDefault();
291
                        e.preventDefault();
291
                        $('a[href="#confirm_change_form"]').click();
292
                        $("#confirm_change_form").modal("show");
293
                    } else {
294
                        return true;
292
                    }
295
                    }
293
                });
296
                });
294
            }
297
            }
295
298
299
            $("#confirm_change_form").on("hidden.bs.modal", function(){
300
                // remove class added by preventDoubleFormSubmit if necessary
301
                $("body, form input[type='submit'], form button[type='submit'], form a").removeClass('waiting');
302
            });
303
296
            $('#modal_submit').click(function() {
304
            $('#modal_submit').click(function() {
297
                forms[0].submit();
305
                forms[0].submit();
298
            });
306
            });
299
- 

Return to bug 11373