Bugzilla – Attachment 137276 Details for
Bug 16786
Cannot add multiple emails addresses in an email field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16786: Cannot add multiple emails adresses in an email field
Bug-16786-Cannot-add-multiple-emails-adresses-in-a.patch (text/plain), 1.81 KB, created by
Kyle M Hall (khall)
on 2022-07-07 12:50:37 UTC
(
hide
)
Description:
Bug 16786: Cannot add multiple emails adresses in an email field
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-07-07 12:50:37 UTC
Size:
1.81 KB
patch
obsolete
>From 7086d6fe0c97adcb61e443859a3edd2b2e48cce6 Mon Sep 17 00:00:00 2001 >From: jeremy breuillard <jeremy.breuillard@biblibre.com> >Date: Thu, 7 Jul 2022 13:55:00 +0200 >Subject: [PATCH] Bug 16786: Cannot add multiple emails adresses in an email > field > >The primary email field can allow more than one email adresses if those are separated by comma (,;) > >Test plan: >1) Home > Patrons >2) Create a new patron / Edit an existing patron >3) Part:'Contact information' > Field:'Primary email' : write at least 2 email adresses separated by comma >4) Try to save it... impossible >5) Apply patch and repeat 1) to 3) then save again >6) Now this field allows more than one email adress as long as there is comma separation > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/js/members.js | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 9ae9c18ba8d..1f1c9eccca9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -235,10 +235,22 @@ $(document).ready(function(){ > }, > jQuery.validator.messages.phone); > >+ $.validator.addMethod( >+ "multimail", >+ function(value, element, params) { >+ if ( value ) { >+ const emails = value.split(/[;,]+/); >+ return emails.every(email => jQuery.validator.methods.email.call(this, $.trim(email), element)) >+ } >+ return true >+ >+ }, jQuery.validator.messages.email); >+ > $("#entryform").validate({ > rules: { > email: { >- email: true >+ email: false, >+ multimail: true > }, > emailpro: { > email: true >-- >2.30.2
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 16786
:
137270
|
137274
|
137275
| 137276