From f03000f50f8eeb886a4c33a00eb587147210fc30 Mon Sep 17 00:00:00 2001 From: Christopher Hall Date: Mon, 15 Nov 2010 16:06:24 +1300 Subject: [PATCH] Bug 5462: modified intranet scripts to match templates Signed-off-by: Colin Campbell --- admin/auth_subfields_structure.pl | 4 ++-- admin/auth_tag_structure.pl | 6 +++--- admin/branches.pl | 12 ++++++------ admin/marc_subfields_structure.pl | 4 ++-- admin/marctagstructure.pl | 6 +++--- admin/systempreferences.pl | 26 +++++++++++++------------- reserve/request.pl | 2 +- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index cee3312c34..432d49667f 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -370,8 +370,8 @@ if ($op eq 'add_form') { $row_data{row} = $i; push(@loop_data, \%row_data); } - $template->param('use-heading-flags-p' => 1); - $template->param('heading-edit-subfields-p' => 1); + $template->param('use_heading_flags_p' => 1); + $template->param('heading_edit_subfields_p' => 1); $template->param(action => "Edit subfields", tagfield => $tagfield, tagfieldinput => "", diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index b6ae347271..27c48e9bf2 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -120,13 +120,13 @@ if ($op eq 'add_form') { if ($searchfield) { $template->param(action => "Modify tag", searchfield => "$searchfield"); - $template->param('heading-modify-tag-p' => 1); + $template->param('heading_modify_tag_p' => 1); } else { $template->param(action => "Add tag", searchfield => ""); - $template->param('heading-add-tag-p' => 1); + $template->param('heading_add_tag_p' => 1); } - $template->param('use-heading-flags-p' => 1); + $template->param('use_heading_flags_p' => 1); $template->param(liblibrarian => $data->{'liblibrarian'}, libopac => $data->{'libopac'}, repeatable => "".$data->{'repeatable'}, diff --git a/admin/branches.pl b/admin/branches.pl index 758fa32f4a..f4bcf661ad 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -76,14 +76,14 @@ $template->param( ($op || 'else') => 1 ); if ( $op eq 'add' ) { # If the user has pressed the "add new branch" button. - $template->param( 'heading-branches-add-branch-p' => 1 ); + $template->param( 'heading_branches_add_branch_p' => 1 ); editbranchform($branchcode,$template); } elsif ( $op eq 'edit' ) { # if the user has pressed the "edit branch settings" button. - $template->param( 'heading-branches-add-branch-p' => 0, + $template->param( 'heading_branches_add_branch_p' => 0, 'add' => 1, ); editbranchform($branchcode,$template); } @@ -103,7 +103,7 @@ elsif ( $op eq 'add_validate' ) { if ($existing > 0) { $mod_branch = 0; _branch_to_template($params, $template); # preserve most (FIXME) of user's input - $template->param( 'heading-branches-add-branch-p' => 1, 'add' => 1, 'ERROR1' => 1 ); + $template->param( 'heading_branches_add_branch_p' => 1, 'add' => 1, 'ERROR1' => 1 ); } } if ($mod_branch) { @@ -113,7 +113,7 @@ elsif ( $op eq 'add_validate' ) { # copy input parameters back to form # FIXME - doing this doesn't preserve any branch group selections, but good enough for now editbranchform($branchcode,$template); - $template->param( 'heading-branches-add-branch-p' => 1, 'add' => 1, "ERROR$error" => 1 ); + $template->param( 'heading_branches_add_branch_p' => 1, 'add' => 1, "ERROR$error" => 1 ); } else { $template->param( else => 1); default("MESSAGE2",$template); @@ -160,7 +160,7 @@ elsif ( $op eq 'delete_confirmed' ) { elsif ( $op eq 'editcategory' ) { # If the user has pressed the "add new category" or "modify" buttons. - $template->param( 'heading-branches-edit-category-p' => 1 ); + $template->param( 'heading_branches_edit_category_p' => 1 ); editcatform($categorycode,$template); } elsif ( $op eq 'addcategory_validate' ) { @@ -221,7 +221,7 @@ sub default { my $innertemplate = shift or return; $innertemplate->param($message => 1) if $message; $innertemplate->param( - 'heading-branches-p' => 1, + 'heading_branches_p' => 1, ); branchinfotable("",$innertemplate); } diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index 372a8114c6..0049376da4 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -364,8 +364,8 @@ if ( $op eq 'add_form' ) { $row_data{row} = $j; push( @loop_data, \%row_data ); } - $template->param( 'use-heading-flags-p' => 1 ); - $template->param( 'heading-edit-subfields-p' => 1 ); + $template->param( 'use_heading_flags_p' => 1 ); + $template->param( 'heading_edit_subfields_p' => 1 ); $template->param( action => "Edit subfields", tagfield => $tagfield, diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index a20f77c132..92e0d99b19 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -118,12 +118,12 @@ if ($op eq 'add_form') { if ($searchfield) { $template->param(searchfield => $searchfield); $template->param(action => "Modify tag"); - $template->param('heading-modify-tag-p' => 1); + $template->param('heading_modify_tag_p' => 1); } else { $template->param(action => "Add tag"); - $template->param('heading-add-tag-p' => 1); + $template->param('heading_add_tag_p' => 1); } - $template->param('use-heading-flags-p' => 1); + $template->param('use_heading_flags_p' => 1); $template->param(liblibrarian => $data->{'liblibrarian'}, libopac => $data->{'libopac'}, repeatable => CGI::checkbox(-name=>'repeatable', diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 9ff009dbeb..2ed39139f0 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -486,30 +486,30 @@ sub GetPrefParams { $params->{'prefoptions'} = $data->{'options'}; if ( not defined( $data->{'type'} ) ) { - $params->{'type-free'} = 1; + $params->{'type_free'} = 1; $params->{'fieldlength'} = ( defined( $data->{'options'} ) and $data->{'options'} and $data->{'options'} > 0 ); } elsif ( $data->{'type'} eq 'Upload' ) { - $params->{'type-upload'} = 1; + $params->{'type_upload'} = 1; } elsif ( $data->{'type'} eq 'Choice' ) { - $params->{'type-choice'} = 1; + $params->{'type_choice'} = 1; } elsif ( $data->{'type'} eq 'YesNo' ) { - $params->{'type-yesno'} = 1; + $params->{'type_yesno'} = 1; $data->{'value'} = C4::Context->boolean_preference( $data->{'variable'} ); if ( defined( $data->{'value'} ) and $data->{'value'} eq '1' ) { - $params->{'value-yes'} = 1; + $params->{'value_yes'} = 1; } else { - $params->{'value-no'} = 1; + $params->{'value_no'} = 1; } } elsif ( $data->{'type'} eq 'Integer' || $data->{'type'} eq 'Float' ) { - $params->{'type-free'} = 1; + $params->{'type_free'} = 1; $params->{'fieldlength'} = ( defined( $data->{'options'} ) and $data->{'options'} and $data->{'options'} > 0 ) ? $data->{'options'} : 10; } elsif ( $data->{'type'} eq 'Textarea' ) { - $params->{'type-textarea'} = 1; + $params->{'type_textarea'} = 1; $data->{options} =~ /(.*)\|(.*)/; $params->{'cols'} = $1; $params->{'rows'} = $2; } elsif ( $data->{'type'} eq 'Themes' ) { - $params->{'type-choice'} = 1; + $params->{'type_choice'} = 1; my $type = ''; ( $data->{'variable'} =~ m#opac#i ) ? ( $type = 'opac' ) : ( $type = 'intranet' ); @options = (); @@ -527,7 +527,7 @@ sub GetPrefParams { $counter++; } } elsif ( $data->{'type'} eq 'ClassSources' ) { - $params->{'type-choice'} = 1; + $params->{'type_choice'} = 1; my $type = ''; @options = (); my $sources = GetClassSources(); @@ -564,13 +564,13 @@ sub GetPrefParams { my $languages_loop = getTranslatedLanguages( $interface, $theme, $lang, $currently_selected_languages ); $params->{'languages_loop'} = $languages_loop; - $params->{'type-langselector'} = 1; + $params->{'type_langselector'} = 1; } else { - $params->{'type-free'} = 1; + $params->{'type_free'} = 1; $params->{'fieldlength'} = ( defined( $data->{'options'} ) and $data->{'options'} and $data->{'options'} > 0 ) ? $data->{'options'} : 30; } - if ( $params->{'type-choice'} || $params->{'type-free'} || $params->{'type-yesno'} ) { + if ( $params->{'type_choice'} || $params->{'type_free'} || $params->{'type_yesno'} ) { $params->{'oneline'} = 1; } diff --git a/reserve/request.pl b/reserve/request.pl index 7e513648eb..a31b6e2135 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -330,7 +330,7 @@ foreach my $biblionumber (@biblionumbers) { foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } ) { my $item = $iteminfos_of->{$itemnumber}; - unless (C4::Context->preference('item-level_itypes')) { + unless (C4::Context->preference('item_level_itypes')) { $item->{itype} = $biblioitem->{itemtype}; } -- 2.39.5