Bugzilla – Attachment 135191 Details for
Bug 29828
If no content is added to default, but a translation, news/additional content entries don't show in list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29828: Prevent additional content to be created without default
Bug-29828-Prevent-additional-content-to-be-created.patch (text/plain), 2.06 KB, created by
Marcel de Rooy
on 2022-05-19 06:35:12 UTC
(
hide
)
Description:
Bug 29828: Prevent additional content to be created without default
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-05-19 06:35:12 UTC
Size:
2.06 KB
patch
obsolete
>From 0e304aeff8a1ecd1a1a2ed74c643353343a09ff5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Jan 2022 10:15:35 +0100 >Subject: [PATCH] Bug 29828: Prevent additional content to be created without > default >Content-Type: text/plain; charset=utf-8 > >When creating or editing an additional content, the form is submitted if >only the title of the 'default' tab is filled in. >We should submit the form only if both title and content exist. > >Test plan: >Create a new content using text editor (codemirror) >Confirm that the form is submitted only if title and content from the >default tab are not empty >Try again with wysiwyg (tinymce) > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/tools/additional-contents.tt | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >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 62f8c5febb..5b1ea8a746 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 >@@ -574,6 +574,18 @@ > alert(_("Please specify a title for 'Default'")); > return false; > } >+ else { >+ [% UNLESS wysiwyg %] >+ let content = $('#content_default').siblings(".CodeMirror")[0].CodeMirror.getValue(); >+ [% ELSE %] >+ let content = tinyMCE.get('content_default').getContent(); >+ [% END %] >+ >+ if ( ! content.length > 0 ) { >+ alert(__("Please specify a content for 'Default'")); >+ return false; >+ } >+ } > > form.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 29828
:
129239
|
135097
|
135162
| 135191