Bugzilla – Attachment 104188 Details for
Bug 21565
SCO checkout confirm should be modal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21565: (follow-up) Make confirmation buttons more detailed
Bug-21565-follow-up-Make-confirmation-buttons-more.patch (text/plain), 2.82 KB, created by
Katrin Fischer
on 2020-05-02 13:43:05 UTC
(
hide
)
Description:
Bug 21565: (follow-up) Make confirmation buttons more detailed
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-05-02 13:43:05 UTC
Size:
2.82 KB
patch
obsolete
>From d32d7019769378588baa6d08e841bc405696cefe Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 29 Apr 2020 17:57:44 +0000 >Subject: [PATCH] Bug 21565: (follow-up) Make confirmation buttons more > detailed > >This patch updates the confirmation buttons to be more specific about >what each one does. My concern was that it wasn't clear that "No" meant >"No receipt" and not "Cancel logging out." > >The patch also updates the modal confirmation code so that the modal >body is removed if no message is passed for it. > >To test, apply the patch and repeat the previous test plan. When you >click "Finish" you should have the options "Print receipt and end >session" and "End session." > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/js/global.js | 6 +++++- > 2 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index 6383a7a1a0..4b3fe8a652 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -478,7 +478,7 @@ > clearTimeout(mainTimeout); > [% IF Koha.Preference('SelfCheckReceiptPrompt') %] > var confirmStart = Date.now(); >- confirmModal("", _("Would you like to print a receipt?"), _("Yes"), _("No"), function(result) { >+ confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { > if ( result && (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) { > var win = window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip"); > win.print(); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/global.js b/koha-tmpl/opac-tmpl/bootstrap/js/global.js >index ac1bc27af9..76ce7b5cb0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/global.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/global.js >@@ -82,7 +82,11 @@ function confirmModal(message, title, yes_label, no_label, callback) { > } > > $("#bootstrap-confirm-box-modal .modal-header h4").text( title || "" ); >- $("#bootstrap-confirm-box-modal .modal-body").html( message || "" ); >+ if( message && message != "" ){ >+ $("#bootstrap-confirm-box-modal .modal-body").html( message || "" ); >+ } else { >+ $("#bootstrap-confirm-box-modal .modal-body").remove(); >+ } > $("#bootstrap-confirm-box-modal-submit").text( yes_label || 'Confirm' ); > $("#bootstrap-confirm-box-modal-cancel").text( no_label || 'Cancel' ); > $("#bootstrap-confirm-box-modal").modal('show'); >-- >2.11.0
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 21565
:
96107
|
103703
|
103971
|
103972
|
103980
| 104188