From 34f1987dcb015dd804579d61717c805be119b620 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Tue, 21 Apr 2009 21:01:06 +0200 Subject: [PATCH] fix for #2884: Add error management to branches While trying to add a new Branch with an existing Branch code, the UI says "Library saved" instead of something such as "Please select a unique branch code". --- admin/branches.pl | 3 +-- koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/branches.pl b/admin/branches.pl index 10ebe34ac6..8150a1de28 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -101,8 +101,7 @@ elsif ( $op eq 'add_validate' ) { if ($error) { # copy input parameters back to form # FIXME - doing this doesn't preserve any branch group selections, but good enough for now - $template->param(%$params); # FIXME: Allows user to set ANY TMPL_VAR to ANY value!! - $template->param(branch_name => $params->{branchname}); + editbranchform($branchcode,$template); $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 2d03b63ba1..b3ecf07670 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl @@ -84,7 +84,7 @@ " /> - Library code + " /> -- 2.39.5