Bug 15962: Add messages on the currency admin page
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 8 Mar 2016 10:38:37 +0000 (10:38 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Mon, 21 Mar 2016 22:56:10 +0000 (22:56 +0000)
Bug 15084 rewrote the currency admin page but forgot to add the messages
block.

Test plan:
Add/update/delete vendors.
You should get information messages.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt

index ff56bc3..ea438f2 100644 (file)
 </div>
 [% END %]
 
+[% FOR m IN messages %]
+    <div class="dialog [% m.type %]">
+        [% SWITCH m.code %]
+        [% CASE 'error_on_update' %]
+            An error occurred when updating this currency. Perhaps it already exists.
+        [% CASE 'error_on_insert' %]
+            An error occurred when adding this currency. The currency code might already exist.
+        [% CASE 'error_on_delete' %]
+            An error occurred when deleting this currency. Check the logs.
+        [% CASE 'success_on_update' %]
+            Currency updated successfully.
+        [% CASE 'success_on_insert' %]
+            Currency added successfully.
+        [% CASE 'success_on_delete' %]
+            Currency deleted successfully.
+        [% CASE %]
+            [% m.code %]
+        [% END %]
+    </div>
+[% END %]
+
+
+
 [% IF op == 'add_form' %]
 
 <form action="/cgi-bin/koha/admin/currency.pl" name="Aform" method="post" class="validated">