[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
This commit is contained in:
@@ -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('@') < 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user