From e8096e8b40d59ffb9c1d34fc7e0b98849df161a1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 19 Jan 2018 14:13:48 -0300 Subject: [PATCH] Bug 19289: Use jQuery validate plugin This is quite dirty but rewrite the JS checks is out of the scope of this bug report. --- .../prog/en/modules/acqui/neworderempty.tt | 33 +++++++++++++--------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index ac11d67959..79a55b99f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -14,6 +14,7 @@ actTotal = ""; function Check(ff) { + [% IF (AcqCreateItemOrdering) %] // Remove last itemblock if it is not in items_list var lastitemblock = $("#outeritemblock > div:last"); @@ -34,11 +35,6 @@ function Check(ff) { _alertString +="-------------------------------------------------------------------\n\n"; - if ( isNull(ff.title,1) && isNull(ff.entertitle,1) ){ - ok=1; - _alertString += "\n- " + _("Title cannot be empty"); - } - if(isNull(ff.budget_id,1)){ ok=1; _alertString += "\n- "+ _("You must select a fund"); @@ -260,7 +256,7 @@ $(document).ready(function() [% END %] -
+
Patrons @@ -313,8 +309,8 @@ $(document).ready(function() Title [% title |html %] [% ELSE %] - - + + Required [% END %] @@ -708,20 +704,24 @@ $(document).ready(function() [% INCLUDE 'intranet-bottom.inc' %] [% BLOCK display_subfield %] - [% IF field.mandatory %] - - [% ELSE %] - - [% END %] + [% IF field.authorised_value %] [% SWITCH field.authorised_value %] [% CASE 'branches' %] + [% IF field.mandatory %] + + [% END %] [% PROCESS options_for_libraries libraries => Branches.all( selected => "FIXME" ) %] [% CASE 'itemtypes' %] + [% IF field.mandatory %] + + [% END %] [% PROCESS options_for_itemtypes itemtypes => ItemTypes.Get(), selected_itemtype => "FIXME" %] @@ -730,7 +730,12 @@ $(document).ready(function() [% PROCESS 'av-build-dropbox.inc' name="bib_field_value", category=field.authorised_value, default="FIXME" %] [% END %] [% ELSE %] - + [% IF field.mandatory %] + + [% ELSE %] + + [% END %] + [% END %] -- 2.11.0