Bugzilla – Attachment 183724 Details for
Bug 36136
Flatpickr allows selecting date from the past on copied serial subscriptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36136: Add validation to subscription end date
0001-Bug-36136-Add-validation-to-subscription-end-date.patch (text/plain), 1.50 KB, created by
Olli Kautonen
on 2025-07-03 08:03:20 UTC
(
hide
)
Description:
Bug 36136: Add validation to subscription end date
Filename:
MIME Type:
Creator:
Olli Kautonen
Created:
2025-07-03 08:03:20 UTC
Size:
1.50 KB
patch
obsolete
>From 056e1c074f1e233e14ee02cf16f8e9d33ddb2830 Mon Sep 17 00:00:00 2001 >From: Olli Kautonen <bhm503@myy.haaga-helia.fi> >Date: Thu, 3 Jul 2025 09:06:00 +0300 >Subject: [PATCH] Bug 36136: Add validation to subscription end date > >Fixed an issue where editing an existing subscription as a duplicate would result in being able to select the end date before the start date. > >To test: > >1)In Koha go to Serials >2)Search for existing subscriptions >3)Select a subscription >4)Select Edit, Edit as new(duplicate) >5)On the second page set the end date before the start date >6)When pressing save subscription a warning pops up, preventing you from selecting the end date before the start date. > >Sponsored-by: Koha-Suomi Oy >--- > koha-tmpl/intranet-tmpl/prog/js/subscription-add.js | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >index 1a7b10774b..93d72a35c8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >@@ -149,7 +149,13 @@ function Check_page2() { > } > return false; > } >- >+ // Validate that enddate is later than acqui_date >+ const acquiDate = new Date($("#acqui_date").val()); >+ const endDate = new Date($("input[name='enddate']").val()); >+ if (endDate < acquiDate) { >+ alert( __("End date must be after the first publication date") ); >+ return false; >+ } > return true; > } > >-- >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 36136
: 183724