Bugzilla – Attachment 143903 Details for
Bug 15348
Change/Edit estimated delivery date per order line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15348: (follow-up) Fix modals to pre-set input with stored date
Bug-15348-follow-up-Fix-modals-to-pre-set-input-wi.patch (text/plain), 5.10 KB, created by
Katrin Fischer
on 2022-11-15 13:36:22 UTC
(
hide
)
Description:
Bug 15348: (follow-up) Fix modals to pre-set input with stored date
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-11-15 13:36:22 UTC
Size:
5.10 KB
patch
obsolete
>From 3fa3396b64dccaa40f7a79c34617d865685848e3 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 15 Nov 2022 13:32:43 +0000 >Subject: [PATCH] Bug 15348: (follow-up) Fix modals to pre-set input with > stored date > >Makes sure that when an estimated delivery day is edited using >the modals on the basket summary or late order pages, the >date input is pre-set to the stored estimated delivery date. > >To test: >* Create some order lines with and without estimated delivery date set >* Make sure that on the basket summary the edit link comes up with an > empty modal >* Close the basket >* Check that on late orders the dates are pre-filled incorrectly as well >* Apply patch >* Refresh basket summary and late order pages >* All edit links now should bring up the modal with the correct date filled in >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 5 +++-- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 8ef4ec64cd..777b5a0326 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -599,7 +599,7 @@ > <td data-order="[% books_loo.estimated_delivery_date | html %]" class="actions"> > [% books_loo.estimated_delivery_date | $KohaDates %] > [% IF CAN_user_acquisition_order_manage %] >- <a class="edit_delivery_date" href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% books_loo.ordernumber | html %]" title="Edit delivery date" data-ordernumber="[% books_loo.ordernumber | html %]" id="delivery_date_[% books_loo.ordernumber | html %]" data-delivery_date="[% books_loo.estimated_delivery_date | $KohaDates %]"> >+ <a class="edit_delivery_date" href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% books_loo.ordernumber | html %]" title="Edit delivery date" data-ordernumber="[% books_loo.ordernumber | html %]" id="delivery_date_[% books_loo.ordernumber | html %]" data-delivery_date="[% books_loo.estimated_delivery_date | html %]"> > <i class="fa fa-pencil"></i> Edit > </a> > </td> >@@ -1060,9 +1060,10 @@ > var ordernumber = $(this).data("ordernumber"); > var modalTitle = $(this).attr("title") + " (order number " + ordernumber + ")"; > var date_text = $( "#delivery_date_" + ordernumber ).data("delivery_date"); >+ const estimated_delivery_date = document.querySelector("#estimated_delivery_date")._flatpickr; >+ estimated_delivery_date.setDate( date_text ); > $("#dateEditor .modal-title").text(modalTitle); > $("#date_ordernumber").val(ordernumber); >- $("#estimated_delivery_date").val(date_text); > $("#dateEditor").modal("show"); > }); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index 82983da851..2119d9c163 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -114,7 +114,7 @@ > <p class="delivery_date"> > <span>[% estimated_delivery_date | $KohaDates %]</span> > [% IF CAN_user_acquisition_order_manage %] >- <a class="edit_delivery_date noExport" data-ordernumber="[% lateorder.ordernumber | html %]" data-delivery_date="[% estimated_delivery_date | $KohaDates %]" id="delivery_date_[% lateorder.ordernumber | html %]" href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% lateorder.ordernumber | html %]" title="Edit delivery date"> >+ <a class="edit_delivery_date noExport" data-ordernumber="[% lateorder.ordernumber | html %]" data-delivery_date="[% estimated_delivery_date | html %]" id="delivery_date_[% lateorder.ordernumber | html %]" href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% lateorder.ordernumber | html %]" title="Edit delivery date"> > <i class="fa fa-pencil"></i> Edit > </a> > [% END %] >@@ -413,9 +413,10 @@ > var ordernumber = $(this).data("ordernumber"); > var modalTitle = $(this).attr("title") + " (order number " + ordernumber + ")"; > var date_text = $( "#delivery_date_" + ordernumber ).data("delivery_date"); >+ const estimated_delivery_date = document.querySelector("#estimated_delivery_date")._flatpickr; >+ estimated_delivery_date.setDate( date_text ); > $("#dateEditor .modal-title").text(modalTitle); > $("#date_ordernumber").val(ordernumber); >- $("#estimated_delivery_date").val(date_text); > $("#dateEditor").modal("show"); > }); > >-- >2.30.2
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 15348
:
114430
|
114583
|
114623
|
115121
|
115122
|
115123
|
115124
|
116517
|
118788
|
118789
|
119297
|
119298
|
119299
|
120653
|
120654
|
120655
|
120656
|
136560
|
136561
|
136562
|
136563
|
137057
|
137058
|
137061
|
137098
|
137099
|
137740
|
137741
|
137742
|
137743
|
138110
|
138491
|
138529
|
138530
|
138531
|
138532
|
138533
|
138534
|
138535
|
138536
|
138537
|
138538
|
138539
|
138540
|
139245
|
139274
|
139301
|
139329
|
139330
|
139331
|
139332
|
139333
|
139334
|
139335
|
139336
|
139337
|
139338
|
139339
|
139340
|
139341
|
139342
|
139343
|
139351
|
139352
|
139353
|
139354
|
139355
|
139356
|
139357
|
139358
|
139359
|
139360
|
139361
|
139362
|
139363
|
139364
|
139365
|
139831
|
139832
|
139833
|
139834
|
139835
|
139836
|
139837
|
139838
|
139839
|
139840
|
139841
|
139842
|
139843
|
139844
|
139845
|
140708
|
140735
|
143896
|
143900
|
143903
|
143904