[IMP] sms: autofocus on "body" for valid phone number in single mode
Before Commit: When users wants to send an SMS to someone with help of the phone widget, the composer is opened, and users expect to be able to write the message right away. The issue is that the default focus is on the phone number, so if users start writing, it will corrupt the phone nubmber, and they have to discard the changes and have to click the body to finally start typing SMS content. After Commit: When the composer is opened, if the phone number is valid, 'body' field is focused automatically so that users can start typing right away. If number is not valid, the focus will still be on the phone number. This is managed by providing 'default_focus' attibute on the body field, which appears or is hidden as needed. For the mass mode also, we simply focus on the body field to enable user to start writing content right away. closes odoo/odoo#65443 Task-id: 2394488 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
committed by
Dharmraj Jhala
parent
d34c9c224c
commit
d30663503d
@@ -48,7 +48,8 @@
|
||||
<field name="recipient_single_number_itf" class="oe_inline" nolabel="1" options="{'onchange_on_keydown': True}" placeholder="e.g. +1 415 555 0100"/>
|
||||
</div>
|
||||
|
||||
<field name="body" widget="sms_widget"/>
|
||||
<field name="body" widget="sms_widget" attrs="{'invisible': ['|', ('comment_single_recipient', '=', False), ('recipient_single_valid', '=', True)]}"/>
|
||||
<field name="body" widget="sms_widget" attrs="{'invisible': [('comment_single_recipient', '=', True), ('recipient_single_valid', '=', False)]}" default_focus="1"/>
|
||||
<field name="mass_keep_log" invisible="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
Reference in New Issue
Block a user