From 9db4eb85f3b84f28766e6e6c98d0928477f123d2 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Sat, 19 Jul 2014 16:44:11 -0300 Subject: [PATCH] Bug 12613: Remove CGI::scrolling_list from koha2marclinks.pl This patch removes all (2) instances from koha2marclinks.pl. Also changes dropdowns width on mapping editor, from an ugly ragged right to a fixed width view. To test: 1. Apply the patch 2. Go to Administration > Koha to MARC mapping 3. Pulldown in this view has been replaced, check for regressions: change table type and press Ok, verify you get Koha fields and tag/subfield appropriate for each table. 4. Now press 'Edit' on any field, go into mapping editor 5. Check that all pulldowns show tag/subtags relevant for each group ( 000s ... 900s ) 6. Check that current mapping is displayed correctly 7. Check for regressions: unmap, remap, press Ok, verify, change again. 8. If you can, check display of mapping editor on several browsers, just in case. Signed-off-by: Jonathan Druart I have tested with Firefox/Iceweasel only. Signed-off-by: Katrin Fischer Passes all tests and QA script. Also tested in Chromium. Signed-off-by: Tomas Cohen Arazi --- admin/koha2marclinks.pl | 28 ++-- .../prog/en/modules/admin/koha2marclinks.tt | 137 +++++------------- 2 files changed, 46 insertions(+), 119 deletions(-) diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl index 7ea4f20aae..cb30a24e8e 100755 --- a/admin/koha2marclinks.pl +++ b/admin/koha2marclinks.pl @@ -85,14 +85,10 @@ if ( $op eq 'add_form' ) { { push @marcarray, "$field $tagsubfield - $liblibrarian"; } - my $marclist = CGI::scrolling_list( - -name => 'marc', - -values => \@marcarray, - -default => - "$defaulttagfield $defaulttagsubfield - $defaultliblibrarian", - -size => 1, - -multiple => 0, - ); + my $marclist = { + values => \@marcarray, + default => "$defaulttagfield $defaulttagsubfield - $defaultliblibrarian", + }; $template->param( "marclist$i" => $marclist ); } $template->param( @@ -154,19 +150,13 @@ q|select tagfield,tagsubfield,liblibrarian,kohafield from marc_subfield_structur "$script_name?op=add_form&tablename=$tablename&kohafield=$field"; push( @loop_data, \%row_data ); } + my $tablenames = { + values => [ 'biblio', 'biblioitems', 'items' ], + default => $tablename, + }; $template->param( loop => \@loop_data, - tablename => CGI::scrolling_list( - -name => 'tablename', - -values => [ - 'biblio', - 'biblioitems', - 'items', - ], - -default => $tablename, - -size => 1, - -multiple => 0 - ) + tablename => $tablenames, ); } #---- END $OP eq DEFAULT output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt index aa40731025..aad10bd37c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt @@ -28,105 +28,31 @@ [% IF ( add_form ) %]

Connect [% tablename %].[% kohafield %] to a MARC subfield

Choose and validate 1 MARC subfield for [% tablename %].[% kohafield %]. That will modify all frameworks which is usually what you need, but you have been warned.

-
    -
  1. - - - - [% marclist0 %]
    - -
  2. -
  3. - -
    - - - - [% marclist1 %] -
    - -
  4. -
  5. - - -
    - - - - [% marclist2 %]
    - -
  6. -
  7. - -
    - - - - - [% marclist3 %]
    - -
  8. -
  9. - -
    - - - - - [% marclist4 %]
    - -
  10. -
  11. - -
    - - - - - [% marclist5 %]
    - -
  12. -
  13. - -
    - - - - - [% marclist6 %]
    - -
  14. -
  15. - -
    - - - - - [% marclist7 %]
    - -
  16. -
  17. - -
    - - - - - [% marclist8 %]
    - -
  18. -
  19. - -
    - - - - - [% marclist9 %]
    - -
  20. -
+
+
    + [% FOR i IN [ 0 .. 9 ] %] + [% marclist = "marclist$i" %] +
  1. +
    + + + + + + +
    +
  2. + [% END %] +
+
@@ -144,7 +70,18 @@

Koha to MARC mapping [% tagfield %]

-

[% tablename %]

+

+ + +

-- 2.39.5