https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42398

--- Comment #9 from David Nind <[email protected]> ---
Created attachment 198917
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198917&action=edit
Bug 42398: Reimplement form validation to news

This patch reimplements form validation on news (additional contents). The
form.validate() call which adds a submitHandler is moved outside the document
ready block in order to work again.
Markup like class=required is added to meet JS10 guidelines. JS alerts (when
default title or default content was empty) were replaced by setting focus the
required field.

Test plan:

a) go to /cgi-bin/koha/tools/additional-contents.pl?category=news (Tools ->
News)
b) click either 'New entry' or 'New entry using text editor'
c) enter a required publication date
d) save the form. You will not be required to enter a default title or content.
e) apply patch followed by a restart_all
f) go to /cgi-bin/koha/tools/additional-contents.pl?category=news (Tools ->
News)
g) click either 'New entry' or 'New entry using text editor'
h) check that title and content in the 'Default' tab are marked as required
i) try to send form f.e. when only title and content in 'English' tab are set
j) check if default title or content is missing the default tab is shown and
the field gets focused

Signed-off-by: David Nind <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to