From ceeeffb95e65c72d63f16d81a41afdc1cb8e4a19 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Fri, 4 Apr 2014 20:37:54 -0300 Subject: [PATCH] Bug 11508: fix untranslatable pull-down in auth_subfields_structure.pl This patch replaces occurrences of CGI::scrolling_list with untranslatable labels. It also fixes capitalization. To test 1. Go to Administration > Authority types, click 'MARC structure' of any auth type, click 'subfields' for any Tag >= 010, clic 'Edit subfields' Check pulldowns 'Managed in tab' and 'Select to display or not' 2. Apply the patch 3. Reload and verify functionality of both pulldowns 4. Check that strings are not present on staff PO file egrep "^msgid \"(Show all|Hide all|ignore)" misc/translator/po/fi-FI-i-staff-t-prog-v-3006000.po 5. Update language file (cd misc/translator/; perl translate update fi-FI) 6. Check that strings are now present, repeat 4. Signed-off-by: Mark Tompsett NOTE: drop-downs work identically. Show all, Hide all, and ignore were added to the po files too. Signed-off-by: Katrin Fischer Passes all tests and QA script. Works as described and improves the page to manage authority subfields. Signed-off-by: Galen Charlton (cherry picked from commit 4a32a188ae0a1bf189d3e1a4865051400c39b31e) Signed-off-by: Fridolin Somers --- admin/auth_subfields_structure.pl | 43 ++++--------------- .../modules/admin/auth_subfields_structure.tt | 33 +++++++++++++- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index fb0e59c7c0..321e54c1ac 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -140,41 +140,14 @@ if ($op eq 'add_form') { my %row_data; # get a fresh hash for the row data $row_data{defaultvalue} = $data->{defaultvalue}; - $row_data{tab} = CGI::scrolling_list(-name=>'tab', - -id=>"tab$i", - -values => - [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ], - -labels => { - '-1' => 'ignore', - '0' => '0', - '1' => '1', - '2' => '2', - '3' => '3', - '4' => '4', - '5' => '5', - '6' => '6', - '7' => '7', - '8' => '8', - '9' => '9', - }, - -default=>$data->{'tab'}, - -size=>1, - -tabindex=>'', - -multiple=>0, - ); - $row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden', - -id=>"ohidden$i", - #-values=>['0','1','2'], - #-labels => {'0'=>'Show','1'=>'Show Collapsed', - # '2' =>'Hide', - # }, - -values=>['0','-5'], - -labels => {'0'=>'Show All','-5'=>'Hide All',}, - -default=>$data->{'hidden'}, - #-default=>"-5", - -size=>1, - -multiple=>0, - ); + $row_data{tab} = { + id => "tab$i", + default => $data->{'tab'}, + }; + $row_data{ohidden} = { + id => "ohidden$i", + default => $data->{'hidden'} + }; #$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden', # -id=>"ihidden$i", # -values=>['0','1','2'], diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt index 3d221929d7..94d53bf4f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt @@ -88,12 +88,41 @@ function displayMoreConstraint(numlayer){
  • [% loo.mandatory %] 
  • -
  • [% loo.tab %] (ignore means that the subfield does not display in the record editor)
  • +
  • + + (ignore means that the subfield does not display in the record editor) +
  • Display
      -
    1. [% loo.ohidden %]
    2. +
    3. + +
    -- 2.39.5