Files
odoo_source/addons/website_event_questions/views/event_templates.xml
T
Jérémy Hennecart (jeh) 8285c2a6d1 [IMP] website_event(_*): refont frontend based on colors chosen
This commit removed static background color and the like in all event
modules. Since it's possible to configure colors from the website_editor,
we should used these ones in the frontend.

When an element is superposed on the background we used the later with a
mix of the primary color to have a demarcation and a better visibility
based on the colors chosen.

task-2845417

Part-of: odoo/odoo#91883
2022-09-06 22:31:03 +02:00

52 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="registration_attendee_details_questions" inherit_id="website_event.registration_attendee_details" name="Registration Attendee Details with questions">
<!-- Attendee specific questions -->
<xpath expr="//t[@name='attendee_loop']//*[hasclass('modal-body')]" position="inside">
<t t-if="event.specific_question_ids">
<div t-foreach="event.specific_question_ids" t-as="question" class="row" t-att-name="question.title">
<div class="col-lg-6 mt-2">
<t t-call="website_event_questions.registration_event_question">
<t t-set="registration_index" t-value="counter"/>
</t>
</div>
</div>
</t>
</xpath>
<!-- Generic questions -->
<xpath expr="//*[hasclass('modal-footer')]" position="before">
<t t-if="event.general_question_ids">
<div class="modal-body border-bottom o_wevent_registration_question_global">
<div t-foreach="event.general_question_ids" t-as="question" class="row" t-att-name="question.title">
<div class="col-lg-6 mt-2">
<t t-call="website_event_questions.registration_event_question">
<t t-set="registration_index" t-value="0"/>
</t>
</div>
</div>
</div>
</t>
</xpath>
</template>
<template id="registration_event_question" name="Registration Event Question">
<label t-out="question.title"/>
<span t-if="question.is_mandatory_answer">*</span>
<t t-if="question.question_type == 'simple_choice'">
<select t-attf-name="question_answer-#{registration_index}-#{question.id}" class="form-select"
t-att-required="question.is_mandatory_answer">
<option value=""/>
<t t-foreach="question.answer_ids" t-as="answer">
<option t-out="answer.name" t-att-value="answer.id"/>
</t>
</select>
</t>
<t t-elif="question.question_type == 'text_box'">
<textarea t-attf-name="question_answer-#{registration_index}-#{question.id}" class="col-lg-12 form-control"
t-att-required="question.is_mandatory_answer"/>
</t>
</template>
</odoo>