From 48a283016580ab954d0535f262cb4cb06ad87d02 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 28 May 2009 20:13:21 -0500 Subject: [PATCH] bug 2884: followup patch [1] Restore behavior of the input field for the library code; when adding a new library, it should be a a text box; when editing an existing library, should be a hidden input. [2] When user attempts to add a new library with the same code as that of an existing library, populate the form with what the user entered for the new library, not the values from the existing library. Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- admin/branches.pl | 5 ++++- .../intranet-tmpl/prog/en/modules/admin/branches.tmpl | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/branches.pl b/admin/branches.pl index 9c6b2e9000..f2bc8273bd 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -117,7 +117,10 @@ elsif ( $op eq 'add_validate' ) { my $error = ModBranch($params); # if error saving, stay on edit and rise error if ($error) { - editbranchform($branchcode,$template); + # copy input parameters back to form + # FIXME - doing this doesn't preserve any branch group selections, but good enough for now + $template->param(%$params); + $template->param(branch_name => $params->{branchname}); $template->param( 'heading-branches-add-branch-p' => 1, 'add' => 1, "ERROR$error" => 1 ); } else { $template->param( else => 1); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl index 5fbc653d38..11e4dfe4f0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl @@ -70,13 +70,13 @@
  1. - + + + " /> + Library code " /> - - - " />
  2. -- 2.39.5