Bugzilla – Attachment 151628 Details for
Bug 33784
Save clicks on single order receive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33784: Make buttons more meaningful
Bug-33784-Make-buttons-more-meaningful.patch (text/plain), 3.97 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-05-24 13:33:44 UTC
(
hide
)
Description:
Bug 33784: Make buttons more meaningful
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-05-24 13:33:44 UTC
Size:
3.97 KB
patch
obsolete
>From 4e176e1c9227fc7b427ecfe8cf3b9b5e440deb87 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 24 May 2023 09:44:49 -0300 >Subject: [PATCH] Bug 33784: Make buttons more meaningful > >This patch makes dismissing the modal equivalent to cancelling the >receipt and thus returning to parcel.pl. > >The 'Save' button is renamed to 'Confirm' and is disabled when no items >are selected for receiving. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../prog/en/modules/acqui/orderreceive.tt | 22 ++++++++++++++----- > 1 file changed, 17 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 7bbffea00be..9f006ad862b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -94,7 +94,7 @@ > <main> > > <h1>Receive items from : [% name | html %] [% IF ( invoice ) %][[% invoice | html %]] [% END %] (order #[% multiple_orders | html %])</h1> >- >+[% SET only_one_order = ( multiple_orders.split(',').size == 1 ) %] > [% IF multiple_orders %] > <table id="multiple_orders" class="table table-bordered table-striped"> > <thead> >@@ -393,10 +393,15 @@ > </div> > </div> > <div class="modal-footer"> >- <button type="button" class="btn btn-defualt modal-prev">Previous order</button> >+ [% IF only_one_order %] >+ <button type="button" class="btn btn-primary modal-save" disabled>Confirm</button> >+ <a class="cancel btn btn-default" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | html %]&sticky_filters=1">Cancel</a> >+ [% ELSE %] >+ <button type="button" class="btn btn-default modal-prev">Previous order</button> > <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> > <button type="button" class="btn btn-primary modal-save">Save changes</button> >- <button type="button" class="btn btn-defualt modal-next">Next order</button> >+ <button type="button" class="btn btn-default modal-next">Next order</button> >+ [% END %] > </div> > </div> > </div> >@@ -625,7 +630,7 @@ > } > } > ], >- [% IF multiple_orders.split(',').size == 1 %] >+ [% IF only_one_order %] > "drawCallback": function( settings ) { > $(this).find("tbody tr td:last-child a.order_edit_toggle").click(); > }, >@@ -873,6 +878,9 @@ > $("#quantity").val(qty); > var row = $("#order_edit").data('row'); > row.quantity_received = qty; >+ [% IF only_one_order %] >+ $('.modal-save').prop('disabled', qty < 1 ); >+ [% END %] > }) > > $("#order_edit").on("change", "#tax_rate", function() { >@@ -1298,7 +1306,7 @@ > var saved_rows = save_row(); > if(Object.keys(saved_rows).length) $('.save').prop('disabled', false); > $("#order_edit").modal('hide'); >- [% IF multiple_orders.split(',').size == 1 %] >+ [% IF only_one_order %] > $(".save").click(); > [% END %] > }) >@@ -1317,7 +1325,11 @@ > }); > > $("#order_edit").on("hide.bs.modal", function() { >+ [% IF only_one_order %] [%# On the single case, dismissing the modal equals to cancelling %] >+ location.href = "/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | html %]&sticky_filters=1"; >+ [% ELSE %] > $("#child_orders_table").DataTable().off('preDraw').destroy(); >+ [% END %] > }); > }); > </script> >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33784
:
151552
|
151626
|
151627
|
151628
|
151629
|
151630