Instead of showing invalid email values, remove them and set a validation error then focus the value so user can keep editing.

This commit is contained in:
Nathan Gray 2016-02-25 18:34:20 +00:00
parent 97a4d43312
commit c17bebaab0

View File

@ -760,7 +760,15 @@ var et2_taglist_email = et2_taglist.extend(
if (item.class) label.addClass(item.class);
if (typeof item.title != 'undefined') label.attr('title', item.title);
if (typeof item.data != 'undefined') label.attr('data', item.data);
if (!valid) label.addClass('ui-state-error');
if (!valid) {
label.addClass('ui-state-error');
window.setTimeout(jQuery.proxy(function() {
this.taglist.removeFromSelection(item);
this.set_validation_error(egw.lang("'%1' has an invalid format",item.label));
this.taglist.input.val(item.label).focus();
},this),1);
return null;
}
return label;
}