Skip to content
Extraits de code Groupes Projets
Valider 64a01090 rédigé par jordan's avatar jordan
Parcourir les fichiers

[fix] clean héritage du template pour problème de script sur les questions conditionnelles

parent 1ffbf942
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -133,41 +133,32 @@
</div>
</xpath>
<xpath expr="//form" position="replace">
<form role="form" method="post" class="js_surveyform" t-att-name="'%s_%s' % (survey.id, page.id)" t-att-action="'/survey/fill/%s/%s' % (slug(survey), token)" t-att-data-prefill="'/survey/prefill/%s/%s/%s' % (slug(survey), token, slug(page))" t-att-data-validate="'/survey/validate/%s' % (slug(survey))" t-att-data-submit="'/survey/submit/%s' % (slug(survey))">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<input type="hidden" name="page_id" t-att-value="page.id" />
<input type="hidden" name="token" t-att-value="token" />
<t t-foreach='page.question_ids' t-as='question'>
<t t-set="prefix" t-value="'%s_%s_%s' % (survey.id, page.id, question.id)" />
<div class="js_question-wrapper" t-att-id="prefix">
<xpath expr="//form//h2" position="replace">
<h4>
<span t-field='question.question' />
<span t-if="question.constr_mandatory" class="text-danger">*</span>
</h4>
</xpath>
<xpath expr="//form//div[@class='text-muted oe_no_empty']" position="replace">
<span t-if="question.description != '&lt;p&gt;&lt;br&gt;&lt;/p&gt;'">
<div t-field='question.description' class="text-muted oe_no_empty"/>
</span>
<t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t>
<t t-if="question.type == 'textbox'"><t t-call="survey.textbox"/></t>
<t t-if="question.type == 'numerical_box'"><t t-call="survey.numerical_box"/></t>
<t t-if="question.type == 'date'"><t t-call="survey.date"/></t>
<t t-if="question.type == 'simple_choice'"><t t-call="survey.simple_choice"/></t>
<t t-if="question.type == 'multiple_choice'"><t t-call="survey.multiple_choice"/></t>
<t t-if="question.type == 'matrix'"><t t-call="survey.matrix"/></t>
<div class="js_errzone alert alert-danger" style="display:none;" role="alert"/>
</div>
</t>
</xpath>
<xpath expr="//form//div[@class='text-center mt16 mb16']" position="replace">
<div class="text-right mt16 mb16 mr32">
<button t-if="survey.users_can_go_back and page_nr > 0" type="submit" class="btn ethikis-btn-green" name="button_submit" value="previous">Previous page</button>
<button t-if="not last" type="submit" class="btn ethikis-btn-blue" name="button_submit" value="save_quit">Sauvegarder et quitter</button>
<button t-if="not last" type="submit" class="btn ethikis-btn-blue" name="button_submit" value="next">Page suivante</button>
<button t-if="last" type="submit" class="btn ethikis-btn-blue" name="button_submit" value="finish">Submit survey</button>
</div>
</xpath>
<xpath expr="//form" position="inside">
<div class="float-left">
Page <span t-raw='page_nr + 1'/> of <span t-raw="len(survey.page_ids)"/>
</div>
</form>
</xpath>
</template>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter