Bugzilla – Attachment 126930 Details for
Bug 29229
Use Flatpickr in suggestion search sidebar filter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29229: (follow-up) Update method for linking flatpickr fields
Bug-29229-follow-up-Update-method-for-linking-flat.patch (text/plain), 6.62 KB, created by
Owen Leonard
on 2021-10-26 18:21:24 UTC
(
hide
)
Description:
Bug 29229: (follow-up) Update method for linking flatpickr fields
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-10-26 18:21:24 UTC
Size:
6.62 KB
patch
obsolete
>From 350c722f8502a694cf84a8aae8cdd6b025033970 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 26 Oct 2021 18:19:27 +0000 >Subject: [PATCH] Bug 29229: (follow-up) Update method for linking flatpickr > fields > >--- > .../prog/en/modules/suggestion/suggestion.tt | 51 +++---------------- > 1 file changed, 6 insertions(+), 45 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 4981a4ac53..21dd043e47 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1116,11 +1116,11 @@ > </li> > <li> > <label for="suggesteddate_from">Suggested date from:</label> >- <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" /> >+ <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" data-date_to="suggesteddate_to" class="flatpickr" /> > </li> > <li> > <label for="suggesteddate_to">To:</label> >- <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" /> >+ <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" class="flatpickr" /> > </li> > <li> > <label for="managedby"> Managed by:</label> >@@ -1137,11 +1137,11 @@ > </li> > <li> > <label for="manageddate_from">Management date from:</label> >- <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" /> >+ <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" data-date_to="manageddate_to" class="flatpickr" /> > </li> > <li> > <label for="manageddate_to">To:</label> >- <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" /> >+ <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" class="flatpickr" /> > </li> > <li> > <label for="acceptedby"> Accepted by:</label> >@@ -1158,11 +1158,11 @@ > </li> > <li> > <label for="accepteddate_from">Accepted date from:</label> >- <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" /> >+ <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" data-date_to="accepteddate_to" class="flatpickr" /> > </li> > <li> > <label for="accepteddate_to">To:</label> >- <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" /> >+ <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" class="flatpickr" /> > </li> > <li> > <input type="submit" value="Go" /> >@@ -1353,45 +1353,6 @@ > return false; > }); > >- /* Suggested date fields */ >- var suggesteddate_from = $("#suggesteddate_from").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- suggesteddate_to.set('minDate', selectedDates[0]); >- } >- }); >- var suggesteddate_to = $("#suggesteddate_to").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- /* Managed date fields */ >- var manageddate_from = $("#manageddate_from").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- manageddate_to.set('minDate', selectedDates[0]); >- } >- }); >- var manageddate_to = $("#manageddate_to").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- >- /* Accepted date fields */ >- var accepteddate_from = $("#accepteddate_from").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- accepteddate_to.set('minDate', selectedDates[0]); >- } >- }); >- var accepteddate_to = $("#accepteddate_to").flatpickr({ >- onClose: function( selectedDates, dateText, instance) { >- validate_date( selectedDates, instance ); >- }, >- }); >- > $("button[type='submit']").on("click", function(e) { > var submit_button = this; > var form = $(submit_button).parents("form"); >-- >2.20.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 29229
:
126235
|
126261
|
126466
| 126930