LP1755625: Mltiple emails in patron editor user/jboyer/lp1755625_multiple_emails
authorJason Boyer <jboyer@library.in.gov>
Thu, 15 Nov 2018 16:43:30 +0000 (11:43 -0500)
committerJason Boyer <jboyer@library.in.gov>
Thu, 15 Nov 2018 16:43:30 +0000 (11:43 -0500)
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.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Open-ILS/src/templates/staff/circ/patron/t_edit.tt2

index 3a502a7..3f95036 100644 (file)
@@ -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()"