Bug 15821: Use Font Awesome icons in confirmation dialogs - Circulation
authorAleisha <aleishaamohia@hotmail.com>
Mon, 15 Feb 2016 22:14:43 +0000 (22:14 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 2 Mar 2016 03:52:01 +0000 (03:52 +0000)
To test, apply the patch and test deletion in the following cases. Test
both confirmation and cancel actions.

Circulation -> Check out
   -> An item that is checked out by someone else
   -> An item that is on hold to someone else
   -> To a patron that has more than noisuescharge in fines (Allow
      AllowFineOverride syspref)
   -> To a patron that has reached the max amount of checkouts (Allow
      AllowTooManyOverride syspref)
   -> To a patron that has more than noissuescharge in fines (Allow
      AllowFineOverride syspref and set noissuescharge syspref)
   -> Renew -> An item that is on hold to someone else
   -> To a patron that is at max renewals (Allow AllowRenewalLimitOverride syspref)
   -> An item that is not checked out by anyone
   -> Check in -> An item that is in transit to another branch

And look for other confirmation dialogs and check if I've missed any

Sponsored-by: Catalyst IT

EDIT: Made changes from Comment 2
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index 5038e47..36c44f5 100644 (file)
@@ -363,9 +363,9 @@ $(document).ready(function() {
     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
     <input type="hidden" name="branch" value="[% branch %]" />
     [% IF ( RENEW_ISSUE ) %]
-    <input type="submit" class="approve" value="Yes, renew (Y)" accesskey="y" />
+    <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, renew (Y)</button>
     [% ELSE %]
-    <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
+    <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
     [% END %]
     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
 </form>
@@ -377,7 +377,7 @@ $(document).ready(function() {
     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
-    <input class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip');this.form.submit();" value="Don't check out and print slip (P)">
+    <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
 </form>
 [% END %]
 
@@ -387,7 +387,7 @@ $(document).ready(function() {
     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
-    <input class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip');this.form.submit();" value="Don't check out and print slip (P)">
+    <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
 </form>
 [% END %]
 
@@ -399,18 +399,18 @@ $(document).ready(function() {
     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
     [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
         [% IF ( RENEW_ISSUE ) %]
-        <input type="submit" class="deny" value="No, don't renew (N)" accesskey="n" />
+        <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't renew (N)</button>
         [% ELSE %]
-        <input type="submit" class="deny" value="No, don't check out (N)" accesskey="n" />
+        <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't check out (N)</button>
         [% END %]
     [% ELSE %]
-        <input type="submit" class="deny" value="Continue" />
+        <button type="submit" class="deny"><i class="fa fa-times></i> Continue</button>
     [% END %]
 </form>
 
 [% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
     [% UNLESS flagged && noissues %]
-        <div class="circ-checkoutplacehold"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% borrowernumber %]">Click here to place a hold for [% INCLUDE 'patron-title.inc' %]</a></div>
+        <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% borrowernumber %]'"><i class="fa fa-times-circle"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
     [% END %]
 [% END %]
 </div></div>
@@ -451,7 +451,7 @@ $(document).ready(function() {
                         <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
                         <input type="hidden" name="branch" value="[% branch %]" />
                         <input type="hidden" name="barcode" value="[% book.barcode %]" />
-                        <input type="submit" name="x" value="Check out [% book.barcode %]: [% book.title %]" />
+                        <button type="submit" name="x"><i class="fa fa-check"></i> Check out [% book.barcode %]: [% book.title %]</button>
                     </form>
                 [% END %]
             [% ELSE %]
index da3b83b..7c481f4 100644 (file)
@@ -49,7 +49,7 @@
                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
                                         <input type="hidden" name="barcode" value="[% item.barcode %]"/>
                                         <input type="hidden" name="override_limit" value="1" />
-                                        <input type="submit" class="approve" value="Override limit and renew" />
+                                        <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
                                     </form>
                                 [% END %]
 
@@ -61,7 +61,7 @@
                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
                                         <input type="hidden" name="barcode" value="[% item.barcode %]"/>
                                         <input type="hidden" name="override_limit" value="1" />
-                                        <input type="submit" class="approve" value="Override and renew" />
+                                        <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
                                     </form>
                                 [% END %]
 
@@ -73,7 +73,7 @@
                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
                                         <input type="hidden" name="barcode" value="[% item.barcode %]"/>
                                         <input type="hidden" name="override_limit" value="1" />
-                                        <input type="submit" class="approve" value="Override and renew" />
+                                        <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
                                     </form>
                                 [% END %]
 
@@ -85,7 +85,7 @@
                                     <form method="post" action="/cgi-bin/koha/circ/renew.pl">
                                         <input type="hidden" name="barcode" value="[% item.barcode %]"/>
                                         <input type="hidden" name="override_limit" value="1" />
-                                        <input type="submit" class="approve" value="Override limit and renew" />
+                                        <button type="submit" class="approve"><i class="fa fa-check"></i> Override limit and renew</button>
                                     </form>
                                 [% END %]
 
@@ -97,7 +97,7 @@
                                     <input type="hidden" name="barcode" value="[% item.barcode %]"/>
                                     <input type="hidden" name="override_limit" value="1" />
                                     <input type="hidden" name="override_holds" value="1" />
-                                    <input type="submit" class="approve" value="Override and renew" />
+                                    <button type="submit" class="approve"><i class="fa fa-check"></i> Override and renew</button>
                                 </form>
 
                             [% ELSIF error == "patron_restricted" %]
                             [% END %]
 
                                 <form method="get" action="/cgi-bin/koha/circ/renew.pl">
-                                    <input type="submit" class="deny" value="Ignore and continue" />
+                                    <button type="submit" class="deny"><i class="fa fa-times"></i> Ignore and continue</button>
                                 </form>
                     </div>
                 [% END %]
index 38c5887..822b70e 100644 (file)
@@ -181,7 +181,7 @@ $(document).ready(function () {
         <!-- WrongTransfer -->
         <h3>Please return item to: [% Branches.GetName( TransferWaitingAt ) %]</h3>
             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
-        <ul><li><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% homebranch %]&amp;op=slip'); return true;">Print transfer slip</a></li><li><a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1">Cancel transfer</a></li></ul>
+        <button type="submit" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% homebranch %]&amp;op=slip'); return true;"><i class="fa fa-print"></i> Print transfer slip</button><button type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button>
 [% IF ( wborcnum ) %]<h5>Hold for:</h5>
         <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
             [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
@@ -196,11 +196,11 @@ $(document).ready(function () {
             <input type="hidden" name="WT-itemNumber" value="[% WrongTransferItem %]" />
             <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt %]" />
             <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
-            <input type="submit" class="approve" value="Confirm" />
+            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
             <input type="hidden" name="print_slip" value="0" />
             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
             <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
-            <input type="submit" value="Print slip and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" />
+            <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and confirm</button>
         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
     </form>
@@ -233,11 +233,10 @@ $(document).ready(function () {
                <h4><strong>Hold at</strong> [% destbranchname %]</h4>
         [% END %]
         <form method="post" action="returns.pl" class="confirm">
-
-            <input type="submit" class="approve" value="Confirm" />
+            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
 
             <input type="hidden" name="cancel_reserve" value="0" />
-            <input type="submit" class="deny" value="Cancel hold" onclick="this.form.cancel_reserve.value = 1; this.form.submit();" />
+            <button type="submit" class="deny" onclick="this.form.cancel_reserve.value = 1; this.form.submit();"><i class="fa fa-times"></i> Cancel</button>
 
             <input type="hidden" name="print_slip" value="0" />
             <input type="submit" value="Print and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" />
@@ -284,11 +283,11 @@ $(document).ready(function () {
         [% END %]
 
         <form method="post" action="returns.pl" class="confirm">
-            <input type="submit" class="approve" value="Confirm" />
+            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
             <input type="hidden" name="print_slip" value="0" />
             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
             <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
-            <input type="submit" value="Print slip and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" />
+            <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and continue</button>
             [% FOREACH inputloo IN inputloop %]
                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
@@ -321,10 +320,10 @@ $(document).ready(function () {
     Transfer now?<br />
     <form method="post" action="returns.pl" name="mainform" id="mainform">
     [% IF itemnumber %]
-        <input type="submit" name="dotransfer" value="Yes, Print slip" class="print" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% returnbranch %]&amp;op=slip'); return true;" />
+        <button type="submit" name="dotransfer" class="print" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% returnbranch %]&amp;op=slip'); return true;"><i class="fa fa-print"></i> Yes, print slip</button>
     [% END %]
-       <input type="submit" name="dotransfer" value="Yes" class="submit" />
-       <input type="submit" name="notransfer" value="No" class="submit" />
+       <button type="submit" name="dotransfer" class="submit"><i class="fa fa-check"></i> Yes</button>
+       <button type="submit" name="notransfer" class="submit"><i class="fa fa-times"></i> No</button>
     <input type="hidden" name="tobranch" value="[% returnbranch %]" />
        <input type="hidden" name="transferitem" value="[% itemnumber %]" />
         <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
@@ -397,13 +396,13 @@ $(document).ready(function () {
         <form method="post" action="returns.pl" class="confirm">
             <input type="hidden" name="print_slip" value="0" />
             [% IF ( transfertodo ) %]
-                <input type="submit" class="approve" value="Confirm hold and transfer" />
-                <input type="submit" value="Print slip, transfer, and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit()" />
+                <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm hold and transfer</button>
+                <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit()"><i class="fa fa-print></i> Print slip, transfer, and confirm</button>
             [% ELSE %]
-                <input type="submit" class="approve" value="Confirm hold" />
-                <input type="submit" value="Print slip and confirm" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();" />
+                <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm hold</button>
+                <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and confirm</button>
             [% END %]
-                <input type="submit" class="deny" value="Ignore" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;" />
+                <button type="submit" class="deny" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;"><i class="fa fa-times"></i> Ignore</button>
             [% FOREACH inputloo IN inputloop %]
        <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
        <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />