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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt (-2 / +1 lines)
Lines 230-236 Link Here
230
                                        [% END # /IF adjustment.encumber_open  %]
230
                                        [% END # /IF adjustment.encumber_open  %]
231
                                        [% UNLESS readonly %]
231
                                        [% UNLESS readonly %]
232
                                            <td>
232
                                            <td>
233
                                                <a class="btn btn-default btn-xs submit-form-link" href="#" data-adjustment_id="[% adjustment.adjustment_id | html %]" data-invoiceid="[% invoiceid | html %]" data-action="invoice.pl" data-method="post" data-op="cud-del_adj" data-confirmation="confirm_del_adj">
233
                                                <a class="btn btn-default btn-xs submit-form-link" href="#" data-adjustment_id="[% adjustment.adjustment_id | html %]" data-invoiceid="[% invoiceid | html %]" data-action="invoice.pl" data-method="post" data-op="cud-del_adj" data-confirmation-msg="[% t('Are you sure you want to delete this adjustment?') %]">
234
                                                <i class="fa fa-trash-can"></i> Delete</a>
234
                                                <i class="fa fa-trash-can"></i> Delete</a>
235
                                            </td>
235
                                            </td>
236
                                        [% END %]
236
                                        [% END %]
Lines 538-544 Link Here
538
</span> <!-- /#all_fund_dropdown -->
538
</span> <!-- /#all_fund_dropdown -->
539
539
540
[% MACRO jsinclude BLOCK %]
540
[% MACRO jsinclude BLOCK %]
541
    <script>var confirm_del_adj = _("Are you sure you want to delete this adjustment?");</script>
542
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
541
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
543
    [% Asset.js("js/form-submit.js") | $raw %]
542
    [% Asset.js("js/form-submit.js") | $raw %]
544
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
543
    [% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/form-submit.js (-5 / +4 lines)
Lines 4-14 $(document).ready(function(){ Link Here
4
        e.preventDefault();
4
        e.preventDefault();
5
        let form_data = $(this).data();
5
        let form_data = $(this).data();
6
6
7
        form_confirm = form_data.confirmation;
7
        let confirm_msg = form_data.confirmationMsg;
8
        let confirmation = 1;
8
        let confirmation = 1;
9
        if( form_confirm ){
9
        if( confirm_msg ){
10
            delete form_data.confirmation;
10
            delete form_data.confirmationMsg;
11
            confirmation = confirm( eval(form_confirm) );
11
            confirmation = confirm( confirm_msg );
12
        }
12
        }
13
        if( !confirmation ){ return false }
13
        if( !confirmation ){ return false }
14
14
15
- 

Return to bug 36246