diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index e79a0ae447..f77543bfff 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -122,7 +122,7 @@ if ($op eq ""){ # # 3rd step = import the records # -} elsif ( $op eq 'import_records' ) { +} elsif ( $op eq 'cud-import_records' ) { #import selected lines $template->param('basketno' => $cgiparams->{'basketno'}); # Budget_id is mandatory for adding an order, we just add a default, the user needs to modify this aftewards diff --git a/acqui/basket.pl b/acqui/basket.pl index 33253aad47..21055a4b89 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -118,7 +118,7 @@ $template->param( skip_confirm_reopen => 1) if $confirm_pref eq '2'; my @messages; -if ( $op eq 'delete_confirm' ) { +if ( $op eq 'cud-delete_confirm' ) { output_and_exit( $query, $cookie, $template, 'insufficient_permission' ) unless $logged_in_patron->has_permission( { acquisition => 'delete_baskets' } ); @@ -162,7 +162,7 @@ if ( $op eq 'delete_confirm' ) { ); } elsif ( !$bookseller ) { $template->param( NO_BOOKSELLER => 1 ); -} elsif ($op eq 'export') { +} elsif ($op eq 'cud-export') { print $query->header( -type => 'text/csv', -attachment => 'basket' . $basket->{'basketno'} . '.csv', @@ -170,7 +170,7 @@ if ( $op eq 'delete_confirm' ) { my $csv_profile_id = $query->param('csv_profile'); print GetBasketAsCSV( scalar $query->param('basketno'), $query, $csv_profile_id ); # if no csv_profile_id passed, using default rows exit; -} elsif ($op eq 'email') { +} elsif ($op eq 'cud-email') { my $err = eval { SendAlerts( 'orderacquisition', scalar $query->param('basketno'), 'ACQORDER' ); }; @@ -227,13 +227,13 @@ if ( $op eq 'delete_confirm' ) { } elsif ( $op eq 'ediorder' ) { edi_close_and_order() -} elsif ( $op eq 'mod_users' ) { +} elsif ( $op eq 'cud-mod_users' ) { my $basketusers_ids = $query->param('users_ids'); my @basketusers = split( /:/, $basketusers_ids ); ModBasketUsers($basketno, @basketusers); print $query->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=$basketno"); exit; -} elsif ( $op eq 'mod_branch' ) { +} elsif ( $op eq 'cud-mod_branch' ) { my $branch = $query->param('branch'); $branch = undef if(defined $branch and $branch eq ''); ModBasket({ diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 38f7b6b44c..58fdb57630 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -252,7 +252,7 @@ my $rs = $schema->resultset('VendorEdiAccount')->search( { vendor_id => $booksellerid, } ); $template->param( ediaccount => ($rs->count > 0)); -if ( $op eq "add" ) { +if ( $op eq "cud-add" ) { # # if no param('basketgroupid') is not defined, adds a new basketgroup # else, edit (if it is open) or display (if it is close) the basketgroup basketgroupid @@ -300,7 +300,7 @@ if ( $op eq "add" ) { my $basketgroups = &GetBasketgroups($booksellerid); my $baskets = &GetBasketsByBookseller($booksellerid); displaybasketgroups($basketgroups, $bookseller, $baskets); -} elsif ($op eq 'mod_basket') { +} elsif ($op eq 'cud-mod_basket') { # # edit an individual basket contained in this basketgroup # @@ -324,7 +324,7 @@ if ( $op eq "add" ) { my $basketgroupid = $input->param('basketgroupid'); printbasketgrouppdf($basketgroupid); exit; -}elsif ( $op eq "export" ) { +}elsif ( $op eq "cud-export" ) { # # export a closed basketgroup in csv # @@ -336,7 +336,7 @@ if ( $op eq "add" ) { ); print GetBasketGroupAsCSV( $basketgroupid, $input ); exit; -}elsif( $op eq "delete"){ +}elsif( $op eq "cud-delete"){ # # delete an closed basketgroup # @@ -352,7 +352,7 @@ if ( $op eq "add" ) { ReOpenBasketgroup($basketgroupid); my $redirectpath = ((defined $input->param('mode'))&& ($input->param('mode') eq 'singlebg')) ?'/cgi-bin/koha/acqui/basketgroup.pl?op=add&basketgroupid='.$basketgroupid.'&booksellerid='.$booksellerid : '/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' .$booksellerid.'&listclosed=1'; print $input->redirect($redirectpath); -} elsif ( $op eq 'attachbasket') { +} elsif ( $op eq 'cud-attachbasket') { # # save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page # diff --git a/acqui/basketheader.pl b/acqui/basketheader.pl index 4cf1736715..70a424941f 100755 --- a/acqui/basketheader.pl +++ b/acqui/basketheader.pl @@ -135,7 +135,7 @@ if ( $op eq 'add_form' ) { $template->param( deliveryplace => $deliveryplace ); #End Edit -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { #we are confirming the changes, save the basket if ( $is_an_edit ) { ModBasketHeader( diff --git a/acqui/duplicate_orders.pl b/acqui/duplicate_orders.pl index d37b3f3240..7f36f544a9 100755 --- a/acqui/duplicate_orders.pl +++ b/acqui/duplicate_orders.pl @@ -32,7 +32,7 @@ use Koha::DateUtils qw( dt_from_string ); my $input = CGI->new; my $basketno = $input->param('basketno'); -my $op = $input->param('op') || 'search'; # search, select, batch_edit +my $op = $input->param('op') || 'cud-search'; # search, select, batch_edit my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( { @@ -81,7 +81,7 @@ $filters->{to_placed_on} = $to_placed_on; my ( @result_order_loop, @selected_order_loop ); my @ordernumbers = split ',', scalar $input->param('ordernumbers') || ''; -if ( $op eq 'select' ) { +if ( $op eq 'cud-select' ) { # Set filter for 'all status' if ( $filters->{orderstatus} eq "any" ) { @@ -98,7 +98,7 @@ if ( $op eq 'select' ) { ? @{ C4::Acquisition::GetHistory( ordernumbers => \@ordernumbers ) } : (); } -elsif ( $op eq 'batch_edit' ) { +elsif ( $op eq 'cud-batch_edit' ) { @ordernumbers = $input->multi_param('ordernumber'); # build budget list @@ -126,7 +126,7 @@ elsif ( $op eq 'batch_edit' ) { budget_loop => $budget_loop, ); } -elsif ( $op eq 'do_duplicate' ) { +elsif ( $op eq 'cud-do_duplicate' ) { my @fields_to_copy = $input->multi_param('copy_existing_value'); my $default_values; diff --git a/acqui/edifactmsgs.pl b/acqui/edifactmsgs.pl index 72b429f585..47a1316eb5 100755 --- a/acqui/edifactmsgs.pl +++ b/acqui/edifactmsgs.pl @@ -37,7 +37,7 @@ my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( my $schema = Koha::Database->new()->schema(); my $cmd = $q->param('op'); -if ( $cmd && $cmd eq 'delete' ) { +if ( $cmd && $cmd eq 'cud-delete' ) { my $id = $q->param('message_id'); my $msg = $schema->resultset('EdifactMessage')->find($id); $msg->deleted(1); diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl index 571cbeb132..4b51e27aa8 100755 --- a/acqui/histsearch.pl +++ b/acqui/histsearch.pl @@ -58,7 +58,7 @@ use Koha::AdditionalFields; use Koha::DateUtils qw( dt_from_string ); my $input = CGI->new; -my $do_search = $input->param('do_search') || 0; +my $do_search = $input->param('cud-do_search') || 0; my $dbh = C4::Context->dbh; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( diff --git a/acqui/invoice-files.pl b/acqui/invoice-files.pl index d4e43cfc83..a026a00a5d 100755 --- a/acqui/invoice-files.pl +++ b/acqui/invoice-files.pl @@ -83,7 +83,7 @@ else { datereceived => $details->{'datereceived'}, ); - if ( $op eq 'upload' ) { + if ( $op eq 'cud-upload' ) { my $uploaded_file = $input->upload('uploadfile'); if ($uploaded_file) { @@ -107,7 +107,7 @@ else { else { $errors{'no_file'} = 1; } - } elsif ( $op eq 'delete' ) { + } elsif ( $op eq 'cud-delete' ) { $mf->DelFile( id => scalar $input->param('file_id') ); } diff --git a/acqui/invoice.pl b/acqui/invoice.pl index b9d1bf5d0b..6e7724c749 100755 --- a/acqui/invoice.pl +++ b/acqui/invoice.pl @@ -97,7 +97,7 @@ elsif ( $op && $op eq 'reopen' ) { exit 0; } } -elsif ( $op && $op eq 'mod' ) { +elsif ( $op && $op eq 'cud-mod' ) { my $shipmentcost = $input->param('shipmentcost'); my $shipment_budget_id = $input->param('shipment_budget_id'); my $invoicenumber = $input->param('invoicenumber'); @@ -141,7 +141,7 @@ elsif ( $op && $op eq 'mod' ) { $template->param( modified => 1 ); } -elsif ( $op && $op eq 'delete' ) { +elsif ( $op && $op eq 'cud-delete' ) { output_and_exit( $input, $cookie, $template, 'insufficient_permission' ) unless $logged_in_patron->has_permission( { acquisition => 'delete_invoices' } ); @@ -180,7 +180,7 @@ elsif ( $op && $op eq 'del_adj' ) { $del_adj->delete(); } } -elsif ( $op && $op eq 'mod_adj' ) { +elsif ( $op && $op eq 'cud-mod_adj' ) { output_and_exit( $input, $cookie, $template, 'insufficient_permission' ) unless $logged_in_patron->has_permission( { acquisition => 'edit_invoices' } ); diff --git a/acqui/invoices.pl b/acqui/invoices.pl index 5cf2e338aa..dce1a4d668 100755 --- a/acqui/invoices.pl +++ b/acqui/invoices.pl @@ -80,7 +80,7 @@ for my $field (@additional_fields) { } my $invoices = []; -if ( $op and $op eq 'do_search' ) { +if ( $op and $op eq 'cud-do_search' ) { @{$invoices} = GetInvoices( invoicenumber => $invoicenumber, supplierid => $supplierid, @@ -142,7 +142,7 @@ $template->{'VARS'}->{'budgets_loop'} = \@budgets_loop; $template->param( openedinvoices => \@openedinvoices, closedinvoices => \@closedinvoices, - do_search => ( $op and $op eq 'do_search' ) ? 1 : 0, + do_search => ( $op and $op eq 'cud-do_search' ) ? 1 : 0, invoices => $invoices, invoicenumber => $invoicenumber, booksellerid => $supplierid, diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 6e8dbb9269..479fe47fa5 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -84,7 +84,7 @@ if ( $delay and not $delay =~ /^\d{1,3}$/ ) { push @errors, {delay_digits => 1, bad_delay => $delay}; } -if ($op and $op eq "send_alert"){ +if ($op and $op eq "cud-send_alert"){ my @ordernums = $input->multi_param("ordernumber"); my $err; eval { diff --git a/acqui/moddeliverydate.pl b/acqui/moddeliverydate.pl index 975fccdb95..f90cfb552e 100755 --- a/acqui/moddeliverydate.pl +++ b/acqui/moddeliverydate.pl @@ -53,7 +53,7 @@ my $order = GetOrder($ordernumber); my $basket = GetBasket($order->{basketno}); my $bookseller = Koha::Acquisition::Booksellers->find( $basket->{booksellerid} ); -if($op and $op eq 'save') { +if($op and $op eq 'cud-save') { my $estimated_delivery_date = $input->param('estimated_delivery_date'); $order->{'estimated_delivery_date'} = $estimated_delivery_date ? dt_from_string( $estimated_delivery_date ) : undef; ModOrder($order); diff --git a/acqui/modordernotes.pl b/acqui/modordernotes.pl index 258fb63c6a..eabfa123f1 100755 --- a/acqui/modordernotes.pl +++ b/acqui/modordernotes.pl @@ -52,7 +52,7 @@ my $basket = GetBasket($order->{basketno}); my $bookseller = Koha::Acquisition::Booksellers->find( $basket->{booksellerid} ); -if($op and $op eq 'save') { +if($op and $op eq 'cud-save') { my $ordernotes = $input->param('ordernotes'); if ($type eq "vendor") { $order->{'order_vendornote'} = $ordernotes; diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index d8192292f2..550e41e810 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -202,7 +202,7 @@ foreach my $budget (@{$budgets}) { $template->{'VARS'}->{'budget_loops'} = \%budget_loops; my $op = $input->param('op'); -if ($op and $op eq 'edit'){ +if ($op and $op eq 'cud-edit'){ $template->param(edit => 1); } output_html_with_http_headers $input, $cookie, $template->output; diff --git a/acqui/parcels.pl b/acqui/parcels.pl index 985947ef56..d8ab1f499e 100755 --- a/acqui/parcels.pl +++ b/acqui/parcels.pl @@ -83,7 +83,7 @@ my $input = CGI->new; my $booksellerid = $input->param('booksellerid'); my $order = $input->param('orderby') || 'shipmentdate desc'; my $startfrom = $input->param('startfrom'); -my $code = $input->param('filter'); +my $code = $input->param('cud-filter'); my $datefrom = $input->param('datefrom'); my $dateto = $input->param('dateto'); my $resultsperpage = $input->param('resultsperpage'); diff --git a/acqui/supplier.pl b/acqui/supplier.pl index bd988551de..2de890d08f 100755 --- a/acqui/supplier.pl +++ b/acqui/supplier.pl @@ -88,7 +88,7 @@ if ( $op eq 'display' ) { vendor => $supplier, contracts => $contracts, ); -} elsif ( $op eq 'delete' ) { +} elsif ( $op eq 'cud-delete' ) { # no further message needed for the user # the DELETE button only appears in the template if basketcount == 0 AND subscriptioncount == 0 if ( $supplier->baskets->count == 0 && $supplier->subscriptions->count == 0) { diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index 1fa15be7b8..36a71ee47e 100755 --- a/acqui/transferorder.pl +++ b/acqui/transferorder.pl @@ -116,7 +116,7 @@ if( $basketno && $ordernumber) { } else { # Search for booksellers to transfer from/to $op = '' unless $op; - if( $op eq "do_search" ) { + if( $op eq "cud-do_search" ) { my $booksellers = Koha::Acquisition::Booksellers->search( { name => { -like => "%$query%" } }, { order_by => { -asc => 'name' } } ); diff --git a/acqui/uncertainprice.pl b/acqui/uncertainprice.pl index 770f8fc22f..f03dea0562 100755 --- a/acqui/uncertainprice.pl +++ b/acqui/uncertainprice.pl @@ -80,7 +80,7 @@ my $pendingorders = SearchOrders({ }); my @orders = grep { $_->{'uncertainprice'} } @$pendingorders; -if ( $op eq 'validate' ) { +if ( $op eq 'cud-validate' ) { $template->param( validate => 1); my $count = scalar(@orders); for (my $i=0; $i < $count; $i++) { diff --git a/acqui/vendor_issues.pl b/acqui/vendor_issues.pl index bee05028a7..143ef0d9e6 100755 --- a/acqui/vendor_issues.pl +++ b/acqui/vendor_issues.pl @@ -53,9 +53,9 @@ unless ($vendor) { exit; } -if ( $op eq 'add_form' || $op eq 'show' ) { +if ( $op eq 'add_form' || $op eq 'cud-show' ) { $template->param( issue => $issue ); -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $type = $input->param('type'); my $started_on = $input->param('started_on'); my $ended_on = $input->param('ended_on'); @@ -92,9 +92,9 @@ if ( $op eq 'add_form' || $op eq 'show' ) { }; } $op = 'list'; -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { $template->param( issue => $issue ); -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { try { $issue->delete; push @messages, { type => 'message', code => 'success_on_delete' }; diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index d596cbf227..6913adecee 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -85,7 +85,7 @@ $template->param( publicationyear => $publicationyear, ); -if ( $op ne "do_search" ) { +if ( $op ne "cud-do_search" ) { my $schema = Koha::Database->new()->schema(); my $rs = $schema->resultset('Z3950server')->search( { @@ -98,7 +98,7 @@ if ( $op ne "do_search" ) { ); $template->param( serverloop => [ $rs->all ], - opsearch => "search", + opsearch => "cud-search", ); output_html_with_http_headers $input, $cookie, $template->output; exit; diff --git a/admin/additional-fields.pl b/admin/additional-fields.pl index 35dd1a97b1..dcc26ae02f 100755 --- a/admin/additional-fields.pl +++ b/admin/additional-fields.pl @@ -47,7 +47,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $field_id = $input->param('field_id'); my @messages; -if ( $op eq 'add' ) { +if ( $op eq 'cud-add' ) { my $name = $input->param('name') // q{}; my $authorised_value_category = $input->param('authorised_value_category'); my $marcfield = $input->param('marcfield') // q{}; @@ -69,7 +69,7 @@ if ( $op eq 'add' ) { $updated = $af->store ? 1 : 0; }; push @messages, { - code => 'update', + code => 'cud-update', number => $updated, }; } elsif ( $name ) { @@ -88,26 +88,26 @@ if ( $op eq 'add' ) { $inserted = $af->store ? 1 : 0; }; push @messages, { - code => 'insert', + code => 'cud-insert', number => $inserted, }; } else { push @messages, { - code => 'insert', + code => 'cud-insert', number => 0, }; } $op = 'list'; } -if ( $op eq 'delete' ) { +if ( $op eq 'cud-delete' ) { my $deleted = 0; eval { my $af = Koha::AdditionalFields->find($field_id); $deleted = $af->delete; }; push @messages, { - code => 'delete', + code => 'cud-delete', number => $deleted, }; $op = 'list'; diff --git a/admin/adveditorshortcuts.pl b/admin/adveditorshortcuts.pl index 0fbe51c160..8ca9969a90 100755 --- a/admin/adveditorshortcuts.pl +++ b/admin/adveditorshortcuts.pl @@ -54,7 +54,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $shortcuts = Koha::KeyboardShortcuts->search(); -if ( $op eq 'save' ) { +if ( $op eq 'cud-save' ) { my @shortcut_names = $input->multi_param('shortcut_name'); my @shortcut_keys = $input->multi_param('shortcut_keys'); my %updated_shortcuts; diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index 861f303da3..35a5522ac2 100755 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -109,7 +109,7 @@ if ( $op eq 'add_form' ) { } # IF-MOD } -elsif ( $op eq 'add_validate' ) { +elsif ( $op eq 'cud-add_validate' ) { ## add or modify a budget period (confirmation) ## update budget period data @@ -145,7 +145,7 @@ elsif ( $op eq 'add_validate' ) { } #-------------------------------------------------- -elsif ( $op eq 'delete_confirm' ) { +elsif ( $op eq 'cud-delete_confirm' ) { ## delete a budget period (preparation) my $funds = GetBudgets({ budget_period_id => $budget_period_id }); my $fund_count = scalar @$funds; @@ -161,7 +161,7 @@ elsif ( $op eq 'delete_confirm' ) { ); } -elsif ( $op eq 'delete_confirmed' ) { +elsif ( $op eq 'cud-delete_confirmed' ) { ## confirm no funds have been added to budget my $funds = GetBudgets({ budget_period_id => $budget_period_id }); my $fund_count = scalar @$funds; @@ -186,7 +186,7 @@ elsif ( $op eq 'duplicate_form'){ } # handle the actual duplication -elsif ( $op eq 'duplicate_budget' ){ +elsif ( $op eq 'cud-duplicate_budget' ){ die "please specify a budget period id\n" if( !defined $budget_period_id || $budget_period_id eq '' ); my $budget_period_startdate = $input->param('budget_period_startdate'); @@ -253,7 +253,7 @@ elsif ( $op eq 'close_form' ) { ); } -elsif ( $op eq 'close_confirmed' ) { +elsif ( $op eq 'cud-close_confirmed' ) { my $to_budget_period_id = $input->param('to_budget_period_id'); my $move_remaining_unspent = $input->param('move_remaining_unspent'); my $report = MoveOrders( diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index 4ed48d47d1..e32b3533a3 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -185,7 +185,7 @@ if ($op eq 'add_form') { #---------------------- DEFAULT DISPLAY BELOW --------------------- # called by default form, used to confirm deletion of data in DB -} elsif ($op eq 'delete_confirm') { +} elsif ($op eq 'cud-delete_confirm') { my $budget = GetBudget($budget_id); $template->param( @@ -196,14 +196,14 @@ if ($op eq 'add_form') { ); # END $OP eq DELETE_CONFIRM # called by delete_confirm, used to effectively confirm deletion of data in DB -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { if ( BudgetHasChildren( $budget_id ) ) { # We should never be here, the interface does not provide this action. die("Delete a fund with children is not possible"); } my $rc = DelBudget($budget_id); $op = 'list'; -} elsif( $op eq 'add_validate' ) { +} elsif( $op eq 'cud-add_validate' ) { my @budgetusersid; if (defined $budget_users_ids){ @budgetusersid = split(':', $budget_users_ids); diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl index def0339d28..46954ea026 100755 --- a/admin/aqcontract.pl +++ b/admin/aqcontract.pl @@ -90,7 +90,7 @@ if ( $op eq 'add_form' ) { # END $OP eq ADD_FORM } #ADD_VALIDATE: called by add_form, used to insert/modify data in DB -elsif ( $op eq 'add_validate' ) { +elsif ( $op eq 'cud-add_validate' ) { ## Please see file perltidy.ERR $template->param( add_validate => 1 ); @@ -129,7 +129,7 @@ elsif ( $op eq 'add_validate' ) { # END $OP eq ADD_VALIDATE } #DELETE_CONFIRM: called by default form, used to confirm deletion of data in DB -elsif ( $op eq 'delete_confirm' ) { +elsif ( $op eq 'cud-delete_confirm' ) { $template->param( delete_confirm => 1 ); my $contract = GetContract( { contractnumber => $contractnumber } ); @@ -145,7 +145,7 @@ elsif ( $op eq 'delete_confirm' ) { # END $OP eq DELETE_CONFIRM } #DELETE_CONFIRMED: called by delete_confirm, used to effectively confirm deletion of data in DB -elsif ( $op eq 'delete_confirmed' ) { +elsif ( $op eq 'cud-delete_confirmed' ) { my $deleted = DelContract( { contractnumber => $contractnumber } ); if ( $deleted ) { diff --git a/admin/aqplan.pl b/admin/aqplan.pl index cbded1ca64..899791b269 100755 --- a/admin/aqplan.pl +++ b/admin/aqplan.pl @@ -152,7 +152,7 @@ my %labels; my @names = $input->multi_param(); # ------------------------------------------------------------ -if ( $op eq 'save' ) { +if ( $op eq 'cud-save' ) { #get budgets my ( @buds, @auth_values ); foreach my $n (@names) { diff --git a/admin/audio_alerts.pl b/admin/audio_alerts.pl index e28151b8d7..9dad284db4 100755 --- a/admin/audio_alerts.pl +++ b/admin/audio_alerts.pl @@ -32,7 +32,7 @@ my $sound = $cgi->param('sound'); my $id = $cgi->param('id'); my $action = $cgi->param('action'); my $where = $cgi->param('where'); -my @delete = $cgi->multi_param('delete'); +my @delete = $cgi->multi_param('cud-delete'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index e052d023ba..9433b0aa0d 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -146,7 +146,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_FORM ################## ADD_VALIDATE ################################## # called by add_form, used to insert/modify data in DB -} elsif ($op eq 'add_validate') { +} elsif ($op eq 'cud-add_validate') { $template->param(tagfield => "$input->param('tagfield')"); my @tagsubfield = $input->multi_param('tagsubfield'); my @liblibrarian = $input->multi_param('liblibrarian'); @@ -227,7 +227,7 @@ if ($op eq 'add_form') { ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB } -elsif ( $op eq 'delete_confirm' ) { +elsif ( $op eq 'cud-delete_confirm' ) { my $ass = Koha::Authority::Subfields->find( { authtypecode => $authtypecode, @@ -240,7 +240,7 @@ elsif ( $op eq 'delete_confirm' ) { delete_link => $script_name, ); } -elsif ( $op eq 'delete_confirmed' ) { +elsif ( $op eq 'cud-delete_confirmed' ) { Koha::Authority::Subfields->find( { authtypecode => $authtypecode, diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 1c952d58a5..d4b0662588 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -55,7 +55,7 @@ my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authty my $sth; # check that authtype framework is defined in auth_tag_structure if we are on a default action -if (!$op or $op eq 'authtype_create_confirm') { +if (!$op or $op eq 'cud-authtype_create_confirm') { $sth=$dbh->prepare("select count(*) from auth_tag_structure where authtypecode=?"); $sth->execute($authtypecode); my ($authtypeexist) = $sth->fetchrow; @@ -63,7 +63,7 @@ if (!$op or $op eq 'authtype_create_confirm') { } else { # if authtype does not exists, then OP must be changed to "create authtype" if we are not on the way to create it # (op = authtyp_create_confirm) - if ($op eq "authtype_create_confirm") { + if ($op eq "cud-authtype_create_confirm") { duplicate_auth_framework($authtypecode, $existingauthtypecode); } else { $op = "authtype_create"; @@ -72,7 +72,7 @@ if (!$op or $op eq 'authtype_create_confirm') { } $template->param(script_name => $script_name); $template->param(authority_types => $authority_types ); -if ($op && $op ne 'authtype_create_confirm') { +if ($op && $op ne 'cud-authtype_create_confirm') { $template->param($op => 1); } else { $template->param(else => 1); @@ -106,7 +106,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_FORM ################## ADD_VALIDATE ################################## # called by add_form, used to insert/modify data in DB -} elsif ($op eq 'add_validate') { +} elsif ($op eq 'cud-add_validate') { my $tagfield = $input->param('tagfield'); my $liblibrarian = $input->param('liblibrarian'); my $libopac = $input->param('libopac'); @@ -142,7 +142,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_VALIDATE ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB -} elsif ($op eq 'delete_confirm') { +} elsif ($op eq 'cud-delete_confirm') { $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from auth_tag_structure where tagfield=?"); $sth->execute($searchfield); my $data=$sth->fetchrow_hashref; @@ -153,7 +153,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRM ################## DELETE_CONFIRMED ################################## # called by delete_confirm, used to effectively confirm deletion of data in DB -} elsif ($op eq 'delete_confirmed') { +} elsif ($op eq 'cud-delete_confirmed') { $dbh->do(q|delete from auth_tag_structure where tagfield=? and authtypecode=?|, undef, $searchfield, $authtypecode); $dbh->do(q|delete from auth_subfield_structure where tagfield=? and authtypecode=?|, undef, $searchfield, $authtypecode); my $tagfield = $input->param('tagfield'); @@ -180,7 +180,7 @@ if ($op eq 'add_form') { ); ################## DEFAULT ################################## } else { # DEFAULT - # here, $op can be unset or set to "authtype_create_confirm". + # here, $op can be unset or set to "cud-authtype_create_confirm". # warn "authtype : $authtypecode"; if ($searchfield ne '') { $template->param(searchfield => $searchfield); diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index 2130e86819..c40158f15d 100755 --- a/admin/authorised_values.pl +++ b/admin/authorised_values.pl @@ -91,7 +91,7 @@ if ($op eq 'add_form') { branches_loop => \@branches_loop, ); -} elsif ($op eq 'add') { +} elsif ($op eq 'cud-add') { my $new_authorised_value = $input->param('authorised_value'); my $new_category = $input->param('category'); my $image = $input->param( 'image' ) || ''; @@ -149,7 +149,7 @@ if ($op eq 'add_form') { $op = 'list'; $searchfield = $new_category; -} elsif ($op eq 'add_category' ) { +} elsif ($op eq 'cud-add_category' ) { my $new_category = $input->param('category'); my $already_exists = Koha::AuthorisedValueCategories->find( @@ -183,7 +183,7 @@ if ($op eq 'add_form') { } $op = 'list'; -} elsif ($op eq 'delete') { +} elsif ($op eq 'cud-delete') { my $av = Koha::AuthorisedValues->new->find( $id ); my $deleted = eval {$av->delete}; if ( $@ or not $deleted ) { @@ -193,7 +193,7 @@ if ($op eq 'add_form') { } $op = 'list'; -} elsif ($op eq 'delete_category') { +} elsif ($op eq 'cud-delete_category') { my $category_name = $input->param('category_name'); my $avc = Koha::AuthorisedValueCategories->find( $category_name ); my $deleted = eval {$avc->delete}; diff --git a/admin/authtypes.pl b/admin/authtypes.pl index 3fea873e0d..5445c5b7f0 100755 --- a/admin/authtypes.pl +++ b/admin/authtypes.pl @@ -47,7 +47,7 @@ if ( $op eq 'add_form' ) { } $template->param( authority_type => $authority_type ); -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $authtypecode = $input->param('authtypecode'); my $authtypetext = $input->param('authtypetext'); my $auth_tag_to_report = $input->param('auth_tag_to_report'); @@ -82,14 +82,14 @@ if ( $op eq 'add_form' ) { } $op = 'list'; -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { my $authority_type = Koha::Authority::Types->find($authtypecode); my $authorities_using_it = Koha::Authorities->search( { authtypecode => $authtypecode } )->count; $template->param( authority_type => $authority_type, authorities_using_it => $authorities_using_it, ); -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { my $authorities_using_it = Koha::Authorities->search( { authtypecode => $authtypecode } )->count; if ( $authorities_using_it == 0 ) { my $authority_type = Koha::Authority::Types->find($authtypecode); diff --git a/admin/background_jobs.pl b/admin/background_jobs.pl index 6eb05b0f82..6eb4b066c6 100755 --- a/admin/background_jobs.pl +++ b/admin/background_jobs.pl @@ -63,7 +63,7 @@ if ( $op eq 'view' ) { } } -if ( $op eq 'cancel' ) { +if ( $op eq 'cud-cancel' ) { my $id = $input->param('id'); my $job = Koha::BackgroundJobs->find($id); if ( $can_manage_background_jobs diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl index d8988e0ecd..40f5ac83dc 100755 --- a/admin/biblio_framework.pl +++ b/admin/biblio_framework.pl @@ -49,7 +49,7 @@ if ( $op eq 'add_form' ) { $framework = Koha::BiblioFrameworks->find($frameworkcode); } $template->param( framework => $framework ); -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $frameworkcode = $input->param('frameworkcode'); my $frameworktext = $input->param('frameworktext'); my $is_a_modif = $input->param('is_a_modif'); @@ -81,7 +81,7 @@ if ( $op eq 'add_form' ) { $cache->clear_from_cache("MarcSubfieldStructure-$frameworkcode"); $cache->clear_from_cache("MarcCodedFields-$frameworkcode"); $op = 'list'; -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { my $framework = Koha::BiblioFrameworks->find($frameworkcode); my $count = Koha::Biblios->search( { frameworkcode => $frameworkcode, } )->count; @@ -89,7 +89,7 @@ if ( $op eq 'add_form' ) { framework => $framework, biblios_use_this_framework => $count, ); -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { my $framework = Koha::BiblioFrameworks->find($frameworkcode); my $deleted = eval { $framework->delete; }; diff --git a/admin/branches.pl b/admin/branches.pl index 7a6429b08f..59d5a107db 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -163,7 +163,7 @@ if ( $op eq 'add_form' ) { }; } $op = 'list'; -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { my $library = Koha::Libraries->find($branchcode); my $items_count = Koha::Items->search( { -or => { diff --git a/admin/cash_registers.pl b/admin/cash_registers.pl index db55b2aadc..78abf749ad 100755 --- a/admin/cash_registers.pl +++ b/admin/cash_registers.pl @@ -56,7 +56,7 @@ if ( $op eq 'add_form' ) { add_form => 1 ); } -elsif ( $op eq 'add_validate' ) { +elsif ( $op eq 'cud-add_validate' ) { my $name = $cgi->param('name'); $name ||= q{}; my $description = $cgi->param('description'); diff --git a/admin/categories.pl b/admin/categories.pl index 8b436f7463..b928b0649c 100755 --- a/admin/categories.pl +++ b/admin/categories.pl @@ -56,7 +56,7 @@ if ( $op eq 'add_form' ) { { categorycode => $categorycode }, $template ); } } -elsif ( $op eq 'add_validate' ) { +elsif ( $op eq 'cud-add_validate' ) { my $categorycode = $input->param('categorycode'); my $description = $input->param('description'); @@ -75,7 +75,7 @@ elsif ( $op eq 'add_validate' ) { my $can_place_ill_in_opac = $input->param('can_place_ill_in_opac') // 1; my $default_privacy = $input->param('default_privacy'); my $reset_password = $input->param('reset_password'); - my $change_password = $input->param('change_password'); + my $change_password = $input->param('cud-change_password'); my $exclude_from_local_holds_priority = $input->param('exclude_from_local_holds_priority'); my $min_password_length = $input->param('min_password_length'); my $require_strong_password = $input->param('require_strong_password'); @@ -168,7 +168,7 @@ elsif ( $op eq 'add_validate' ) { $searchfield = q||; $op = 'list'; } -elsif ( $op eq 'delete_confirm' ) { +elsif ( $op eq 'cud-delete_confirm' ) { my $count = Koha::Patrons->search({ categorycode => $categorycode @@ -182,7 +182,7 @@ elsif ( $op eq 'delete_confirm' ) { ); } -elsif ( $op eq 'delete_confirmed' ) { +elsif ( $op eq 'cud-delete_confirmed' ) { my $categorycode = uc( $input->param('categorycode') ); my $category = Koha::Patron::Categories->find( $categorycode ); diff --git a/admin/check_parent_total.pl b/admin/check_parent_total.pl index 649f0d6000..95a38328c2 100755 --- a/admin/check_parent_total.pl +++ b/admin/check_parent_total.pl @@ -28,7 +28,7 @@ use C4::Budgets qw( GetBudget GetBudgetPeriod ); This script checks the amount unallocated from the new parent budget , or the period - if no parent_id is given -This script is called from aqbudgets.pl during an 'add' or 'mod' budget, from the JSscript Check() function, +This script is called from aqbudgets.pl during an 'cud-add' or 'cud-mod' budget, from the JSscript Check() function, to determine whether the new parent budget (or period) has enough unallocated funds for the save to complete. =cut diff --git a/admin/cities.pl b/admin/cities.pl index f8a4df6a13..05b9d9670a 100755 --- a/admin/cities.pl +++ b/admin/cities.pl @@ -48,7 +48,7 @@ if ( $op eq 'add_form' ) { } $template->param( city => $city, ); -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $city_name = $input->param('city_name'); my $city_state = $input->param('city_state'); my $city_zipcode = $input->param('city_zipcode'); @@ -83,10 +83,10 @@ if ( $op eq 'add_form' ) { } $city_name = q||; $op = 'list'; -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { my $city = Koha::Cities->find($cityid); $template->param( city => $city, ); -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { my $city = Koha::Cities->find($cityid); my $deleted = eval { $city->delete; }; diff --git a/admin/classsources.pl b/admin/classsources.pl index 59828be04e..65a55d5b88 100755 --- a/admin/classsources.pl +++ b/admin/classsources.pl @@ -64,7 +64,7 @@ if ( $op eq "add_source" ) { split_rules => Koha::ClassSplitRules->search, ); } -elsif ( $op eq "add_source_validate" ) { +elsif ( $op eq "cud-add_source_validate" ) { my $class_source = Koha::ClassSources->find($cn_source); if ($class_source) { $class_source->set( @@ -130,7 +130,7 @@ elsif ( $op eq "add_sort_rule" ) { sort_routines => get_class_sort_routines(), ); } -elsif ( $op eq "add_sort_rule_validate" ) { +elsif ( $op eq "cud-add_sort_rule_validate" ) { my $sort_rule = Koha::ClassSortRules->find($class_sort_rule); if ($sort_rule) { $sort_rule->set( @@ -189,7 +189,7 @@ elsif ( $op eq "add_split_rule" ) { split_routines => get_class_split_routines(), ); } -elsif ( $op eq "add_split_rule_validate" ) { +elsif ( $op eq "cud-add_split_rule_validate" ) { my $split_rule = Koha::ClassSplitRules->find($class_split_rule); @split_regex = grep {!/^$/} @split_regex; # Remove empty diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl index 7fd2c1b18c..b0498d6ad2 100755 --- a/admin/columns_settings.pl +++ b/admin/columns_settings.pl @@ -19,7 +19,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $action = $input->param('action') // 'list'; -if ( $action eq 'save' ) { +if ( $action eq 'cud-save' ) { my $module = $input->param('module'); my @columnids = $input->multi_param("columnid"); my @columns; diff --git a/admin/credit_types.pl b/admin/credit_types.pl index c4a4920257..8f3be0604c 100755 --- a/admin/credit_types.pl +++ b/admin/credit_types.pl @@ -72,7 +72,7 @@ if ( $op eq 'add_form' ) { branches_loop => \@branches_loop ); } -elsif ( $op eq 'add_validate' ) { +elsif ( $op eq 'cud-add_validate' ) { my $description = $input->param('description'); my $can_be_added_manually = $input->param('can_be_added_manually') || 0; my $credit_number_enabled = $input->param('credit_number_enabled') || 0; diff --git a/admin/curbside_pickup.pl b/admin/curbside_pickup.pl index c4ccf467d9..b5abb0e1ec 100755 --- a/admin/curbside_pickup.pl +++ b/admin/curbside_pickup.pl @@ -38,7 +38,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( ); my $libraries = Koha::Libraries->search( {}, { order_by => ['branchname'] } ); -if ( $op eq 'save' ) { +if ( $op eq 'cud-save' ) { foreach my $library ( $libraries->as_list ) { my $branchcode = $library->branchcode; diff --git a/admin/currency.pl b/admin/currency.pl index 28dc2d2673..b706ae0291 100755 --- a/admin/currency.pl +++ b/admin/currency.pl @@ -50,7 +50,7 @@ if ( $op eq 'add_form' ) { } $template->param( currency => $currency, ); -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $currency_code = $input->param('currency_code'); my $symbol = $input->param('symbol'); my $isocode = $input->param('isocode'); @@ -91,7 +91,7 @@ if ( $op eq 'add_form' ) { } $searchfield = q||; $op = 'list'; -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { my $currency = Koha::Acquisition::Currencies->find($currency_code); my $nb_of_orders = Koha::Acquisition::Orders->search( { currency => $currency->currency } )->count; @@ -101,7 +101,7 @@ if ( $op eq 'add_form' ) { nb_of_orders => $nb_of_orders, nb_of_vendors => $nb_of_vendors, ); -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { my $currency = Koha::Acquisition::Currencies->find($currency_code); my $deleted = eval { $currency->delete; }; diff --git a/admin/debit_types.pl b/admin/debit_types.pl index ba14a23010..79a500593f 100755 --- a/admin/debit_types.pl +++ b/admin/debit_types.pl @@ -72,7 +72,7 @@ if ( $op eq 'add_form' ) { branches_loop => \@branches_loop ); } -elsif ( $op eq 'add_validate' ) { +elsif ( $op eq 'cud-add_validate' ) { my $description = $input->param('description'); my $can_be_invoiced = $input->param('can_be_invoiced') || 0; my $can_be_sold = $input->param('can_be_sold') || 0; diff --git a/admin/desks.pl b/admin/desks.pl index 8f6bc7911d..02ec4e5115 100755 --- a/admin/desks.pl +++ b/admin/desks.pl @@ -50,7 +50,7 @@ if ( $op eq 'add_form' ) { } $template->param( desk => $desk, ); -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $desk_id = $input->param('desk_id'); my $desk_name = $input->param('desk_name'); my $branchcode = $input->param('branchcode'); @@ -82,10 +82,10 @@ if ( $op eq 'add_form' ) { } $searchfield = q||; $op = 'list'; -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { my $desk = Koha::Desks->find($desk_id); $template->param( desk => $desk, ); -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { my $desk = Koha::Desks->find($desk_id); my $deleted = eval { $desk->delete; }; diff --git a/admin/edi_accounts.pl b/admin/edi_accounts.pl index 65e3b4e1a2..3048086fb1 100755 --- a/admin/edi_accounts.pl +++ b/admin/edi_accounts.pl @@ -63,12 +63,12 @@ if ( $op eq 'acct_form' ) { $template->param( plugins => \@plugins ); } } -elsif ( $op eq 'delete_confirm' ) { +elsif ( $op eq 'cud-delete_confirm' ) { show_account($crypt); $template->param( delete_confirm => 1 ); } else { - if ( $op eq 'save' ) { + if ( $op eq 'cud-save' ) { # validate & display my $id = $input->param('id'); @@ -105,7 +105,7 @@ else { $schema->resultset('VendorEdiAccount')->create($fields); } } - elsif ( $op eq 'delete_confirmed' ) { + elsif ( $op eq 'cud-delete_confirmed' ) { $schema->resultset('VendorEdiAccount') ->search( { id => scalar $input->param('id'), } )->delete_all; diff --git a/admin/edi_ean_accounts.pl b/admin/edi_ean_accounts.pl index 87ebe458c7..dd305bda13 100755 --- a/admin/edi_ean_accounts.pl +++ b/admin/edi_ean_accounts.pl @@ -54,7 +54,7 @@ if ( $op eq 'ean_form' ) { ean => $e, ); } -elsif ( $op eq 'delete_confirm' ) { +elsif ( $op eq 'cud-delete_confirm' ) { my $e = $schema->resultset('EdifactEan')->find($id); $template->param( delete_confirm => 1, @@ -62,7 +62,7 @@ elsif ( $op eq 'delete_confirm' ) { ); } else { - if ( $op eq 'save' ) { + if ( $op eq 'cud-save' ) { my $change = $id; if ($change) { $schema->resultset('EdifactEan')->find($id)->update( @@ -86,7 +86,7 @@ else { $new_ean->insert(); } } - elsif ( $op eq 'delete_confirmed' ) { + elsif ( $op eq 'cud-delete_confirmed' ) { my $e = $schema->resultset('EdifactEan')->find($id); $e->delete if $e; } diff --git a/admin/identity_providers.pl b/admin/identity_providers.pl index d663d82890..27622ae8dc 100755 --- a/admin/identity_providers.pl +++ b/admin/identity_providers.pl @@ -50,7 +50,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my @messages; -if ( !$domain_ops && $op eq 'add' ) { +if ( !$domain_ops && $op eq 'cud-add' ) { # IdP configuration params my $code = $input->param('code'); @@ -113,7 +113,7 @@ if ( !$domain_ops && $op eq 'add' ) { # list servers after adding $op = 'list'; } -elsif ( $domain_ops && $op eq 'add' ) { +elsif ( $domain_ops && $op eq 'cud-add' ) { my $allow_opac = $input->param('allow_opac'); my $allow_staff = $input->param('allow_staff'); @@ -155,7 +155,7 @@ elsif ( $domain_ops && $op eq 'add' ) { # list servers after adding $op = 'list'; } -elsif ( !$domain_ops && $op eq 'edit_form' ) { +elsif ( !$domain_ops && $op eq 'cud-edit_form' ) { if ( $identity_provider ) { $template->param( @@ -171,7 +171,7 @@ elsif ( !$domain_ops && $op eq 'edit_form' ) { }; } } -elsif ( $domain_ops && $op eq 'edit_form' ) { +elsif ( $domain_ops && $op eq 'cud-edit_form' ) { my $identity_provider_domain_id = $input->param('identity_provider_domain_id'); my $identity_provider_domain; @@ -192,7 +192,7 @@ elsif ( $domain_ops && $op eq 'edit_form' ) { }; } } -elsif ( !$domain_ops && $op eq 'edit_save' ) { +elsif ( !$domain_ops && $op eq 'cud-edit_save' ) { if ( $identity_provider ) { @@ -243,7 +243,7 @@ elsif ( !$domain_ops && $op eq 'edit_save' ) { }; } } -elsif ( $domain_ops && $op eq 'edit_save' ) { +elsif ( $domain_ops && $op eq 'cud-edit_save' ) { my $identity_provider_domain_id = $input->param('identity_provider_domain_id'); my $identity_provider_domain; diff --git a/admin/ill_batch_statuses.pl b/admin/ill_batch_statuses.pl index b6b9721fc2..b46b5d0a13 100755 --- a/admin/ill_batch_statuses.pl +++ b/admin/ill_batch_statuses.pl @@ -51,7 +51,7 @@ if ( $op eq 'add_form' ) { if ($status) { $template->param( status => $status ); } -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $name = $input->param('name'); my $code = $input->param('code'); @@ -75,7 +75,7 @@ if ( $op eq 'add_form' ) { push @messages, { type => 'error', code => 'error_on_saving' }; }; $op = 'list'; -} elsif ( $op eq 'delete' ) { +} elsif ( $op eq 'cud-delete' ) { try { $status->delete_and_log; push @messages, { code => 'success_on_delete', type => 'message' }; diff --git a/admin/import_export_authtype.pl b/admin/import_export_authtype.pl index e12bcc7887..a30b2ce411 100755 --- a/admin/import_export_authtype.pl +++ b/admin/import_export_authtype.pl @@ -41,10 +41,10 @@ unless ($auth_status eq 'ok') { } my $authtypecode = $input->param('authtypecode') || 'default'; -my $action = $input->param('action') || 'export'; +my $action = $input->param('action') || 'cud-export'; ## Exporting -if ($action eq 'export' && $input->request_method() eq 'GET') { +if ($action eq 'cud-export' && $input->request_method() eq 'GET') { my $strXml = ''; my $format = $input->param('type_export_' . $authtypecode); if ($authtypecode eq 'default') { diff --git a/admin/import_export_framework.pl b/admin/import_export_framework.pl index 9973eb9c08..47b5a037d0 100755 --- a/admin/import_export_framework.pl +++ b/admin/import_export_framework.pl @@ -41,10 +41,10 @@ unless ($auth_status eq 'ok') { } my $frameworkcode = $input->param('frameworkcode') || 'default'; -my $action = $input->param('action') || 'export'; +my $action = $input->param('action') || 'cud-export'; ## Exporting -if ($action eq 'export' && $input->request_method() eq 'GET') { +if ($action eq 'cud-export' && $input->request_method() eq 'GET') { my $strXml = ''; my $format = $input->param('type_export_' . $frameworkcode); if ($frameworkcode eq 'default') { diff --git a/admin/item_circulation_alerts.pl b/admin/item_circulation_alerts.pl index 8e79982928..7a9b32243f 100755 --- a/admin/item_circulation_alerts.pl +++ b/admin/item_circulation_alerts.pl @@ -109,7 +109,7 @@ sub dispatch { toggle => \&toggle, ); my $input = CGI->new; - my $action = $input->param('action') || 'show'; + my $action = $input->param('action') || 'cud-show'; if (not exists $handler{$action}) { my $status = 400; print $input->header(-status => $status); diff --git a/admin/items_search_field.pl b/admin/items_search_field.pl index 35ee482091..caaefe6a28 100755 --- a/admin/items_search_field.pl +++ b/admin/items_search_field.pl @@ -36,7 +36,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ my $op = $cgi->param('op') || ''; my $name = $cgi->param('name'); -if ($op eq 'mod') { +if ($op eq 'cud-mod') { my %vars = $cgi->Vars; my $field = { name => $name }; my @params = qw(label tagfield tagsubfield authorised_values_category); @@ -48,7 +48,7 @@ if ($op eq 'mod') { my $updated = ($field) ? 1 : 0; print $cgi->redirect('/cgi-bin/koha/admin/items_search_fields.pl?updated=' . $updated); exit; -} elsif ( $op eq 'add' ) { +} elsif ( $op eq 'cud-add' ) { my %vars = $cgi->Vars; my $field; my @params = qw(name label tagfield tagsubfield authorised_values_category); diff --git a/admin/items_search_fields.pl b/admin/items_search_fields.pl index c9e7d9380c..1cfc051d9b 100755 --- a/admin/items_search_fields.pl +++ b/admin/items_search_fields.pl @@ -35,7 +35,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ my $op = $cgi->param('op') || ''; -if ($op eq 'del') { +if ($op eq 'cud-del') { my $name = $cgi->param('name'); my $rv = DelItemSearchField($name); if ($rv) { diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index 44e9ad5445..698a0c00dc 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -70,7 +70,7 @@ if ( $op eq 'add_form' ) { searchcategory => $searchcategory, can_be_translated => ( scalar(@$translated_languages) > 1 ? 1 : 0 ), ); -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $is_a_modif = $input->param('is_a_modif'); my $itemtype = Koha::ItemTypes->find($itemtype_code); my $parent_type = $input->param('parent_type') || undef; @@ -173,7 +173,7 @@ if ( $op eq 'add_form' ) { $searchfield = ''; $op = 'list'; - } elsif ( $op eq 'delete_confirm' ) { + } elsif ( $op eq 'cud-delete_confirm' ) { my $itemtype = Koha::ItemTypes->find($itemtype_code); my $can_be_deleted = $itemtype->can_be_deleted(); if ($can_be_deleted == 0) { @@ -183,7 +183,7 @@ if ( $op eq 'add_form' ) { $template->param( itemtype => $itemtype, ); } -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { my $itemtype = Koha::ItemTypes->find($itemtype_code); my $deleted = eval { $itemtype->delete }; diff --git a/admin/library_groups.pl b/admin/library_groups.pl index 239f3ead76..be46eacb99 100755 --- a/admin/library_groups.pl +++ b/admin/library_groups.pl @@ -41,7 +41,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $action = $cgi->param('action') || q{}; my @messages; -if ( $action eq 'add' ) { +if ( $action eq 'cud-add' ) { my $parent_id = $cgi->param('parent_id') || undef; my $title = $cgi->param('title') || undef; my $description = $cgi->param('description') || undef; @@ -81,7 +81,7 @@ if ( $action eq 'add' ) { } } } -elsif ( $action eq 'edit' ) { +elsif ( $action eq 'cud-edit' ) { my $id = $cgi->param('id') || undef; my $title = $cgi->param('title') || undef; my $description = $cgi->param('description') || undef; @@ -111,7 +111,7 @@ elsif ( $action eq 'edit' ) { $template->param( edited => $group ); } } -elsif ( $action eq 'delete' ) { +elsif ( $action eq 'cud-delete' ) { my $id = $cgi->param('id'); my $group = Koha::Library::Groups->find($id); diff --git a/admin/marc-overlay-rules.pl b/admin/marc-overlay-rules.pl index 6c737b49a7..73ac254d30 100755 --- a/admin/marc-overlay-rules.pl +++ b/admin/marc-overlay-rules.pl @@ -37,11 +37,11 @@ my $rule_from_cgi = sub { my %rule = map { $_ => scalar $cgi->param($_) } ( 'tag', 'module', - 'filter', - 'add', + 'cud-filter', + 'cud-add', 'append', 'remove', - 'delete' + 'cud-delete' ); my $id = $cgi->param('id'); @@ -84,17 +84,17 @@ if ($op eq 'remove' || $op eq 'doremove') { $rules = $get_rules->(); } } -elsif ($op eq 'edit') { +elsif ($op eq 'cud-edit') { $template->param( edit => 1 ); my $id = $input->param('id'); for my $rule(@{$rules}) { if ($rule->{id} == $id) { - $rule->{'edit'} = 1; + $rule->{'cud-edit'} = 1; last; } } } -elsif ($op eq 'doedit' || $op eq 'add') { +elsif ($op eq 'doedit' || $op eq 'cud-add') { my $rule_data = $rule_from_cgi->($input); if (!@{$errors}) { try { diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index 10f16e182f..5317da5bb4 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -214,7 +214,7 @@ if ( $op eq 'add_form' ) { ################## ADD_VALIDATE ################################## # called by add_form, used to insert/modify data in DB } -elsif ( $op eq 'add_validate' ) { +elsif ( $op eq 'cud-add_validate' ) { my $dbh = C4::Context->dbh; $template->param( tagfield => "$input->param('tagfield')" ); my $tagfield = $input->param('tagfield'); @@ -312,7 +312,7 @@ elsif ( $op eq 'add_validate' ) { ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB } -elsif ( $op eq 'delete_confirm' ) { +elsif ( $op eq 'cud-delete_confirm' ) { my $mss = Koha::MarcSubfieldStructures->find( { tagfield => $tagfield, @@ -329,7 +329,7 @@ elsif ( $op eq 'delete_confirm' ) { ################## DELETE_CONFIRMED ################################## # called by delete_confirm, used to effectively confirm deletion of data in DB } -elsif ( $op eq 'delete_confirmed' ) { +elsif ( $op eq 'cud-delete_confirmed' ) { Koha::MarcSubfieldStructures->find( { tagfield => $tagfield, diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index fbb955db41..1d48076f0f 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -63,7 +63,7 @@ my ($frameworkexist) = $sth->fetchrow; unless ($frameworkexist) { # if frameworkcode does not exists, then OP must be changed to "create framework" if we are not on the way to create it # (op = itemtyp_create_confirm) - if ($op eq "framework_create_confirm") { + if ($op eq "cud-framework_create_confirm") { duplicate_framework($frameworkcode, $existingframeworkcode); $op = ""; # unset $op to go back to framework list } else { @@ -110,7 +110,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_FORM ################## ADD_VALIDATE ################################## # called by add_form, used to insert/modify data in DB -} elsif ($op eq 'add_validate') { +} elsif ($op eq 'cud-add_validate') { my $tagfield = $input->param('tagfield'); my $liblibrarian = $input->param('liblibrarian'); my $libopac = $input->param('libopac'); @@ -160,7 +160,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_VALIDATE ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB -} elsif ($op eq 'delete_confirm') { +} elsif ($op eq 'cud-delete_confirm') { $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,ind1_defaultvalue,ind2_defaultvalue from marc_tag_structure where tagfield=? and frameworkcode=?"); $sth->execute($searchfield, $frameworkcode); my $data = $sth->fetchrow_hashref; @@ -171,7 +171,7 @@ if ($op eq 'add_form') { # END $OP eq DELETE_CONFIRM ################## DELETE_CONFIRMED ################################## # called by delete_confirm, used to effectively confirm deletion of data in DB -} elsif ($op eq 'delete_confirmed') { +} elsif ($op eq 'cud-delete_confirmed') { my $sth1 = $dbh->prepare("DELETE FROM marc_tag_structure WHERE tagfield=? AND frameworkcode=?"); my $sth2 = $dbh->prepare("DELETE FROM marc_subfield_structure WHERE tagfield=? AND frameworkcode=?"); $sth1->execute($searchfield, $frameworkcode); @@ -198,7 +198,7 @@ if ($op eq 'add_form') { ################## DEFAULT ################################## } else { # DEFAULT - # here, $op can be unset or set to "framework_create_confirm". + # here, $op can be unset or set to "cud-framework_create_confirm". if ($searchfield ne '') { $template->param(searchfield => $searchfield); } diff --git a/admin/oai_set_mappings.pl b/admin/oai_set_mappings.pl index a47dadee4a..cdd9bb3f61 100755 --- a/admin/oai_set_mappings.pl +++ b/admin/oai_set_mappings.pl @@ -49,7 +49,7 @@ my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { my $id = $input->param('id'); my $op = $input->param('op'); -if($op && $op eq "save") { +if($op && $op eq "cud-save") { my @marcfields = $input->multi_param('marcfield'); my @marcsubfields = $input->multi_param('marcsubfield'); my @operators = $input->multi_param('operator'); diff --git a/admin/oai_sets.pl b/admin/oai_sets.pl index 015d713604..fe611953a0 100755 --- a/admin/oai_sets.pl +++ b/admin/oai_sets.pl @@ -46,7 +46,7 @@ my $op = $input->param('op'); if($op && $op eq "new") { $template->param( op_new => 1 ); -} elsif($op && $op eq "savenew") { +} elsif($op && $op eq "cud-savenew") { my $spec = $input->param('spec'); my $name = $input->param('name'); my @descriptions = $input->multi_param('description'); @@ -55,7 +55,7 @@ if($op && $op eq "new") { name => $name, descriptions => \@descriptions }); -} elsif($op && $op eq "mod") { +} elsif($op && $op eq "cud-mod") { my $id = $input->param('id'); my $set = GetOAISet($id); $template->param( @@ -65,7 +65,7 @@ if($op && $op eq "new") { name => $set->{'name'}, descriptions => [ map { {description => $_} } @{ $set->{'descriptions'} } ], ); -} elsif($op && $op eq "savemod") { +} elsif($op && $op eq "cud-savemod") { my $id = $input->param('id'); my $spec = $input->param('spec'); my $name = $input->param('name'); @@ -76,7 +76,7 @@ if($op && $op eq "new") { name => $name, descriptions => \@descriptions }); -} elsif($op && $op eq "del") { +} elsif($op && $op eq "cud-del") { my $id = $input->param('id'); DelOAISet($id); } diff --git a/admin/overdrive.pl b/admin/overdrive.pl index a961b89337..27e2c175cb 100755 --- a/admin/overdrive.pl +++ b/admin/overdrive.pl @@ -39,7 +39,7 @@ our ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -if ( $op && $op eq 'update' ) { +if ( $op && $op eq 'cud-update' ) { my %od_info; @od_info{ @branchcodes } = @authnames; while( my($branchcode,$authname) = each %od_info){ diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index ca5d2fca47..233ea2e189 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -56,11 +56,11 @@ my $display_list = 0; if ($op eq "edit_attribute_type") { edit_attribute_type_form($template, $code); } elsif ($op eq "edit_attribute_type_confirmed") { - $display_list = add_update_attribute_type('edit', $template, $code); + $display_list = add_update_attribute_type('cud-edit', $template, $code); } elsif ($op eq "add_attribute_type") { add_attribute_type_form($template); } elsif ($op eq "add_attribute_type_confirmed") { - $display_list = add_update_attribute_type('add', $template, $code); + $display_list = add_update_attribute_type('cud-add', $template, $code); } elsif ($op eq "delete_attribute_type") { $display_list = delete_attribute_type_form($template, $code); } elsif ($op eq "delete_attribute_type_confirmed") { @@ -126,7 +126,7 @@ sub add_update_attribute_type { my $class = $input->param('class'); my $attr_type = Koha::Patron::Attribute::Types->find($code); - if ( $op eq 'edit' ) { + if ( $op eq 'cud-edit' ) { $attr_type->description($description); } else { @@ -166,7 +166,7 @@ sub add_update_attribute_type { my @branches = grep { ! /^\s*$/ } $input->multi_param('branches'); $attr_type->library_limits( \@branches ); - if ( $op eq 'edit' ) { + if ( $op eq 'cud-edit' ) { $template->param( edited_attribute_type => $attr_type->code() ); } else { diff --git a/admin/preferences.pl b/admin/preferences.pl index 108aaf41d1..e60a7a86de 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -75,8 +75,8 @@ sub _get_chunk { if ( $options{'class'} && $options{'class'} eq 'password' ) { $chunk->{'input_type'} = 'password'; - } elsif ( $options{'class'} && $options{'class'} eq 'email' ) { - $chunk->{'input_type'} = 'email'; + } elsif ( $options{'class'} && $options{'class'} eq 'cud-email' ) { + $chunk->{'input_type'} = 'cud-email'; } elsif ( $options{'class'} && $options{'class'} eq 'date' ) { $chunk->{'dateinput'} = 1; } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) { @@ -120,7 +120,7 @@ sub _get_chunk { $value ||= 0; - $chunk->{'type'} = ( $options{class} && $options{class} eq 'multiple' ) ? 'multiple' : 'select'; + $chunk->{'type'} = ( $options{class} && $options{class} eq 'multiple' ) ? 'multiple' : 'cud-select'; my @values; @values = split /,/, $value if defined($value); @@ -143,7 +143,7 @@ sub _get_chunk { unshift @{ $chunk->{CHOICES} }, { text => '', value => '', - } if $add_blank && $chunk->{type} eq 'select'; + } if $add_blank && $chunk->{type} eq 'cud-select'; } elsif ( $options{'multiple'} ) { my @values; @@ -358,7 +358,7 @@ $tab ||= 'accounting'; # Ideally this should be "local-use" but preferences.pl my $highlighted; -if ( $op eq 'save' ) { +if ( $op eq 'cud-save' ) { output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); foreach my $param ( $input->param() ) { my ( $pref ) = ( $param =~ /pref_(.*)/ ); @@ -376,7 +376,7 @@ if ( $op eq 'save' ) { my @TABS; -if ( $op eq 'search' ) { +if ( $op eq 'cud-search' ) { my $searchfield = $input->param( 'searchfield' ); $searchfield =~ s/\p{IsC}//g; diff --git a/admin/restrictions.pl b/admin/restrictions.pl index 8b3a164036..5ae01ad6f2 100755 --- a/admin/restrictions.pl +++ b/admin/restrictions.pl @@ -51,7 +51,7 @@ if ( $op eq 'add_form') { restriction => scalar Koha::Patron::Restriction::Types->find($code) ); } -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { my $display_text = $input->param('display_text'); my $lift_after_payment = $input->param('lift_after_payment'); @@ -103,11 +103,11 @@ if ( $op eq 'add_form') { my $restriction = Koha::Patron::Restriction::Types->find($code); $restriction->make_default; $op = 'list'; -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { $template->param( restriction => scalar Koha::Patron::Restriction::Types->find($code) ); -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { try { Koha::Patron::Restriction::Types->find($code)->delete; push @messages, { type => 'message', code => 'delete_success' }; diff --git a/admin/search_filters.pl b/admin/search_filters.pl index cdfee223eb..d49ca621fc 100755 --- a/admin/search_filters.pl +++ b/admin/search_filters.pl @@ -38,7 +38,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ my $op = $cgi->param('op') || ''; -if ($op eq 'del') { +if ($op eq 'cud-del') { my $id = $cgi->param('id'); my $sf = Koha::SearchFilters->find($id); $template->param(filter_not_found => 1) unless $sf; diff --git a/admin/share_content.pl b/admin/share_content.pl index 89dd4e0cdb..2035db9dff 100755 --- a/admin/share_content.pl +++ b/admin/share_content.pl @@ -46,7 +46,7 @@ if ($mana_base) { $bad_url = 1 unless (exists($result->{version})); } -if ( $op eq 'save' ) { +if ( $op eq 'cud-save' ) { my $auto_share = $query->param('autosharewithmana') || q{}; my $mana = $query->param('mana'); @@ -59,13 +59,13 @@ if ( $op eq 'save' ) { } } -if ( $op eq 'reset' ) { +if ( $op eq 'cud-reset' ) { C4::Context->set_preference('ManaToken', ''); } -if ( $op eq 'send' && not $bad_url ) { +if ( $op eq 'cud-send' && not $bad_url ) { my $name = $query->param('name'); - my $email = $query->param('email'); + my $email = $query->param('cud-email'); my $content = to_json({name => $name, email => $email}); diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index fd20484c9f..e1aea66aa8 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -67,7 +67,7 @@ my $language = C4::Languages::getlanguage(); my $cache = Koha::Caches->get_instance; $cache->clear_from_cache( Koha::CirculationRules::GUESSED_ITEMTYPES_KEY ); -if ($op eq 'delete') { +if ($op eq 'cud-delete') { my $itemtype = $input->param('itemtype'); my $categorycode = $input->param('categorycode'); @@ -252,7 +252,7 @@ elsif ($op eq 'delete-branch-item') { } } # save the values entered -elsif ( $op eq 'add' ) { +elsif ( $op eq 'cud-add' ) { my $br = $branch; # branch my $bor = $input->param('categorycode'); # borrower category my $itemtype = $input->param('itemtype'); # item type @@ -356,7 +356,7 @@ elsif ( $op eq 'add' ) { ); } -elsif ($op eq "set-branch-defaults") { +elsif ($op eq "cud-set-branch-defaults") { my $categorycode = $input->param('categorycode'); my $patron_maxissueqty = strip_non_numeric( scalar $input->param('patron_maxissueqty') ); my $patron_maxonsiteissueqty = $input->param('patron_maxonsiteissueqty'); @@ -420,7 +420,7 @@ elsif ($op eq "set-branch-defaults") { } ); } -elsif ($op eq "add-branch-cat") { +elsif ($op eq "cud-add-branch-cat") { my $categorycode = $input->param('categorycode'); my $patron_maxissueqty = strip_non_numeric( scalar $input->param('patron_maxissueqty') ); my $patron_maxonsiteissueqty = $input->param('patron_maxonsiteissueqty'); @@ -480,7 +480,7 @@ elsif ($op eq "add-branch-cat") { ); } } -elsif ( $op eq "add-open-article-requests-limit" ) { +elsif ( $op eq "cud-add-open-article-requests-limit" ) { my $categorycode = $input->param('categorycode'); my $open_article_requests_limit = strip_non_numeric( scalar $input->param('open_article_requests_limit') ); @@ -553,7 +553,7 @@ elsif ( $op eq "add-open-article-requests-limit" ) { ); } } -elsif ( $op eq "set-article-request-fee" ) { +elsif ( $op eq "cud-set-article-request-fee" ) { my $category = $input->param('article_request_fee_category'); my $fee = strip_non_numeric( scalar $input->param('article_request_fee') ); @@ -580,7 +580,7 @@ elsif ( $op eq "set-article-request-fee" ) { } ); } -elsif ($op eq "add-branch-item") { +elsif ($op eq "cud-add-branch-item") { my $itemtype = $input->param('itemtype'); my $holdallowed = $input->param('holdallowed'); my $hold_fulfillment_policy = $input->param('hold_fulfillment_policy'); @@ -638,7 +638,7 @@ elsif ($op eq "add-branch-item") { ); } } -elsif ( $op eq 'mod-refund-lost-item-fee-rule' ) { +elsif ( $op eq 'cud-mod-refund-lost-item-fee-rule' ) { my $lostreturn = $input->param('lostreturn'); @@ -689,7 +689,7 @@ elsif ( $op eq 'mod-refund-lost-item-fee-rule' ) { } ); } -} elsif ( $op eq "set-waiting-hold-cancellation" ) { +} elsif ( $op eq "cud-set-waiting-hold-cancellation" ) { my $category = $input->param('waiting_hold_cancellation_category'); my $itemtype = $input->param('waiting_hold_cancellation_itemtype'); @@ -730,9 +730,9 @@ my $refundProcessingFeeRule = Koha::CirculationRules->find({ branchcode => ($bra my $defaultProcessingFeeRule = Koha::CirculationRules->find({ branchcode => undef, rule_name => 'processingreturn' }); $template->param( refundLostItemFeeRule => $refundLostItemFeeRule, - defaultRefundRule => $defaultLostItemFeeRule ? $defaultLostItemFeeRule->rule_value : 'refund', + defaultRefundRule => $defaultLostItemFeeRule ? $defaultLostItemFeeRule->rule_value : 'cud-refund', refundProcessingFeeRule => $refundProcessingFeeRule, - defaultProcessingRefundRule => $defaultProcessingFeeRule ? $defaultProcessingFeeRule->rule_value : 'refund', + defaultProcessingRefundRule => $defaultProcessingFeeRule ? $defaultProcessingFeeRule->rule_value : 'cud-refund', ); my $patron_categories = Koha::Patron::Categories->search({}, { order_by => ['description'] }); diff --git a/admin/sms_providers.pl b/admin/sms_providers.pl index 1677576d94..859712af46 100755 --- a/admin/sms_providers.pl +++ b/admin/sms_providers.pl @@ -44,7 +44,7 @@ my $id = $cgi->param('id'); my $name = $cgi->param('name'); my $domain = $cgi->param('domain'); -if ( $op eq 'add_update' ) { +if ( $op eq 'cud-add_update' ) { if ( $name && $domain ) { if ($id) { my $provider = Koha::SMS::Providers->find($id); @@ -57,7 +57,7 @@ if ( $op eq 'add_update' ) { } } } -elsif ( $op eq 'delete' ) { +elsif ( $op eq 'cud-delete' ) { my $provider = Koha::SMS::Providers->find($id); $provider->delete() if $provider; } diff --git a/admin/smtp_servers.pl b/admin/smtp_servers.pl index 54af62db73..636b4ccaad 100755 --- a/admin/smtp_servers.pl +++ b/admin/smtp_servers.pl @@ -44,7 +44,7 @@ my @messages; my $smtp_servers = Koha::SMTP::Servers->search; -if ( $op eq 'add' ) { +if ( $op eq 'cud-add' ) { my $name = $input->param('smtp_name'); my $host = $input->param('smtp_host'); @@ -88,7 +88,7 @@ if ( $op eq 'add' ) { # list servers after adding $op = 'list'; } -elsif ( $op eq 'edit_form' ) { +elsif ( $op eq 'cud-edit_form' ) { my $smtp_server_id = $input->param('smtp_server_id'); my $smtp_server; @@ -110,7 +110,7 @@ elsif ( $op eq 'edit_form' ) { }; } } -elsif ( $op eq 'edit_save' ) { +elsif ( $op eq 'cud-edit_save' ) { my $smtp_server_id = $input->param('smtp_server_id'); my $smtp_server; diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index d2d1369223..609a06eda4 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -108,7 +108,7 @@ sub GetPrefParams { if ( not defined( $data->{'type'} ) ) { $params->{'type_free'} = 1; $params->{'fieldlength'} = ( defined( $data->{'options'} ) and $data->{'options'} and $data->{'options'} > 0 ); - } elsif ( $data->{'type'} eq 'Upload' ) { + } elsif ( $data->{'type'} eq 'cud-Upload' ) { $params->{'type_upload'} = 1; } elsif ( $data->{'type'} eq 'Choice' ) { $params->{'type_choice'} = 1; @@ -302,7 +302,7 @@ if ( $op eq 'add_form' ) { ################## ADD_VALIDATE ################################## # called by add_form, used to insert/modify data in DB -} elsif ( $op eq 'add_validate' ) { +} elsif ( $op eq 'cud-add_validate' ) { output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); # to handle multiple values my $value; @@ -328,7 +328,7 @@ if ( $op eq 'add_form' ) { } } - if ( $type eq 'Upload' ) { + if ( $type eq 'cud-Upload' ) { my $lgtfh = $input->upload('value'); $value = join '', <$lgtfh>; $value = encode_base64($value); @@ -339,7 +339,7 @@ if ( $op eq 'add_form' ) { exit; ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB -} elsif ( $op eq 'delete_confirm' ) { +} elsif ( $op eq 'cud-delete_confirm' ) { my $value = C4::Context->preference($searchfield); $template->param( searchfield => $searchfield, @@ -349,7 +349,7 @@ if ( $op eq 'add_form' ) { # END $OP eq DELETE_CONFIRM ################## DELETE_CONFIRMED ################################## # called by delete_confirm, used to effectively confirm deletion of data in DB -} elsif ( $op eq 'delete_confirmed' ) { +} elsif ( $op eq 'cud-delete_confirmed' ) { output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' }); C4::Context->delete_preference($searchfield); # END $OP eq DELETE_CONFIRMED diff --git a/admin/transport-cost-matrix.pl b/admin/transport-cost-matrix.pl index 4af34aa9c5..1930e45a26 100755 --- a/admin/transport-cost-matrix.pl +++ b/admin/transport-cost-matrix.pl @@ -37,7 +37,7 @@ my ($template, $loggedinuser, $cookie) }); my $use_transport_cost_matrix = C4::Context->preference("UseTransportCostMatrix"); -my $update = ( $input->param('op') // '' ) eq 'set-cost-matrix'; +my $update = ( $input->param('op') // '' ) eq 'cud-set-cost-matrix'; my ($cost_matrix, $have_matrix); unless ($update) { diff --git a/admin/usage_statistics.pl b/admin/usage_statistics.pl index 582e92aa1e..5288d6327d 100755 --- a/admin/usage_statistics.pl +++ b/admin/usage_statistics.pl @@ -35,7 +35,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $op = $query->param('op') || q||; -if ( $op eq 'update' ) { +if ( $op eq 'cud-update' ) { my $UsageStats = $query->param('UsageStats'); my $UsageStatsCountry = $query->param('UsageStatsCountry'); my $UsageStatsLibraryName = $query->param('UsageStatsLibraryName'); diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl index d7dd4161c5..e5f564f8b3 100755 --- a/admin/z3950servers.pl +++ b/admin/z3950servers.pl @@ -54,7 +54,7 @@ my $schema = Koha::Database->new()->schema(); # Main code # First process a confirmed delete, or save a validated record -if( $op eq 'delete_confirmed' && $id ) { +if( $op eq 'cud-delete_confirmed' && $id ) { my $server = Koha::Z3950Servers->find($id); if ( $server ) { $server->delete; @@ -63,7 +63,7 @@ if( $op eq 'delete_confirmed' && $id ) { $template->param( msg_notfound => 1, msg_add => $id ); } $id = 0; -} elsif ( $op eq 'add_validated' ) { +} elsif ( $op eq 'cud-add_validated' ) { my @fields=qw/host port db userid password rank syntax encoding timeout recordtype checked servername servertype sru_options sru_fields attributes add_xslt/; @@ -89,11 +89,11 @@ if( $op eq 'delete_confirmed' && $id ) { # Now list multiple records, or edit one record my $data = []; -if ( $op eq 'add' || $op eq 'edit' ) { +if ( $op eq 'cud-add' || $op eq 'cud-edit' ) { $data = ServerSearch( $schema, $id, $searchfield ) if $searchfield || $id; - delete $data->[0]->{id} if @$data && $op eq 'add'; #cloning record + delete $data->[0]->{id} if @$data && $op eq 'cud-add'; #cloning record $template->param( add_form => 1, server => @$data? $data->[0]: undef, - op => $op, type => $op eq 'add'? lc $type: '' ); + op => $op, type => $op eq 'cud-add'? lc $type: '' ); } else { $data = ServerSearch( $schema, $id, $searchfield ); $template->param( loop => \@$data, searchfield => $searchfield, id => $id, diff --git a/authorities/auth_finder.pl b/authorities/auth_finder.pl index c4e3a74664..851195153d 100755 --- a/authorities/auth_finder.pl +++ b/authorities/auth_finder.pl @@ -38,7 +38,7 @@ my $relationship = $query->param('relationship') || ''; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => ( $op eq 'do_search' ) + template_name => ( $op eq 'cud-do_search' ) ? 'authorities/searchresultlist-auth.tt' : 'authorities/auth_finder.tt', query => $query, @@ -50,7 +50,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypetext'] } ); # If search form posted -if ( $op eq "do_search" ) { +if ( $op eq "cud-do_search" ) { my @marclist = $query->multi_param('marclist'); my @and_or = $query->multi_param('and_or'); my @excluding = $query->multi_param('excluding'); diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl index 2d73a6a280..50e9a50213 100755 --- a/authorities/authorities-home.pl +++ b/authorities/authorities-home.pl @@ -47,7 +47,7 @@ my ( $template, $loggedinuser, $cookie ); my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypetext'] } ); my $pending_deletion_authid; -if ( $op eq "delete" ) { +if ( $op eq "cud-delete" ) { ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "authorities/authorities-home.tt", @@ -63,13 +63,13 @@ if ( $op eq "delete" ) { if ( $query->param('operator') ) { # query contains search params so perform search - $op = "do_search"; + $op = "cud-do_search"; } else { $op = ''; } } -if ( $op eq "do_search" ) { +if ( $op eq "cud-do_search" ) { my $marclist = $query->param('marclist') || ''; my $and_or = $query->param('and_or') || ''; my $excluding = $query->param('excluding') || ''; diff --git a/authorities/authorities.pl b/authorities/authorities.pl index bd20fd6374..91ea5d9d2a 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -83,7 +83,7 @@ sub build_authorized_values_list { } return { - type => 'select', + type => 'cud-select', id => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield, name => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield, values => \@authorised_values, @@ -585,7 +585,7 @@ if ($authid) { } $op ||= q{}; #------------------------------------------------------------------------------------------------------------------------------ -if ($op eq "add") { +if ($op eq "cud-add") { #------------------------------------------------------------------------------------------------------------------------------ # rebuild my @tags = $input->multi_param('tag'); @@ -597,7 +597,7 @@ if ($op eq "add") { my $record = TransformHtmlToMarc($input, 0); my ($duplicateauthid,$duplicateauthvalue); - ($duplicateauthid,$duplicateauthvalue) = FindDuplicateAuthority($record,$authtypecode) if ($op eq "add") && (!$is_a_modif); + ($duplicateauthid,$duplicateauthvalue) = FindDuplicateAuthority($record,$authtypecode) if ($op eq "cud-add") && (!$is_a_modif); my $confirm_not_duplicate = $input->param('confirm_not_duplicate'); # it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate) if (!$duplicateauthid or $confirm_not_duplicate) { @@ -621,7 +621,7 @@ if ($op eq "add") { duplicateauthvalue => $duplicateauthvalue->{'authorized'}->[0]->{'heading'}, ); } -} elsif ($op eq "delete") { +} elsif ($op eq "cud-delete") { #------------------------------------------------------------------------------------------------------------------------------ DelAuthority({ authid => $authid }); if ($nonav){ diff --git a/authorities/export.pl b/authorities/export.pl index 0703da840b..70a5157140 100755 --- a/authorities/export.pl +++ b/authorities/export.pl @@ -20,7 +20,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my $op = $query->param("op"); my $format = $query->param("format"); my $error = ''; -if ( $op eq "export" ) { +if ( $op eq "cud-export" ) { my $authid = $query->param("authid"); if ($authid) { diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index 352e90c7ae..d172cb3418 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -82,7 +82,7 @@ if ($email_add) { tables => { borrowers => $borrowernumber, }, - message_transport_type => 'email', + message_transport_type => 'cud-email', loops => \%loops, substitute => \%substitute, ); @@ -96,7 +96,7 @@ if ($email_add) { my $message_id = C4::Letters::EnqueueLetter( { letter => $letter, - message_transport_type => 'email', + message_transport_type => 'cud-email', to_address => $email_add, reply_address => $user_email, attachments => [$attachment], diff --git a/catalogue/export.pl b/catalogue/export.pl index ff02cea67f..d432e17836 100755 --- a/catalogue/export.pl +++ b/catalogue/export.pl @@ -21,7 +21,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ my $op=$query->param("op"); my $format=$query->param("format"); my $error = ''; -if ($op eq "export") { +if ($op eq "cud-export") { my $biblionumber = $query->param("bib"); if ($biblionumber){ my $file_id = $biblionumber; diff --git a/catalogue/search-history.pl b/catalogue/search-history.pl index 42bef7cfd4..883cfcf6a1 100755 --- a/catalogue/search-history.pl +++ b/catalogue/search-history.pl @@ -39,7 +39,7 @@ my $action = $cgi->param('action') || q{list}; my $previous = $cgi->param('previous'); # Deleting search history -if ( $action eq 'delete' ) { +if ( $action eq 'cud-delete' ) { my $sessionid = defined $previous ? $cgi->cookie("CGISESSID") : q{}; diff --git a/catalogue/stockrotation.pl b/catalogue/stockrotation.pl index 27813c02e8..344e0317d7 100755 --- a/catalogue/stockrotation.pl +++ b/catalogue/stockrotation.pl @@ -150,7 +150,7 @@ if (!defined $op) { # Return to items list print $input->redirect("?biblionumber=" . $params{biblionumber}); -} elsif ($op eq "add_item_to_rota") { +} elsif ($op eq "cud-add_item_to_rota") { my $item = Koha::Items->find($params{item_id}); diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index 6987cacbd0..5b092763df 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -58,27 +58,27 @@ for ($damaged,$itemlost,$withdrawn) { my $messages = q{}; # modify MARC item if input differs from items table. -if ( $op eq "set_non_public_note" ) { +if ( $op eq "cud-set_non_public_note" ) { checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); if ((not defined $item_data_hashref->{'itemnotes_nonpublic'}) or $itemnotes_nonpublic ne $item_data_hashref->{'itemnotes_nonpublic'}) { $item->itemnotes_nonpublic($itemnotes_nonpublic); } } -elsif ( $op eq "set_public_note" ) { # i.e., itemnotes parameter passed from form +elsif ( $op eq "cud-set_public_note" ) { # i.e., itemnotes parameter passed from form checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); if ((not defined $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) { $item->itemnotes($itemnotes); } -} elsif ( $op eq "set_lost" && $itemlost ne $item_data_hashref->{'itemlost'}) { +} elsif ( $op eq "cud-set_lost" && $itemlost ne $item_data_hashref->{'itemlost'}) { $item->itemlost($itemlost); -} elsif ( $op eq "set_withdrawn" && $withdrawn ne $item_data_hashref->{'withdrawn'}) { +} elsif ( $op eq "cud-set_withdrawn" && $withdrawn ne $item_data_hashref->{'withdrawn'}) { $item->withdrawn($withdrawn); -} elsif ( $op eq "set_exclude_priority" && $exclude_from_local_holds_priority ne $item_data_hashref->{'exclude_from_local_holds_priority'}) { +} elsif ( $op eq "cud-set_exclude_priority" && $exclude_from_local_holds_priority ne $item_data_hashref->{'exclude_from_local_holds_priority'}) { $item->exclude_from_local_holds_priority($exclude_from_local_holds_priority); $messages = "updated_exclude_from_local_holds_priority=$exclude_from_local_holds_priority&"; -} elsif ( $op eq "set_bookable" && $bookable ne $item_data_hashref->{'bookable'} ) { +} elsif ( $op eq "cud-set_bookable" && $bookable ne $item_data_hashref->{'bookable'} ) { $item->bookable($bookable); -} elsif ( $op eq "set_damaged" && $damaged ne $item_data_hashref->{'damaged'}) { +} elsif ( $op eq "cud-set_damaged" && $damaged ne $item_data_hashref->{'damaged'}) { $item->damaged($damaged); } else { #nothings changed, so do nothing. @@ -88,6 +88,6 @@ elsif ( $op eq "set_public_note" ) { # i.e., itemnotes parameter passed from for $item->store; -LostItem($itemnumber, 'moredetail') if $op eq "set_lost"; +LostItem($itemnumber, 'moredetail') if $op eq "cud-set_lost"; print $cgi->redirect("moredetail.pl?" . $messages . "biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index e84c542092..69c6d6e303 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -517,7 +517,7 @@ my $userflags = 'edit_catalogue'; my $changed_framework = $input->param('changed_framework') // q{}; $frameworkcode = &GetFrameworkCode($biblionumber) - if ( $biblionumber and not( defined $frameworkcode) and $op ne 'addbiblio' ); + if ( $biblionumber and not( defined $frameworkcode) and $op ne 'cud-addbiblio' ); if ($frameworkcode eq 'FA'){ $userflags = 'fast_cataloging'; @@ -551,7 +551,7 @@ if ($frameworkcode eq 'FA'){ 'stickyduedate' => $fa_stickyduedate, 'duedatespec' => $fa_duedatespec, ); -} elsif ( $op ne "delete" && +} elsif ( $op ne "cud-delete" && C4::Context->preference('EnableAdvancedCatalogingEditor') && C4::Auth::haspermission(C4::Context->userenv->{id},{'editcatalogue'=>'advanced_editor'}) && $input->cookie( 'catalogue_editor_' . $loggedinuser ) eq 'advanced' && @@ -657,7 +657,7 @@ if ($biblionumber) { } #------------------------------------------------------------------------------------- -if ( $op eq "addbiblio" ) { +if ( $op eq "cud-addbiblio" ) { #------------------------------------------------------------------------------------- $template->param( biblionumberdata => $biblionumber, @@ -761,7 +761,7 @@ if ( $op eq "addbiblio" ) { ); } } -elsif ( $op eq "delete" ) { +elsif ( $op eq "cud-delete" ) { my $error = &DelBiblio($biblionumber); if ($error) { diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl index ce6a3bd324..2534e23e1f 100755 --- a/cataloguing/z3950_auth_search.pl +++ b/cataloguing/z3950_auth_search.pl @@ -58,7 +58,7 @@ my $srchany = $input->param('srchany'); # If replacing an existing record we want to initially populate the form with record info, # however, we want to use entered inputs when searching -if ( $record && $op ne 'do_search' ) { +if ( $record && $op ne 'cud-do_search' ) { $authorcorp ||= $record->subfield( $authfields_mapping->{'authorcorp'}, 'a' ); $authorpersonal ||= @@ -98,13 +98,13 @@ $template->param( index => $index, ); -if ( $op ne "do_search" ) { +if ( $op ne "cud-do_search" ) { my $sth = $dbh->prepare("SELECT id,host,servername,checked FROM z3950servers WHERE recordtype = 'authority' ORDER BY `rank`, servername"); $sth->execute(); my $serverloop = $sth->fetchall_arrayref( {} ); $template->param( serverloop => $serverloop, - opsearch => "search", + opsearch => "cud-search", index => $index, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index 8acc92c25d..1152a2f13c 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -71,7 +71,7 @@ $template->param( publicationyear => $publicationyear, ); -if ( $op ne "do_search" ) { +if ( $op ne "cud-do_search" ) { my $schema = Koha::Database->new()->schema(); my $rs = $schema->resultset('Z3950server')->search( { @@ -84,7 +84,7 @@ if ( $op ne "do_search" ) { ); $template->param( serverloop => [ $rs->all ], - opsearch => "search", + opsearch => "cud-search", ); output_html_with_http_headers $input, $cookie, $template->output; exit; diff --git a/circ/branchoverdues.pl b/circ/branchoverdues.pl index bce79d8cf8..c96e6e75a2 100755 --- a/circ/branchoverdues.pl +++ b/circ/branchoverdues.pl @@ -83,7 +83,7 @@ foreach my $num (@getoverdues) { $overdueforbranch{'borrowersurname'} = $num->{'surname'}; $overdueforbranch{'borrowerfirstname'} = $num->{'firstname'}; $overdueforbranch{'borrowerphone'} = $num->{'phone'}; - $overdueforbranch{'borroweremail'} = $num->{'email'}; + $overdueforbranch{'borroweremail'} = $num->{'cud-email'}; $overdueforbranch{'homebranch'} = $num->{'homebranch'}; $overdueforbranch{'itemcallnumber'} = $num->{'itemcallnumber'}; $overdueforbranch{'borrowernumber'} = $num->{'borrowernumber'}; diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index cb10b5b0f1..c8f7eb691c 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -76,7 +76,7 @@ my $reqmessage; my $cancelled; my $settransit; -my $request = $query->param('request') || ''; +my $request = $query->param('cud-request') || ''; my $borrowernumber = $query->param('borrowernumber') || 0; my $tobranchcd = $query->param('tobranchcd') || ''; my $trigger = 'Manual'; diff --git a/circ/curbside_pickups.pl b/circ/curbside_pickups.pl index 2003197df3..9b4985cd3f 100755 --- a/circ/curbside_pickups.pl +++ b/circ/curbside_pickups.pl @@ -65,7 +65,7 @@ if ( $op eq 'find-patron' ) { existing_curbside_pickups => $existing_curbside_pickups, ); } -elsif ( $op eq 'create-pickup' ) { +elsif ( $op eq 'cud-create-pickup' ) { my $borrowernumber = $input->param('borrowernumber'); my $scheduled_pickup_datetime = $input->param('pickup_time'); my $notes = $input->param('notes'); @@ -122,27 +122,27 @@ elsif ( $op eq 'create-pickup' ) { } } } -elsif ( $op eq 'cancel' ) { +elsif ( $op eq 'cud-cancel' ) { my $id = $input->param('id'); my $curbside_pickup = Koha::CurbsidePickups->find($id); $curbside_pickup->delete() if $curbside_pickup; } -elsif ( $op eq 'mark-as-staged' ) { +elsif ( $op eq 'cud-mark-as-staged' ) { my $id = $input->param('id'); my $curbside_pickup = Koha::CurbsidePickups->find($id); $curbside_pickup->mark_as_staged if $curbside_pickup; } -elsif ( $op eq 'mark-as-unstaged' ) { +elsif ( $op eq 'cud-mark-as-unstaged' ) { my $id = $input->param('id'); my $curbside_pickup = Koha::CurbsidePickups->find($id); $curbside_pickup->mark_as_unstaged if $curbside_pickup; } -elsif ( $op eq 'mark-patron-has-arrived' ) { +elsif ( $op eq 'cud-mark-patron-has-arrived' ) { my $id = $input->param('id'); my $curbside_pickup = Koha::CurbsidePickups->find($id); $curbside_pickup->mark_patron_has_arrived if $curbside_pickup; } -elsif ( $op eq 'mark-as-delivered' ) { +elsif ( $op eq 'cud-mark-as-delivered' ) { my $id = $input->param('id'); my $curbside_pickup = Koha::CurbsidePickups->find($id); # FIXME Add a try-catch here diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 21016bc354..4a6ab964d9 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -53,7 +53,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( ); my @messages; -if ( $op eq 'cancel_reserve' and $reserve_id ) { +if ( $op eq 'cud-cancel_reserve' and $reserve_id ) { my $hold = Koha::Holds->find( $reserve_id ); if ( $hold ) { my $cancellation_reason = $input->param('cancellation-reason'); @@ -67,7 +67,7 @@ if ( $op eq 'cancel_reserve' and $reserve_id ) { if ( $item and C4::Context->preference('CanMarkHoldsToPullAsLost') =~ m|^allow| ) { my $patron = $hold->borrower; C4::Circulation::LostItem( $item->itemnumber, "pendingreserves" ); - if ( $op eq 'mark_as_lost_and_notify' and C4::Context->preference('CanMarkHoldsToPullAsLost') eq 'allow_and_notify' ) { + if ( $op eq 'cud-mark_as_lost_and_notify' and C4::Context->preference('CanMarkHoldsToPullAsLost') eq 'allow_and_notify' ) { my $library = $hold->branch; my $letter = C4::Letters::GetPreparedLetter( module => 'reserves', @@ -89,7 +89,7 @@ if ( $op eq 'cancel_reserve' and $reserve_id ) { C4::Letters::EnqueueLetter( { letter => $letter, borrowernumber => $patron->borrowernumber, - message_transport_type => 'email', + message_transport_type => 'cud-email', from_address => $from_address, } ); diff --git a/circ/returns.pl b/circ/returns.pl index c0df061139..63422018ab 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -146,7 +146,7 @@ if ( $query->param('reserve_id') ) { my $borrowernumber = $query->param('borrowernumber'); my $reserve_id = $query->param('reserve_id'); my $diffBranchReturned = $query->param('diffBranch'); - my $cancel_reserve = $query->param('cancel_reserve'); + my $cancel_reserve = $query->param('cud-cancel_reserve'); my $cancel_reason = $query->param('cancel_reason'); # fix up item type for display diff --git a/circ/transfer-slip.pl b/circ/transfer-slip.pl index 1bd013d854..6c61e2cde2 100755 --- a/circ/transfer-slip.pl +++ b/circ/transfer-slip.pl @@ -56,7 +56,7 @@ else { $template->param( slip => $slip, plain => !$is_html, - caller => 'transfer', + caller => 'cud-transfer', stylesheet => C4::Context->preference("SlipCSS"), ); diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl index d430cf58da..85eaa9fa5f 100755 --- a/course_reserves/add_items.pl +++ b/course_reserves/add_items.pl @@ -123,7 +123,7 @@ if ( $action eq 'lookup' and $item ) { return => $return, ); -} elsif ( $action eq 'add' ) { +} elsif ( $action eq 'cud-add' ) { my $itype = scalar $cgi->param('itype'); my $ccode = scalar $cgi->param('ccode'); my $homebranch = $cgi->param('homebranch'); diff --git a/course_reserves/batch_add_items.pl b/course_reserves/batch_add_items.pl index c71ce46f47..15394be470 100755 --- a/course_reserves/batch_add_items.pl +++ b/course_reserves/batch_add_items.pl @@ -66,7 +66,7 @@ if ( $course_id && $course ) { if ( !$action ) { $template->param( action => 'display_form' ); } - elsif ( $action eq 'add' ) { + elsif ( $action eq 'cud-add' ) { my @barcodes = uniq( split( /\s\n/, $barcodes ) ); my @biblionumbers = uniq( split( /\s\n/, $biblionumbers ) ); diff --git a/course_reserves/mod_course.pl b/course_reserves/mod_course.pl index e04072384b..48d7d1c3bc 100755 --- a/course_reserves/mod_course.pl +++ b/course_reserves/mod_course.pl @@ -34,7 +34,7 @@ checkauth($cgi, 0, { coursereserves => 'manage_courses' }, 'intranet'); my $action = $cgi->param('action') || ''; my $course_id = $cgi->param('course_id'); -if ( $action eq 'del' ) { +if ( $action eq 'cud-del' ) { DelCourse( $course_id ); print $cgi->redirect("/cgi-bin/koha/course_reserves/course-reserves.pl"); } else { diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl index a8c59f7fb0..8f1b6551e4 100755 --- a/ill/ill-requests.pl +++ b/ill/ill-requests.pl @@ -201,8 +201,8 @@ if ( $backends_available ) { # handle special commit rules & update type handle_commit_maybe($backend_result, $request); - } elsif ( $op eq 'cancel' ) { - # Backend 'cancel' method + } elsif ( $op eq 'cud-cancel' ) { + # Backend 'cud-cancel' method # cancel requires a specific request, so first, find it. my $request = Koha::Illrequests->find($params->{illrequest_id}); my $backend_result = $request->backend_cancel($params); @@ -270,14 +270,14 @@ if ( $backends_available ) { # Currently still needs to be implemented. redirect_to_list(); - } elsif ( $op eq 'delete_confirm') { + } elsif ( $op eq 'cud-delete_confirm') { my $request = Koha::Illrequests->find($params->{illrequest_id}); $template->param( request => $request ); - } elsif ( $op eq 'delete' ) { + } elsif ( $op eq 'cud-delete' ) { # Check if the request is confirmed, if not, redirect # to the confirmation view @@ -530,7 +530,7 @@ sub get_metadata_enrichment { my @services = (); foreach my $plugin(@candidates) { my $supported = $plugin->provides_api(); - if ($supported->{type} eq 'search') { + if ($supported->{type} eq 'cud-search') { push @services, $supported; } } diff --git a/installer/install.pl b/installer/install.pl index 8f53d212a2..508290a16b 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -237,7 +237,7 @@ elsif ( $step && $step == 3 ) { print $query->redirect("/cgi-bin/koha/mainpage.pl"); exit; } - elsif ( $op && $op eq 'finish' ) { + elsif ( $op && $op eq 'cud-finish' ) { $installer->set_version_syspref(); my $langchoice = $query->param('fwklanguage'); @@ -252,7 +252,7 @@ elsif ( $step && $step == 3 ) { $template->param( "$op" => 1 ); } - elsif ( $op && $op eq 'addframeworks' ) { + elsif ( $op && $op eq 'cud-addframeworks' ) { # 1ST install, 3rd sub-step : insert the SQL files the user has selected my $langchoice = $query->param('fwklanguage'); @@ -270,7 +270,7 @@ elsif ( $step && $step == 3 ) { Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings; $template->param( "$op" => 1 ); } - elsif ( $op && $op eq 'selectframeworks' ) { + elsif ( $op && $op eq 'cud-selectframeworks' ) { # # # 1ST install, 2nd sub-step : show the user the sql datas they can insert in the database. @@ -313,7 +313,7 @@ elsif ( $step && $step == 3 ) { $template->param( "$op" => 1 ); } - elsif ( $op && $op eq 'choosemarc' ) { + elsif ( $op && $op eq 'cud-choosemarc' ) { # # # 1ST install, 2nd sub-step : show the user the marcflavour available. @@ -367,7 +367,7 @@ elsif ( $step && $step == 3 ) { $template->param( "flavourloop" => \@flavourlist ); $template->param( "$op" => 1 ); } - elsif ( $op && $op eq 'importdatastructure' ) { + elsif ( $op && $op eq 'cud-importdatastructure' ) { # # # 1st install, 1st "sub-step" : import kohastructure diff --git a/installer/onboarding.pl b/installer/onboarding.pl index 306e891d35..d5b8bee041 100755 --- a/installer/onboarding.pl +++ b/installer/onboarding.pl @@ -57,7 +57,7 @@ my @messages; if ( $step == 1 ) { - if ( $op eq 'add_validate_library' ) { + if ( $op eq 'cud-add_validate_library' ) { my $branchcode = $input->param('branchcode'); $branchcode = uc($branchcode); @@ -84,7 +84,7 @@ if ( $step == 1 ) { $step++ if Koha::Libraries->count; } if ( $step == 2 ) { - if ( $op eq "add_validate_category" ) { + if ( $op eq "cud-add_validate_category" ) { my $searchfield = $input->param('description') // q||; my $categorycode = $input->param('categorycode'); @@ -125,7 +125,7 @@ if ( $step == 2 ) { $step++ if Koha::Patron::Categories->count; } if ( $step == 3 ) { - if ( $op eq 'add_validate_patron' ) { + if ( $op eq 'cud-add_validate_patron' ) { #Create a patron my $firstpassword = $input->param('password') || ''; @@ -199,7 +199,7 @@ if ( $step == 3 ) { $step++ if Koha::Patrons->search( { flags => 1 } )->count; } if ( $step == 4 ) { - if ( $op eq 'add_validate_itemtype' ) { + if ( $op eq 'cud-add_validate_itemtype' ) { my $description = $input->param('description'); my $itemtype_code = $input->param('itemtype'); $itemtype_code = uc($itemtype_code); @@ -224,7 +224,7 @@ if ( $step == 4 ) { } if ( $step == 5 ) { - if ( $op eq 'add_validate_circ_rule' ) { + if ( $op eq 'cud-add_validate_circ_rule' ) { #If no libraries exist then set the $branch value to * my $branch = $input->param('branch') || '*'; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index ad6a892384..1b442b5fcf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -158,7 +158,7 @@