From 2316a26ac3a716952a61fcbeaef26258a95e5efd Mon Sep 17 00:00:00 2001 From: Elliott Davis Date: Tue, 29 Jan 2013 02:32:18 -0500 Subject: [PATCH] Added the ability to save and continue editing in cataloging. This patch adds the ability for catalogers to save and continue editing when adding new biblios. This is helpful in the event of a power failure or perhaps in the event you step away for a sandwich and your co-worker closes your tab to look at cats. To Test: Select an existing item or create a new item in cataloging using your favorite framework. Edit the item From the save menu in the dropdown, select the new option of "Save and continue editing" If you are missing requited fields you should still be prompted to fill them in before saving Once all required fields are in place you should be allowed to save and should be on the same page (You're fresh bib record should also be saved) http://bugs.koha-community.org/show_bug.cgi?id=7883 Modified: Changed malformed urls in form submits --- cataloguing/addbiblio.pl | 7 +++++-- .../prog/en/modules/cataloguing/addbiblio.tt | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index caacd91..428d436 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -863,7 +863,7 @@ if ( $op eq "addbiblio" ) { else { ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); } - if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view")){ + if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){ if ($frameworkcode eq 'FA'){ my $borrowernumber = $input->param('circborrowernumber'); my $barcode = $input->param('barcode'); @@ -882,7 +882,7 @@ if ( $op eq "addbiblio" ) { exit; } } - elsif($is_a_modif || $redirect eq "view"){ + elsif(($is_a_modif || $redirect eq "view") && $redirect ne "just_save"){ my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); my $views = { C4::Search::enabled_staff_search_views }; if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { @@ -897,6 +897,9 @@ if ( $op eq "addbiblio" ) { exit; } + elsif ($redirect eq "just_save"){ + print $input->redirect("/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=$biblionumber&framework=$frameworkcode"); + } else { $template->param( biblionumber => $biblionumber, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 7d54142..fb5edbc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -346,7 +346,8 @@ function Changefwk(FwkList) { var savemenu = [ { text: _("Save and view record"), value: 1, onclick: {fn:function(){redirect("view");}} }, - { text: _("Save and edit items"), value: 2, onclick: {fn:function(){redirect("items");}} } + { text: _("Save and edit items"), value: 2, onclick: {fn:function(){redirect("items");}} }, + { text: _("Save and continue editing"), value: 3, onclick: {fn:function(){redirect("just_save");}} } ]; [% END %] -- 1.7.2.5