From cde87a34a182e30a08f11988ed9dbeb5692a0570 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 7 Sep 2021 12:44:06 +0000 Subject: [PATCH] Bug 28958: Use Flatpickr on serials pages This patch replaces the use of jQueryUI's datepicker on serials pages. To test, apply the patch and test the following serials pages to confirm that datepickers work correctly. "Linked" date fields should prevent a "to" selection which preceeds the selected "from" date. - Claims -> Choose vendor -> Filter missing issues (linked "from" and "to" fields). - Check expiration -> "Expiring before" field. - Manage numbering patterns -> New numbering pattern -> "First issue publication date" field. - Serials advanced search -> "Expires before" field. - Subscription search results -> Check multiple checkboxes -> Edit selected serials: "Expiration date" field. - Subscription details -> Serial collection -> Edit serials -> "Published on" and "Expected on" fields. - Subscription details -> Renew -> "Start date" field in the popup window. - Subscription details -> Edit subscription -> Page 2 -> "First issue publication date," "Subscription start date," and "Subscription end date" fields. - Locate a subscription with manual history enabled. From the subscription detail page, click the "Planning" tab, then "Edit history" -> Linked fields "Subscription start date" and "Subscription end date." Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- .../prog/en/modules/serials/checkexpiration.tt | 2 +- .../intranet-tmpl/prog/en/modules/serials/claims.tt | 4 ++-- .../prog/en/modules/serials/serials-edit.tt | 10 ++++------ .../prog/en/modules/serials/serials-search.tt | 2 +- .../prog/en/modules/serials/subscription-add.tt | 8 ++++---- .../prog/en/modules/serials/subscription-batchedit.tt | 2 +- .../prog/en/modules/serials/subscription-history.tt | 4 ++-- .../en/modules/serials/subscription-numberpatterns.tt | 2 +- .../prog/en/modules/serials/subscription-renew.tt | 2 +- 9 files changed, 17 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt index cdd8861dae..42f2f42626 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt @@ -54,7 +54,7 @@ [% END %]
  • - + Required
    [% INCLUDE 'date-format.inc' %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt index c3f588a665..cab4dc9eda 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -93,9 +93,9 @@
    1. - + - + [% INCLUDE 'date-format.inc' %] Clear filter diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index 781ac6b168..4be920bdc0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -62,8 +62,6 @@ $(document).ready(function() { } return true; }); - - $(".datepicker").datepicker(); }); //]]> @@ -143,13 +141,13 @@ $(document).ready(function() { Issue - + - + [% IF ( serialslis.editdisable ) %] @@ -306,13 +304,13 @@ $(document).ready(function() { Supplemental issue - + - + +
    2. [% INCLUDE 'additional-fields-entry.inc' available=additional_fields_for_subscription values=additional_field_filters wrap_fieldset=0 %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt index 789596e4ec..5de924a268 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt @@ -263,7 +263,7 @@ fieldset.rows table { clear: none; margin: 0; }
  • [% UNLESS (more_than_one_serial) %] - + [% ELSE %] [% firstacquidate | $KohaDates %] @@ -273,7 +273,7 @@ fieldset.rows table { clear: none; margin: 0; } [% IF (more_than_one_serial) %]
  • - +
  • [% END %]
  • @@ -327,11 +327,11 @@ fieldset.rows table { clear: none; margin: 0; }
  • - +
  • - +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt index c6219f9058..360b18e41d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt @@ -142,7 +142,7 @@
  • - +
  • [% FOREACH field IN additional_fields %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt index 23bdbc6d63..56827085ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt @@ -41,14 +41,14 @@ Subscription start date - (start date of the 1st subscription) + (start date of the 1st subscription)
    [% INCLUDE 'date-format.inc' %]
    Subscription end date - (if empty, subscription is still active) + (if empty, subscription is still active)
    [% INCLUDE 'date-format.inc' %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt index 833643aba3..802698e678 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt @@ -200,7 +200,7 @@
  • - +
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt index 7d570fe8ab..3cf27e27a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt @@ -34,7 +34,7 @@
    1. - +
      [% INCLUDE 'date-format.inc' %]
    2. -- 2.39.5