Bug 21706: (follow-up) remove unused template params
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 29 Oct 2018 13:51:39 +0000 (10:51 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Nov 2018 19:39:04 +0000 (16:39 -0300)
The original patch removed the need to add URLs to the template
variables. This patch removes that in the controller.

Bonus: fixes 'html' filter in URL replacing it by 'uri'.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

admin/auth_tag_structure.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt

index 3852ea6..b66cbff 100755 (executable)
@@ -197,9 +197,6 @@ if ($op eq 'add_form') {
         $row_data{repeatable}       = $results->[$i]{'repeatable'};
         $row_data{mandatory}        = $results->[$i]{'mandatory'};
         $row_data{authorised_value} = $results->[$i]{'authorised_value'};
-        $row_data{subfield_link}    = "auth_subfields_structure.pl?tagfield=" . $results->[$i]{'tagfield'} . "&amp;authtypecode=" . $authtypecode;
-        $row_data{edit}             = "$script_name?op=add_form&amp;searchfield=" . $results->[$i]{'tagfield'} . "&amp;authtypecode=" . $authtypecode;
-        $row_data{delete}           = "$script_name?op=delete_confirm&amp;searchfield=" . $results->[$i]{'tagfield'} . "&amp;authtypecode=" . $authtypecode;
         push(@loop_data, \%row_data);
     }
     $template->param(loop => \@loop_data,
index 25872c6..76f75d5 100644 (file)
 [% IF ( else ) %]
 
 <div id="toolbar" class="btn-toolbar">
-    <div class="btn-group"><a class="btn btn-default btn-sm" id="newtag" href="/cgi-bin/koha/admin/auth_tag_structure.pl?op=add_form&amp;authtypecode=[% authtypecode | html %]"><i class="fa fa-plus"></i> New tag</a></div>
+    <div class="btn-group"><a class="btn btn-default btn-sm" id="newtag" href="/cgi-bin/koha/admin/auth_tag_structure.pl?op=add_form&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-plus"></i> New tag</a></div>
 </div>
 
 <h2>Select an authority framework</h2>