Bugzilla – Attachment 141300 Details for
Bug 30979
Add ability for OPAC users to checkout to themselves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30979: Handle more failure cases
Bug-30979-Handle-more-failure-cases.patch (text/plain), 2.91 KB, created by
Martin Renvoize (ashimema)
on 2022-10-04 09:40:49 UTC
(
hide
)
Description:
Bug 30979: Handle more failure cases
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-10-04 09:40:49 UTC
Size:
2.91 KB
patch
obsolete
>From 3b21ec5773fc571da2011a5b3a34983679242f2f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 3 Oct 2022 17:23:33 +0100 >Subject: [PATCH] Bug 30979: Handle more failure cases > >--- > .../opac-tmpl/bootstrap/js/modals/checkout.js | 33 +++++++++++-------- > 1 file changed, 19 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js b/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js >index 522f60b9ad..d5b8fcb605 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js >@@ -1,33 +1,38 @@ > $(document).ready(function() { > >- function resetResults(){ >+ function resetResults() { > $('#checkoutResults').replaceWith('<div id="checkoutResults"></div>'); > $('#availabilityResult').replaceWith('<div id="availabilityResult"></div>'); > }; > >- function addResult(type, code, data){ >+ function addResult(type, code, data) { > let result = ''; >- if ( type == 'danger' ) { >+ if (type == 'danger') { > result += '<div class="alert alert-danger">'; >- } else if ( type == 'warning' ) { >+ } else if (type == 'warning') { > result += '<div class="alert alert-warning">'; >- } else if ( type == 'info' ) { >+ } else if (type == 'info') { > result += '<div class="alert alert-info">'; > } else { > result += '<div class="alert alert-success">'; > } > >- if ( code == 'NOT_FOUND' ) { >+ if (code == 'NOT_FOUND') { > result += _("Item '%s' not found").format(data); >- } >- else if ( code == 'RENEW_ISSUE' ) { >+ } else if (code == 'RENEW_ISSUE') { > result += _("Item will be renewed").format(data); >- } >- else if ( code == 'OTHER_CHARGES' ) { >- result += _("Your account current has outstanding charges of '%s'").format(data); >- } >- else { >- result += _("Message code '%s' with data '%s'").format(code,data); >+ } else if (code == 'OTHER_CHARGES') { >+ result += _("Your account currently has outstanding charges of '%s'").format(data); >+ } else if (code == 'ISSUED_TO_ANOTHER') { >+ result += _("This item appears to be checked out to another patron, please return it to the desk"); >+ } else if (code == 'RESERVED') { >+ result += _("This item appears to be reserved for another patron, please return it to the desk"); >+ } else if (code == 'NOT_FOR_LOAN') { >+ result += _("This item is not normally for loan, please select another or ask at the desk"); >+ } else if (code == 'WTHDRAWN') { >+ result += _("This item is marked withdrawn, please select another or ask at the desk"); >+ } else { >+ result += _("Message code '%s' with data '%s'").format(code, data); > } > > result += '</div>'; >-- >2.20.1
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 30979
:
139131
|
139132
|
139133
|
139134
|
141274
|
141275
|
141276
|
141277
|
141278
|
141279
|
141300
|
145264
|
145265
|
145266
|
145267
|
145268
|
145277
|
145280
|
145281
|
145282
|
145283
|
145284
|
145285
|
145620
|
145621
|
145622
|
145623
|
145624
|
145625
|
145626
|
145627
|
145628
|
145629
|
145630
|
150867
|
150868
|
150869
|
150870
|
150871
|
150872
|
150873
|
150874
|
150875
|
150876
|
150877
|
150878
|
150879
|
150880
|
150881
|
150882
|
150883
|
150884
|
150885
|
150886
|
150887
|
150888
|
150889
|
150967
|
150968
|
150969
|
150970
|
150971
|
150972
|
150973
|
150974
|
151254
|
151255
|
151256
|
151257
|
151258
|
151259
|
151260
|
151261
|
151358
|
151359
|
151360
|
151361
|
151362
|
151363
|
151364
|
151365
|
151368
|
151369
|
151370
|
151371
|
151372
|
151373
|
151374
|
151375
|
151376
|
152789
|
152790
|
152791
|
152792
|
152793
|
152794
|
152795
|
152796
|
152797
|
153459
|
153460
|
153461
|
153462
|
153463
|
153464
|
153465
|
153466
|
153467
|
153500
|
153501
|
153502
|
153503