Bug 5002: Show all patron categories after insert
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 26 Mar 2015 08:30:11 +0000 (09:30 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 31 Mar 2015 13:11:18 +0000 (10:11 -0300)
+ wording changes.

How I tested:
- edit an existing patron category
- save the change
- redirect is to the categories table - it shows all categories OK

- wording OK as well

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
admin/categorie.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt

index 60d2c84..bb0b72e 100755 (executable)
@@ -257,7 +257,6 @@ elsif ( $op eq 'add_validate' ) {
         if ( $inserted ) {
             push @messages, { type => 'message', code => 'success_on_insert' };
         } else {
-            $searchfield = q||;
             push @messages, { type => 'error', code => 'error_on_insert' };
         }
     }
@@ -267,6 +266,7 @@ elsif ( $op eq 'add_validate' ) {
             { categorycode => $input->param('categorycode') }, $template );
     }
 
+    $searchfield = q||;
     $op = 'list';
 
     # END $OP eq ADD_VALIDATE
index 281d24a..769a0bc 100644 (file)
     <div class="dialog [% m.type %]">
         [% SWITCH m.code %]
         [% CASE 'error_on_insert' %]
-            An error occurred when inserting this patron category. Perhaps the category code already exists.
+            An error occurred when inserting this patron category. The patron category might already exist.
         [% CASE 'error_on_delete' %]
-            An error occurred when deleteing this patron category. Check the logs.
+            An error occurred when deleting this patron category. Check the logs.
         [% CASE 'success_on_insert' %]
-            Patron category inserted with success.
+            Patron category added successfully
         [% CASE 'success_on_delete' %]
-            Patron category deleted with success.
+            Patron category deleted successfully.
         [% CASE %]
             [% m.code %]
         [% END %]