From 5f618097efe7ea56492e745fa2ed85b30d99040a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 6 Aug 2020 12:41:23 +0000 Subject: [PATCH] Bug 16112: (follow-up) Form style improvements, clear date This follow-up makes some markup and style improvements in order to make the renew form more consistent with similar forms like checkout and check-in. It also adds a "Clear" button for the datepicker field, matching similar date inputs. To test, apply the patch and go to Circulation -> Renew. - With or without the SpecifyDueDate system preference enabled the form should look correct. - With the SpecifyDueDate preference enabled you should see the date form below the barcode input field. - Select a date and test that the "Clear" button works to clear it. - Compare to the check-in page to confirm that they look consistent with each other. --- .../intranet-tmpl/prog/en/modules/circ/renew.tt | 31 +++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt index d9d335e828..aa13327999 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -167,21 +167,29 @@
- Renew +

Renew

- [% IF Koha.Preference('SpecifyDueDate') %] - - -
- [% END %] +
+ +
- + - + + + [% IF Koha.Preference('SpecifyDueDate') %] +
+
+
+ + +
+
+ [% END %] -
+
[% END %] @@ -233,6 +241,11 @@ }).on("change", function(e, value) { if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} }); + $("#cleardate").on("click",function(e){ + e.preventDefault(); + this.form.hard_due_date.value = ''; + this.form.barcode.focus(); + }); [% END %] }); -- 2.11.0