Sélectionner une révision Git
survey_question_template.xml 1,44 Kio
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- A page -->
<template id="ethikis_survey_attachment_page" inherit_id="survey.page">
<xpath expr="//div[@class='js_question-wrapper']/t[last()]" position="after">
<t t-if="question.type == 'upload_file'"><t t-call="ethikis_survey_attachment.upload_file"/></t>
</xpath>
</template>
<!-- Printable view of a survey (all pages) -->
<template id="ethikis_survey_attachment_print" inherit_id="survey.survey_print">
<xpath expr="//div[@class='js_question-wrapper']/t[last()]" position="after">
<t t-if="question.type == 'upload_file'"><t t-call="ethikis_survey_attachment.upload_file"/></t>
</xpath>
</template>
<!-- UPLOAD FILE TEMPLATE -->
<template id="upload_file" name="Upload file">
<div>
<t t-if="user_input_line_upload_file">
<t t-foreach="user_input_line_upload_file" t-as="upload_file" t-if="upload_file.question_id.id == question.id">
<a width="100px" height="100px" t-att-href="'data:%s;base64,%s' % (upload_file.file_type, to_text(upload_file.file))" target="_blank">Telecharger</a>
</t>
</t>
<t t-else="">
<div class="file-field" >
<input class="form-control" type="file" t-att-name="prefix"/>
</div>
<br/>
</t>
</div>
</template>
</odoo>