From 28c33bf095b5d96618f2ea47edf739f54800fa0e Mon Sep 17 00:00:00 2001 From: Thibaud Guillot Date: Mon, 29 Jan 2024 15:51:47 +0100 Subject: [PATCH] Bug 35087: alternative patch to display validation Same test plan as for the other patch, but here validation impacts the js asset --- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index 36f5014..2a31851 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -119,6 +119,8 @@ $(document).ready(function() { number: true }); + jQuery.validator.addMethod("decimal_rate", jQuery.validator.methods.number, __("Please add rate in valid format: 0.00")); + jQuery.validator.addClassRules("rate", { decimal_rate: true }); @@ -552,16 +554,12 @@ function expandPatronSearchFields(search_fields) { switch(search_fields) { case 'standard': return defaultPatronSearchFields; - break; case 'full_address': return 'streetnumber|streettype|address|address2|city|state|zipcode|country'; - break; case 'all_emails': return 'email|emailpro|B_email'; - break; case 'all_phones': return 'phone|phonepro|B_phone|altcontactphone|mobile'; - break; default: return search_fields; } -- 2.30.2