Bug 9350: Making changes so that you can add the new fields to branches
authorChris Cormack <chrisc@catalyst.net.nz>
Mon, 11 Aug 2014 21:57:06 +0000 (09:57 +1200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 27 Oct 2014 13:38:16 +0000 (10:38 -0300)
To test

1/ Apply patch
2/ Add or Edit a branch, filling out the new fields
3/ Check that the changes saved

http://bugs.koha-community.org/show_bug.cgi?id=9530
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

C4/Branch.pm
admin/branches.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt

index 83d2010..ff571dc 100644 (file)
@@ -202,8 +202,9 @@ sub ModBranch {
             (branchcode,branchname,branchaddress1,
             branchaddress2,branchaddress3,branchzip,branchcity,branchstate,
             branchcountry,branchphone,branchfax,branchemail,
-            branchurl,branchip,branchprinter,branchnotes,opac_info)
-            VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+            branchurl,branchip,branchprinter,branchnotes,opac_info,
+            branchreplyto, branchreturnpath)
+            VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
         ";
         my $sth    = $dbh->prepare($query);
         $sth->execute(
@@ -216,6 +217,7 @@ sub ModBranch {
             $data->{'branchemail'},      $data->{'branchurl'},
             $data->{'branchip'},         $data->{'branchprinter'},
             $data->{'branchnotes'},      $data->{opac_info},
+            $data->{'branchreplyto'},    $data->{'branchreturnpath'}
         );
         return 1 if $dbh->err;
     } else {
@@ -225,7 +227,8 @@ sub ModBranch {
                 branchaddress2=?,branchaddress3=?,branchzip=?,
                 branchcity=?,branchstate=?,branchcountry=?,branchphone=?,
                 branchfax=?,branchemail=?,branchurl=?,branchip=?,
-                branchprinter=?,branchnotes=?,opac_info=?
+                branchprinter=?,branchnotes=?,opac_info=?,
+                branchreplyto=?, branchreturnpath=?
             WHERE branchcode=?
         ";
         my $sth    = $dbh->prepare($query);
@@ -239,6 +242,7 @@ sub ModBranch {
             $data->{'branchemail'},      $data->{'branchurl'},
             $data->{'branchip'},         $data->{'branchprinter'},
             $data->{'branchnotes'},      $data->{opac_info},
+            $data->{'branchreplyto'},    $data->{'branchreturnpath'},
             $data->{'branchcode'},
         );
     }
index 7c4b539..2aa87df 100755 (executable)
@@ -402,6 +402,8 @@ sub _branch_to_template {
          branchphone    => $data->{'branchphone'},
          branchfax      => $data->{'branchfax'},
          branchemail    => $data->{'branchemail'},
+         branchreplyto  => $data->{'branchreplyto'},
+         branchreturnpath => $data->{'branchreturnpath'},
          branchurl      => $data->{'branchurl'},
          opac_info      => $data->{'opac_info'},
          branchip       => $data->{'branchip'},
index f940e74..2275f57 100644 (file)
@@ -126,7 +126,7 @@ tinyMCE.init({
         <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% branchphone |html %]" /></li>
         <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% branchfax |html %]" /></li>
         <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email"  size="80" value="[% branchemail |html %]" /></li>
-        <li><label for="branchreply">Reply-To (if different to Email): </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email"  size="80" value="[% branchreplyto |html %]" /></li>
+        <li><label for="branchreplyto">Reply-To (if different to Email): </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email"  size="80" value="[% branchreplyto |html %]" /></li>
         <li><label for="branchreturnpath">Return-Path (if different to Email): </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email"  size="80" value="[% branchreturnpath |html %]" /></li>
         <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl"  size="80" value="[% branchurl |html %]" class="url" /></li>
         <li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% opac_info |html %]</textarea></li>