Skip to content
Snippets Groups Projects
Commit aa7fb8c7 authored by XavierDo's avatar XavierDo
Browse files

[IMP] mail: add warning when partner email is invalid

Change the border and cross color of a recipient in mail
composer when the email is invalid (doesn't contains "@").

When sending an mail from composer the user will see easily
if an email adress is invalid and will cause a NO_VALID_RECIPIENT
error.

Task: #46158
PR: #24628
parent 2ab7ad83
No related branches found
No related tags found
No related merge requests found
......@@ -79,8 +79,15 @@
</t>
<t t-name="FieldMany2ManyTagsEmail" t-extend="FieldMany2ManyTag">
<t t-jquery=".o_badge_text" t-operation="replace">
<span class="o_badge_text" t-attf-title="#{el.email}"><t t-esc="el.display_name"/></span>
<t t-jquery="span[t-attf-class*=badge]" t-operation="replace">
<t t-set="email_error" t-value="''"/>
<t t-if="el.email.indexOf('@') &lt; 0">
<t t-set="email_error" t-value="'o_tag_error'"/>
</t>
<span t-attf-class="badge dropdown o_tag_color_0 #{email_error}" t-att-data-color="color" t-att-data-index="el_index" t-att-data-id="el.id">
<span class="o_badge_text" t-attf-title="#{el.email}"><t t-esc="el.display_name"/></span>
<span t-if="!readonly" class="fa fa-times o_delete"/>
</span>
</t>
</t>
</templates>
......@@ -173,6 +173,12 @@
}
}
}
}
> .o_tag_error{
box-shadow: inset 0 0 0 2px #FF0000;
> .o_delete {
color: #FF0000;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment