PURPOSE This commit removes a few unessential content, fixes misalignments and removes the input autofocus on mobile devices SPECS Remove a few unessential content Some contents take a considerable space on mobile without adding essential information, requiring the user to scroll to see useful info. These contents are now removed on mobile devices. Fix misalignments Some parts were misaligned on small screens, taking unnecessary space or cutting parts of sentences. These parts have been adapted to handle small screens. Remove action buttons related to live sessions on small screens Since the presentation mode doesn't look good on mobile devices (questions have a lot of linebreaks, arrows do not always work), and since normally no one presents a live session using a mobile device, the action buttons "Create Live Session", "Open Session Manager" and "Close Live Session" are now hidden on small screens. Remove the autofocus on the first input in survey forms on mobile devices When a new page of a survey is loaded, the first input is autofocused so that the user can directly complete the survey without manually getting the focus. This causes inconsistencies and undesired behaviors on mobile devices. Especially, when the focus is set automatically on Android devices, the soft keyboard is opened, the viewport is reduced and the view is scrolled to the input, which involves that the user misses information about the survey (such as the beginning of the question for long questions), or section descriptions. The autofocus has therefore been removed for mobile devices. Task-2622693 Part-of: odoo/odoo#87990
68 lines
4.1 KiB
XML
68 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record model="ir.ui.view" id="survey_invite_view_form">
|
|
<field name="name">survey.invite.view.form</field>
|
|
<field name="model">survey.invite</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Compose Email">
|
|
<group col="1">
|
|
<group col="2">
|
|
<field name="survey_access_mode" invisible="1"/>
|
|
<field name="survey_users_login_required" invisible="1"/>
|
|
<field name="survey_users_can_signup" invisible="1"/>
|
|
<field name="survey_id" readonly="context.get('default_survey_id')"/>
|
|
<field name="existing_mode" widget="radio" invisible="1" />
|
|
<field name="render_model" invisible="1"/>
|
|
<field name="survey_start_url" label="Public share URL" readonly="1" widget="CopyClipboardChar"
|
|
attrs="{'invisible':[('survey_access_mode', '!=', 'public')]}"
|
|
class="mb16"/>
|
|
<field name="partner_ids"
|
|
widget="many2many_tags_email"
|
|
placeholder="Add existing contacts..."
|
|
context="{'force_email':True, 'show_email':True, 'no_create_edit': True}"/>
|
|
<field name="emails"
|
|
attrs="{
|
|
'invisible': [('survey_users_login_required', '=', True)],
|
|
}"
|
|
placeholder="Add a list of email recipients (separated by commas, semicolons or line breaks). They will not be converted into contacts."/>
|
|
</group>
|
|
<div col="2" class="alert alert-warning" role="alert"
|
|
attrs="{'invisible': ['|', ('survey_access_mode', '=', 'public'), ('existing_text', '=', False)]}">
|
|
<field name="existing_text"/>
|
|
<group col="2">
|
|
<label for="existing_mode" string="Handle existing"/>
|
|
<div>
|
|
<field name="existing_mode" nolabel="1"/>
|
|
<p attrs="{'invisible': [('existing_mode', '!=', 'resend')]}">Customers will receive the same token.</p>
|
|
<p attrs="{'invisible': [('existing_mode', '!=', 'new')]}">Customers will receive a new token and be able to completely retake the survey.</p>
|
|
</div>
|
|
</group>
|
|
<field name="existing_partner_ids" invisible="1"/>
|
|
<field name="existing_emails" invisible="1"/>
|
|
</div>
|
|
<group col="2">
|
|
<field name="subject" placeholder="Subject..."/>
|
|
</group>
|
|
<field name="can_edit_body" invisible="1"/>
|
|
<field name="body" class="oe-bordered-editor" options="{'style-inline': true, 'height': 380}" attrs="{'readonly': [('can_edit_body', '=', False)]}" force_save="1"/>
|
|
<group>
|
|
<group>
|
|
<field name="attachment_ids" widget="many2many_binary"/>
|
|
</group>
|
|
<group>
|
|
<field name="deadline"/>
|
|
<field name="template_id" label="Use template"/>
|
|
</group>
|
|
</group>
|
|
</group>
|
|
<footer>
|
|
<button string="Send" name="action_invite" type="object" class="btn-primary" data-hotkey="q"/>
|
|
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|