Bug 15784: Library deletion warning is incorrectly styled
authorOwen Leonard <oleonard@myacpl.org>
Wed, 3 Feb 2016 13:40:20 +0000 (08:40 -0500)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 24 Feb 2016 01:37:33 +0000 (01:37 +0000)
When deleting a library in Administration ->  Libraries and groups, the
deletion confirmation message is not styled with the standard "dialog
alert" <div>. This patch modifies the confirmation markup to match the
standard.

Revised to include Font Awesome icons. Depends on Bug 15785.

To test, apply the patch and go to Administration -> Libraries and
groups.

- Try deleting a library. The confirmation box should have the standard
  "dialog alert" class.
- Test the 'confirm' and 'cancel' actions and make sure both complete
  correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Buttons display as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt

index 305741a..8c66bed 100644 (file)
@@ -202,18 +202,18 @@ tinyMCE.init({
 [% END %]
 
 [% IF op == 'delete_confirm' and not ( items_count or patrons_count )%]
-    <form action="/cgi-bin/koha/admin/branches.pl" method="post">
-        <fieldset>
-            <legend>Confirm deletion of [% library.branchname %] ([% library.branchcode %])?</legend>
+    <div class="dialog alert">
+        <form action="/cgi-bin/koha/admin/branches.pl" method="post">
+            <h3>Are you sure you want to delete [% library.branchname %] ([% library.branchcode %])?</h3>
             <input type="hidden" name="op" value="delete_confirmed" />
             <input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
             <input type="hidden" name="branchname" value="[% library.branchname |html %]">
-            <fieldset class="action">
-                <input type="submit" value="Delete Library" />
-                <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
-            </fieldset>
-        </fieldset>
-    </form>
+            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
+        </form>
+        <form action="/cgi-bin/koha/admin/branches.pl" method="get">
+            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
+        </form>
+    </div>
 [% END %]
 
 [% IF op == 'list' %]