From 35f8bafd6aeebead1913061fdb4e0ea35af02198 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 14 Feb 2014 15:51:26 -0500 Subject: [PATCH] Bug 11770 - Use validation plugin when creating new road type Content-Type: text/plain; charset="utf-8" The page for adding a new road type includes some custom form validation JavaScript which can be removed in favor of HTML5 validation attributes and Koha's built-in validation plugin. This patch does so. To test, apply the patch and go to Administration -> Road types -> New road type. Try submitting the form without entering a road type. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing road type should also work correctly. --- .../prog/en/modules/admin/roadtype.tt | 44 +++----------------- 1 file changed, 5 insertions(+), 39 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt index 526b445..03f67c0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/roadtype.tt @@ -1,41 +1,6 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › [% IF ( add_form ) %]Road types › [% IF ( roadtypeid ) %] Modify road type[% ELSE %] New road type[% END %][% ELSE %][% IF ( delete_confirm ) %]Road types › Confirm deletion of road type[% ELSE %] Road type[% END %][% END %] [% INCLUDE 'doc-head-close.inc' %] - [% INCLUDE 'header.inc' %] @@ -55,7 +20,7 @@

New road type

[% END %] -
+ @@ -67,12 +32,13 @@ [% END %]
  • - - + + Required
  • - Cancel + + Cancel
    [% END %] -- 1.7.9.5