Bugzilla – Attachment 175564 Details for
Bug 31450
HTML customizations and news will not display on OPAC without a publication date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31450: Make additional contents publication date required
Bug-31450-Make-additional-contents-publication-dat.patch (text/plain), 2.59 KB, created by
Martin Renvoize (ashimema)
on 2024-12-16 18:52:46 UTC
(
hide
)
Description:
Bug 31450: Make additional contents publication date required
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-12-16 18:52:46 UTC
Size:
2.59 KB
patch
obsolete
>From d331e0ad6e9dbc0fc80395680356f5e1304d748d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 10 Dec 2024 13:22:33 +0000 >Subject: [PATCH] Bug 31450: Make additional contents publication date required > >HTML customizations and news will not display without a publication >date, so we should make it required. This patch adds client-side >validation of the field to check that it's filled. > >To test, apply the patch and go to Tools -> News (or HTML >customizations, or Pages). > >- Click "New entry" >- Try to submit this new entry without entering a publication date. >- You should be prevented from submitting the form. >- Fill in the publication date and confirm that the form submits > correctly. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/tools/additional-contents.tt | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >index d5537d3928f..6e952e5d0db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt >@@ -220,7 +220,7 @@ > [% END %] > </div> > >- <form id="add_additional_content" method="post" action="/cgi-bin/koha/tools/additional-contents.pl" class="validate"> >+ <form id="add_additional_content" method="post" action="/cgi-bin/koha/tools/additional-contents.pl" class="validated"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="op" value="cud-add_validate" /> > <input type="hidden" name="category" value="[% category | html %]" /> >@@ -260,8 +260,9 @@ > </li> > [% END %] > <li> >- <label for="from">Publication date: </label> >- <input id="from" type="text" name="published_on" size="15" value="[% additional_content.published_on | html %]" class="flatpickr" data-date_to="to" /> >+ <label for="from" class="required">Publication date: </label> >+ <input id="from" type="text" name="published_on" size="15" value="[% additional_content.published_on | html %]" class="flatpickr" data-date_to="to" required="required" class="required" /> >+ <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> >-- >2.47.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 31450
:
139824
|
139825
|
146914
|
146915
|
146925
|
146926
|
146927
|
167754
|
167755
|
167756
|
175350
|
175379
| 175564