From 10694092dd01b7b70840b58d39e49f2743864549 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 20 Apr 2016 09:36:20 -0400 Subject: [PATCH] Bug 16308 - Remove the use of "onclick" from Z39.50/SRU servers template MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch removes the use of event attributes in the markup in favor of attaching events in JavaScript. This patch also revises the SRU search fields mapping template considerably while correcting multiple HTML validation issues: - Corrected label/id pairs. - Corrected incorrect capitalization. - Removed redundant - Restructured form so that it displays in two columns. Also changed in the z3950 servers template: Replaced empty [% script_name %] variable with actual path. To test, apply the patch and go to Administration -> Z39.50/SRU servers/ - In the list of servers, select Actions -> Delete. You should be prompted to confirm your choice. Test both confirming and cancelling. - Create or edit an SRU server. - After entering text in the server name field, moving to the next field should trigger transformation of that text to upper case. - On the SRU Search fields mapping line, clicking the "Modify" button should trigger a popup. - In the "Modify SRU search fields mapping" popup: - The fields should display in two columns. - All labels should be correctly associated with corresponding inputs. Followed test plan, works as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- .../prog/en/modules/admin/sru_modmapping.tt | 98 ++++++++++--------- .../prog/en/modules/admin/z3950servers.tt | 39 +++++--- 2 files changed, 76 insertions(+), 61 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt index 94da00682d..363ec5eb9a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › SRU Search fields mapping +Koha › SRU search fields mapping [% INCLUDE 'doc-head-close.inc' %] @@ -116,10 +123,12 @@ [% ELSE %]

New [% PROCESS ServerType %] server

- [% END %] + [% END %]
    -
  1. +
  2. + +
  3. Required [% IF (server.servertype||type) == 'sru' %] @@ -191,7 +200,7 @@
  4. - +
  5. [% END %]
  6. @@ -224,7 +233,7 @@ [% FOREACH loo IN loop %] - [% loo.servername %][% loo.host %]:[% loo.port %][% loo.db %][% loo.userid %][% IF loo.password %]########[% END %][% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %][% loo.rank %] + [% loo.servername %][% loo.host %]:[% loo.port %][% loo.db %][% loo.userid %][% IF loo.password %]########[% END %][% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %][% loo.rank %] [% loo.syntax %][% loo.encoding %][% loo.timeout %] [% IF ( loo.recordtype == 'biblio' ) %] Bibliographic @@ -238,9 +247,9 @@ Actions -- 2.39.5