Bugzilla – Attachment 130424 Details for
Bug 29515
Don't require title for HTML customizations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29515: Make title for HTML customizations optional
Bug-29515-Make-title-for-HTML-customizations-optio.patch (text/plain), 2.86 KB, created by
Martin Renvoize
on 2022-02-10 10:46:21 UTC
(
hide
)
Description:
Bug 29515: Make title for HTML customizations optional
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2022-02-10 10:46:21 UTC
Size:
2.86 KB
patch
obsolete
>From 3b5befed210086d9e2e1fa5777af288a0f135d49 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 16 Nov 2021 08:35:22 +0000 >Subject: [PATCH] Bug 29515: Make title for HTML customizations optional > >This adds code to make the title field for HTML customizations optional >while it stays mandatory for news entries. > >1) Add a new HTML customization, verify you are forced to enter a title >2) Apply patch >3) Repeat and verify that you can now save without title >4) Add a new news entry >5) Verify that the title field remained mandatory there. > >Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/tools/additional-contents.tt | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 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 0337278569..92fcf23cc9 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 >@@ -199,8 +199,13 @@ > </li> > [% UNLESS languages.size %] > <li> >- <label for="title" class="required">Title: </label> >- <input id="title" size="100" maxlength="250" type="text" name="title_default" value="[% additional_content.title | html %]" required="required" class="required" /> <span class="required">Required</span> >+ [% IF category == 'news' %] >+ <label for="title" class="required">Title: </label> >+ <input id="title" size="100" maxlength="250" type="text" name="title_default" value="[% additional_content.title | html %]" required="required" class="required" /> <span class="required">Required</span> >+ [% ELSE %] >+ <label for="title">Title: </label> >+ <input id="title" size="100" maxlength="250" type="text" name="title_default" value="[% additional_content.title | html %]" /> >+ [% END %] > </li> > [% END %] > <li> >@@ -554,6 +559,7 @@ > <script> > $(document).ready(function() { > $("#tabs").tabs(); >+ [% IF category == 'news' %] > $("#add_additional_content").validate({ > submitHandler: function(form){ > if ( ! $("#title_default").val().length > 0 ) { >@@ -564,6 +570,7 @@ > form.submit(); > } > }); >+ [% END %] > > $("#submit_form").on("click",function(){ > $("#add_additional_content").submit(); >-- >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 29515
:
127861
|
127898
| 130424