Bugzilla – Attachment 87898 Details for
Bug 21346
Clean up dialogs in returns.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21346: Remove inline onclicks per comment 42
Bug-21346-Remove-inline-onclicks-per-comment-42.patch (text/plain), 9.59 KB, created by
Kyle M Hall (khall)
on 2019-04-12 12:35:34 UTC
(
hide
)
Description:
Bug 21346: Remove inline onclicks per comment 42
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-04-12 12:35:34 UTC
Size:
9.59 KB
patch
obsolete
>From 88b09fc3e4e268fd763d8cfbf95fda142ef1c95b Mon Sep 17 00:00:00 2001 >From: Christopher Brannon <cbrannon@cdalibrary.org> >Date: Wed, 5 Dec 2018 20:33:25 +0000 >Subject: [PATCH] Bug 21346: Remove inline onclicks per comment 42 > >To test: >1) Apply patch. >2) Check that there is no changed behavior with buttons or checkboxes. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/modules/circ/returns.tt | 50 +++++++++++++------ > 1 file changed, 36 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index cf87c320fd..7f80f6ee51 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -195,7 +195,7 @@ > </p> > </div> > <div class="modal-footer"> >- <button type="submit" class="btn btn-default approve"><i class="fa fa-check" onclick="$('#barcode').focus(); return false;"></i> OK</button> >+ <button type="submit" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button> > </div> > </form> > </div> >@@ -222,9 +222,9 @@ > </p> > </div> > <div class="modal-footer"> >- <button type="submit" class="btn btn-default approve"><i class="fa fa-check" onclick="$('#barcode').focus(); return false;"></i> OK</button> >+ <button type="submit" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button> > <button type="submit" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&&branchcode=[% TransferWaitingAt | html %]&op=slip"><i class="fa fa-print"></i> Print transfer slip</button> >- <button class="btn btn-default deny" type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber | html %]&canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button> >+ <button class="btn btn-default deny cancel-transfer" type="submit"><i class="fa fa-times"></i> Cancel transfer</button> > </div> > </form> > </div> >@@ -310,11 +310,11 @@ > </button> > > <input type="hidden" name="print_slip" value="0" /> >- <button type="submit" class="btn btn-default print" onclick="this.form.print_slip.value = 1; this.form.submit();"> >+ <button type="submit" class="btn btn-default print"> > <i class="fa fa-print"></i> Print slip and confirm > </button> > >- <button type="submit" class="btn btn-default deny" onclick="this.form.cancel_reserve.value = 1; this.form.submit();"> >+ <button type="submit" class="btn btn-default deny cancel-hold"> > <i class="fa fa-times"></i> Cancel hold > </button> > </div> >@@ -349,7 +349,7 @@ > <input type="hidden" name="print_slip" value="0" /> > <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> > <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" /> >- <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> >+ <button type="submit" class="print"><i class="fa fa-print"></i> Print slip and continue</button> > [% FOREACH inputloo IN inputloop %] > <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" /> > <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" /> >@@ -405,9 +405,9 @@ > <div class="modal-footer"> > [% IF !transfer %] > <button type="submit" name="dotransfer" value="Yes" class="btn btn-default approve"><i class="fa fa-check"></i> Yes</button> >- <button type="submit" name="dotransfer" value="Yes" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&&branchcode[% returnbranch | html %]&op=slip"><i class="fa fa-print"></i> Yes, print slip</button><button type="submit" class="btn btn-default deny" name="notransfer" value="No"><i class="fa fa-times" onclick="$('#barcode').focus(); return false;"></i> No</button> >+ <button type="submit" name="dotransfer" value="Yes" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&&branchcode[% returnbranch | html %]&op=slip"><i class="fa fa-print"></i> Yes, print slip</button><button type="submit" class="btn btn-default deny" name="notransfer" value="No"><i class="fa fa-times"></i> No</button> > [% ELSE %] >- <button type="submit" class="btn btn-default approve"><i class="fa fa-check" onclick="$('#barcode').focus(); return false;"></i> OK</button> >+ <button type="submit" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button> > <button type="submit" name="dotransfer" value="Yes" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | html %]&&branchcode[% returnbranch | html %]&op=slip"><i class="fa fa-print"></i> Print slip</button> > [% END %] > </div> >@@ -530,19 +530,19 @@ > <button type="submit" class="btn btn-default approve"> > <i class="fa fa-check"></i> Confirm hold and transfer > </button> >- <button type="submit" class="btn btn-default print" onclick="this.form.print_slip.value = 1; this.form.submit()"> >+ <button type="submit" class="btn btn-default print"> > <i class="fa fa-print"></i> Print slip, transfer, and confirm > </button> > [% ELSE %] > <button type="submit" class="btn btn-default approve"> > <i class="fa fa-check"></i> Confirm hold > </button> >- <button type="submit" class="btn btn-default print" onclick="this.form.print_slip.value = 1; this.form.submit();"> >+ <button type="submit" class="btn btn-default print"> > <i class="fa fa-print"></i> Print slip and confirm > </button> > [% END %] > >- <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny" onclick="$('#barcode').focus(); return false;"> >+ <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny"> > <i class="fa fa-times"></i> Ignore > </button> > </div> >@@ -672,12 +672,12 @@ > > <label for="return_date_override_remember"> Remember for next check in:</label> > [% IF ( return_date_override_remember ) %] >- <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" checked="checked" /> >+ <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" checked="checked" /> > [% ELSE %] >- <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" /> >+ <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" /> > [% END %] > >- <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.return_date_override.value = ''; this.form.return_date_override_remember.checked = false; this.form.barcode.focus(); return false;" /> >+ <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" /> > </div> > [% END %] > [% FOREACH inputloo IN inputloop %] >@@ -920,6 +920,28 @@ > $('.openWin').on("click",function(e){ > Dopop( $(this).data("url") ); > }); >+ >+ $('.print').on("click",function(e){ >+ this.form.print_slip.value = 1; >+ this.form.submit(); >+ }); >+ >+ $('.cancel-hold').on("click",function(e){ >+ this.form.cancel_reserve.value = 1; >+ this.form.submit(); >+ }); >+ >+ $('.cancel-transfer').on("click",function(e){ >+ window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber | html %]&canceltransfer=1' >+ }); >+ >+ $('.action').on("click",function(e){ >+ this.checked = false; >+ this.form.return_date_override.value = ''; >+ this.form.return_date_override_remember.checked = false; >+ this.form.barcode.focus(); >+ return false; >+ }); > }); > </script> > [% END %] >-- >2.20.1 (Apple Git-117)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21346
:
78724
|
78726
|
78902
|
78915
|
78916
|
78942
|
78943
|
79685
|
79686
|
80879
|
81100
|
81836
|
81853
|
81921
|
81924
|
82049
|
82189
|
82190
|
82191
|
82192
|
82891
|
87625
|
87626
|
87627
|
87628
|
87894
|
87895
|
87896
| 87898