[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 8a1de53fe3730eac365cf31e9e70ee104cb4347a
Evergreen Git
git at git.evergreen-ils.org
Fri Nov 16 16:49:56 EST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_3_1 has been updated
via 8a1de53fe3730eac365cf31e9e70ee104cb4347a (commit)
from 14d6af63440fb724de475e6bc37dce941b19f1e5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8a1de53fe3730eac365cf31e9e70ee104cb4347a
Author: Jason Boyer <jboyer at library.in.gov>
Date: Thu Nov 15 11:43:30 2018 -0500
LP1755625: Multiple emails in patron editor
Even though the HTML5 "email" input type allows multiple
addresses to be separated by commas there is nothing that
can be done to signal to Angular.js that this is ok; it
will only ever accept a single address. This patch forces
the type of the input tag to plain text so Angular will
rely on any supplied regex to verify the entry.
The ui.patron.edit.au.email.regex (Regex for email field on patron
registration) library setting can be used to control whether
one or multiple email addresses will be permitted on the
patron registration form.
To allow multiple addresses, that setting can be:
^(?:(?:\b[^@,\s]+@[^@,\s]+\.[^@.,\s]+\b)(?:,\s?(?!$)|$))*$
To allow only a single address, use:
^(?:\b[^@,\s]+@[^@,\s]+\.[^@.,\s]+\b)$
To test
-------
[1] In the web staff client, try to register a new patron, entering
multiple email addresseses in the email field separated by
commas.
[2] Note that the email field displays as invalid and the
record cannot be saved.
[3] Apply the patch and repeat step #1, This time, the email
field should accept multiple addresses.
[4] Set the Regex for email field on patron registration library
setting to the multiple-email form listed above. Reload
the patron registration form and verify that it will
continue to accept multiple email addresses but will not
accept entry that doesn't look like an email address.
[5] Set the library setting to the single-address value. Reload
the patron registration form; this time it should accept
a valid email address but not multiple ones.
Signed-off-by: Jason Boyer <jboyer at library.in.gov>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
Signed-off-by: Cesar Velez <cesar.velez at equinoxinitiative.org>
diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
index 3d04ada..801cd4e 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -113,7 +113,9 @@ MACRO draw_form_input(cls, field, path, type, disable) BLOCK;
%]
<div class="col-md-3 reg-field-input">
<input
- type="[% type %]"
+ [% IF type == "email" %]type="text"
+ [% ELSE %]type="[% type %]"
+ [% END %]
class="form-control"
name="[% model %]"
ng-change="field_modified()"
-----------------------------------------------------------------------
Summary of changes:
.../src/templates/staff/circ/patron/t_edit.tt2 | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list