Bugzilla – Attachment 151803 Details for
Bug 33864
Problems in order receive modal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33864: Better handling of confirmation button
Bug-33864-Better-handling-of-confirmation-button.patch (text/plain), 2.79 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-05-30 15:11:34 UTC
(
hide
)
Description:
Bug 33864: Better handling of confirmation button
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-05-30 15:11:34 UTC
Size:
2.79 KB
patch
obsolete
>From 742ca9b8364722a8d46a94ca9a44785ed84f26aa Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 30 May 2023 12:07:39 -0300 >Subject: [PATCH] Bug 33864: Better handling of confirmation button > >This patch corrects the behavior of the 'Confirm' button on the three >possible scenarios regarding item creation. > >Ordering: >- Quantity gets locked (only changeable when selecting items) >- 'Confirm' disabled, only gets enabled if quantity > 0 > >Receiving: >- Quantity gets locked (only changeable when creating items) >- 'Confirm' disabled, only gets enabled if quantity > 0 > >Cataloguing: >- It now defaults to 1 >- 'Confirm' enabled by default (because of 1) if quantity is set to 0, > it gets disabled. > >To test: >1. Verify the described behavior with the sample orders for the previous > patch. >=> SUCCESS: It does the job! > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > .../prog/en/modules/acqui/orderreceive.tt | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >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 6c78dd45e5e..ff57b258c80 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -656,6 +656,12 @@ > } > }); > >+ [% IF only_one_order %] >+ $("#quantity").on('change', function() { >+ $('.modal-save').prop('disabled', $(this).val() < 1 ); >+ }); >+ [% END %] >+ > var _doSave = function(params) { > $.ajax($.extend({ > method: 'POST', >@@ -1152,7 +1158,11 @@ > $("#current-fund").html(FUNC_CUR.format(row.fund.budget.budget_period_description, row.fund.name)); > $("#creator").html([row.creator.surname, row.creator.firstname].filter(function(name){return name}).join(', ')+" ("+row.creator.patron_id+')') > $("#quantity_to_receive").val(row.quantity).prop('readonly', !row.subscription_id); >- $("#quantity").val(row.quantity_received).prop('readonly', !row.subscription_id && effective_create_items == 'receiving'); >+ $("#quantity").val( effective_create_items == 'cataloguing' ? row.quantity_received || 1 : row.quantity_received ) >+ .prop('readonly', !row.subscription_id && effective_create_items != 'cataloguing'); >+ [% IF only_one_order %] >+ $(".modal-save").prop('disabled', $("#quantity").val() == 0); >+ [% END %] > $('#qtyrecerror').hide(); > var tax_rate = row.tax_rate_on_receiving || row.tax_rate_on_ordering; > $("#tax_rate").val(tax_rate).change(); >-- >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 33864
:
151799
|
151803
|
151811
|
151812
|
151813
|
151816
|
151821
|
151824
|
151852
|
151853
|
151854
|
151855
|
151856
|
151857
|
151858
|
151859