Bugzilla – Attachment 114749 Details for
Bug 27290
Cash register allows for 'amount tendered' less than amount being paid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27290: Clean up validation
Bug-27290-Clean-up-validation.patch (text/plain), 2.48 KB, created by
Martin Renvoize (ashimema)
on 2020-12-30 15:22:00 UTC
(
hide
)
Description:
Bug 27290: Clean up validation
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-12-30 15:22:00 UTC
Size:
2.48 KB
patch
obsolete
>From c60b6a16f681b3211ceae3c031c1d14e4f9cd53e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 30 Dec 2020 15:16:46 +0000 >Subject: [PATCH] Bug 27290: Clean up validation > >It seems we had the validator instantiated twice and we used a mix of >validation of required at form element level and in JS instantiator. > >This patch moves the rules to consistently apply at the instantiation >and removes the duplicate lines. >--- > .../intranet-tmpl/prog/en/modules/pos/pay.tt | 22 +++++++------------ > 1 file changed, 8 insertions(+), 14 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index 188702f8f5..6d1207a4c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -128,7 +128,7 @@ > > <li> > <label for="registerid">Cash register: </label> >- <select name="registerid" id="registerid" required="required"> >+ <select name="registerid" id="registerid"> > <option id="noregister" disabled selected="selected" value="">-- Select an option--</option> > [% PROCESS options_for_registers %] > </select> >@@ -370,11 +370,16 @@ > $('#payForm').submit(); > }); > >- $( "#payForm" ).validate({ >+ $('#payForm').validate({ > rules: { >- paid: { required: true }, >+ paid: { >+ required: true >+ }, > collected: { > required: true >+ }, >+ registerid: { >+ required: true > } > } > }); >@@ -401,17 +406,6 @@ > } > }); > >- $('#payForm').validate({ >- rules: { >- collected: { >- required: true >- }, >- registerid: { >- required: true >- } >- } >- }); >- > [% IF payment_id && Koha.Preference('FinePaymentAutoPopup') %] > $("#printReceipt").click(function() { > var win = window.open('/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=[% payment_id | uri %]&collected=[% collected | uri %]&change=[% change | uri %]', '_blank'); >-- >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 27290
:
114568
|
114670
|
114671
|
114747
|
114748
|
114749
|
114757
|
116389
|
116472