[IMP] Small change to print template in order to print all the answers (part2)

bzr revid: rim@openerp.com-20131227150516-yyzpcqc9uu6a4ux5
This commit is contained in:
Richard Mathot (OpenERP) 2013-12-27 16:05:16 +01:00
parent 67709cac47
commit 38a245e1fb
1 changed files with 22 additions and 27 deletions

View File

@ -262,36 +262,31 @@
<h1 t-field='page.title' />
<div t-field='page.description'/>
</div>
<!-- <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">
<h2>
<span t-field='question.question' />
<span t-if="question.constr_mandatory" class="text-danger">*</span>
</h2>
<p class="text-muted"><t t-if="question.description"><span t-field='question.description'/></t></p>
<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 == 'datetime'"><t t-call="survey.datetime"/></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;"></div>
</div>
<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">
<h2>
<span t-field='question.question' />
<span t-if="question.constr_mandatory" class="text-danger">*</span>
</h2>
<p class="text-muted"><t t-if="question.description"><span t-field='question.description'/></t></p>
<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 == 'datetime'"><t t-call="survey.datetime"/></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;"></div>
</div>
</t>
<hr/>
</t>
<hr/>
</t>
</form>
</form>
</div>
</div>
</div>
</div>
</t>
</t>
</template>
</data>
</openerp>