[FIX] survey: make the badge fields more visible
Currently, the fields associated to the badge on the survey form are not visible following the changes with the "always edit" feature. This commit simply adds a placeholder on the badge field to let the end user know that there is something to fill in. We also used that opportunity to sneak in a few additional placeholders. Task-3028991 closes odoo/odoo#104182 X-original-commit: 2df6ce4708554d3dad59a9b9b15f03057c204c43 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
@@ -3298,6 +3298,21 @@ msgstr ""
|
||||
msgid "Peter W. Higgs"
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model_terms:ir.ui.view,arch_db:survey.survey_survey_view_form
|
||||
msgid "Pick a Badge..."
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model_terms:ir.ui.view,arch_db:survey.survey_survey_view_form
|
||||
msgid "Pick a Style..."
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model_terms:ir.ui.view,arch_db:survey.survey_survey_view_form
|
||||
msgid "Pick a Template..."
|
||||
msgstr ""
|
||||
|
||||
#. module: survey
|
||||
#: model:survey.question,title:survey.survey_demo_burger_quiz_p1_q1
|
||||
msgid "Pick a subject"
|
||||
|
||||
@@ -122,13 +122,15 @@
|
||||
<div class="o_checkbox_optional_field">
|
||||
<field name="certification" nolabel="1"/>
|
||||
<div attrs="{'invisible': [('certification', '=', False)]}" class="w-100">
|
||||
<field name="certification_report_layout" class="w-50"/>
|
||||
<field name="certification_report_layout" placeholder="Pick a Style..." class="w-50"/>
|
||||
<button name="action_survey_preview_certification_template"
|
||||
string="Preview" type="object"
|
||||
icon="fa-external-link" target="_blank" class="btn-link pt-0"/>
|
||||
</div>
|
||||
</div>
|
||||
<field name="certification_mail_template_id" attrs="{'invisible': [('certification', '=', False)]}"/>
|
||||
<field name="certification_mail_template_id"
|
||||
placeholder="Pick a Template..."
|
||||
attrs="{'invisible': [('certification', '=', False)]}"/>
|
||||
<label for="certification_give_badge"
|
||||
attrs="{'invisible': ['|', ('certification', '=', False), ('users_login_required', '=', False)]}"/>
|
||||
<div class="float-start o_checkbox_optional_field"
|
||||
@@ -136,6 +138,7 @@
|
||||
<field name="certification_give_badge"/>
|
||||
<div attrs="{'invisible': [('certification_give_badge', '=', False)]}">
|
||||
<field name="certification_badge_id"
|
||||
placeholder="Pick a Badge..."
|
||||
attrs="{'invisible': ['|', ('certification_give_badge', '=', False), ('certification_badge_id', '!=', False)], 'required': [('certification_give_badge', '=', True)]}"
|
||||
domain="[('survey_id', '=', active_id), ('survey_id', '!=', False)]"
|
||||
context="{'default_name': title,
|
||||
@@ -144,6 +147,7 @@
|
||||
'default_level': None,
|
||||
'form_view_ref': 'survey.gamification_badge_form_view_simplified'}"/>
|
||||
<field name="certification_badge_id_dummy" attrs="{'invisible': ['|', ('certification_give_badge', '=', False), ('certification_badge_id', '=', False)]}"
|
||||
placeholder="Pick a Badge..."
|
||||
options="{'no_create': True}"
|
||||
context="{'form_view_ref': 'survey.gamification_badge_form_view_simplified'}"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user