koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/admin branches.pl,1.27.2.1,1.27.2.2


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/admin branches.pl,1.27.2.1,1.27.2.2
Date: Mon, 01 Aug 2005 05:50:55 -0700

Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24628/admin

Modified Files:
      Tag: rel_2_2
        branches.pl 
Log Message:
fix for
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=758
(Move error messages out of branches.pl)

Index: branches.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/branches.pl,v
retrieving revision 1.27.2.1
retrieving revision 1.27.2.2
diff -C2 -r1.27.2.1 -r1.27.2.2
*** branches.pl 29 Mar 2005 15:41:42 -0000      1.27.2.1
--- branches.pl 1 Aug 2005 12:50:52 -0000       1.27.2.2
***************
*** 89,93 ****
        heading("Branches: Add Branch");
        $template->param('heading-branches-add-branch-p' => 1);
-       $template->param('use-heading-flags-p' => 1);
        editbranchform();
  
--- 89,92 ----
***************
*** 96,100 ****
        heading("Branches: Edit Branch");
        $template->param('heading-branches-edit-branch-p' => 1);
-       $template->param('use-heading-flags-p' => 1);
        $template->param(add => 1);
        editbranchform($branchcode);
--- 95,98 ----
***************
*** 103,111 ****
        my $params = $input->Vars;
        unless ($params->{'branchcode'} && $params->{'branchname'}) {
!               default ("Cannot change branch record: You must specify a 
Branchname and a Branchcode");
        } else {
                setbranchinfo($params);
                $template->param(else => 1);
!               default ("Branch record changed for branch: 
$params->{'branchname'}");
        }
  } elsif ($op eq 'delete') {
--- 101,109 ----
        my $params = $input->Vars;
        unless ($params->{'branchcode'} && $params->{'branchname'}) {
!               default ("MESSAGE1");
        } else {
                setbranchinfo($params);
                $template->param(else => 1);
!               default ("MESSAGE2");
        }
  } elsif ($op eq 'delete') {
***************
*** 124,133 ****
        deletebranch($branchcode);
        $template->param(else => 1);
!       default("The branch \"$branchname\" ($branchcode) has been deleted.");
  } elsif ($op eq 'editcategory') {
        # If the user has pressed the "add new category" or "modify" buttons.
        heading("Branches: Edit Category");
        $template->param('heading-branches-edit-category-p' => 1);
-       $template->param('use-heading-flags-p' => 1);
        editcatform($categorycode);
  } elsif ($op eq 'addcategory_validate') {
--- 122,130 ----
        deletebranch($branchcode);
        $template->param(else => 1);
!       default("MESSAGE3");
  } elsif ($op eq 'editcategory') {
        # If the user has pressed the "add new category" or "modify" buttons.
        heading("Branches: Edit Category");
        $template->param('heading-branches-edit-category-p' => 1);
        editcatform($categorycode);
  } elsif ($op eq 'addcategory_validate') {
***************
*** 135,143 ****
        my $params = $input->Vars;
        unless ($params->{'categorycode'} && $params->{'categoryname'}) {
!               default ("Cannot change branch record: You must specify a 
Branchname and a Branchcode");
        } else {
                setcategoryinfo($params);
                $template->param(else => 1);
!               default ("Category record changed for category 
$params->{'categoryname'}");
        }
  } elsif ($op eq 'delete_category') {
--- 132,140 ----
        my $params = $input->Vars;
        unless ($params->{'categorycode'} && $params->{'categoryname'}) {
!               default ("MESSAGE4");
        } else {
                setcategoryinfo($params);
                $template->param(else => 1);
!               default ("MESSAGE5");
        }
  } elsif ($op eq 'delete_category') {
***************
*** 155,159 ****
        deletecategory($categorycode);
        $template->param(else => 1);
!       default("The category with code $categorycode has been deleted.");
  
  } else {
--- 152,156 ----
        deletecategory($categorycode);
        $template->param(else => 1);
!       default("MESSAGE6");
  
  } else {
***************
*** 172,177 ****
        heading("Branches");
        $template->param('heading-branches-p' => 1);
!       $template->param('use-heading-flags-p' => 1);
!       $template->param(message => $message);
        $template->param(action => $script_name);
        branchinfotable();
--- 169,173 ----
        heading("Branches");
        $template->param('heading-branches-p' => 1);
!       $template->param("$message" => 1);
        $template->param(action => $script_name);
        branchinfotable();
***************
*** 502,506 ****
      if ($total) {
        # FIXME: need to be replaced by an exported boolean parameter
!       $message = "Branch cannot be deleted because there are $total items 
using that branch.";
      }
      return $message;
--- 498,502 ----
      if ($total) {
        # FIXME: need to be replaced by an exported boolean parameter
!       $message = "MESSAGE7";
      }
      return $message;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]