Odoo modules related to surveys
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.6 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="survey.survey_print" name="Survey">
  4. <t t-call="survey.layout">
  5. <div class="wrap">
  6. <div class="container">
  7. <t t-call="survey.back" />
  8. <div class="row">
  9. <div class='jumbotron mt32' style="width:100%;">
  10. <h1><span t-field='survey.title'/></h1>
  11. <t t-if="survey.description"><div t-field='survey.description' class="oe_no_empty"/></t>
  12. </div>
  13. <div role="form" class="js_surveyform" t-att-name="'%s' % (survey.id)" t-att-data-prefill="'/survey/prefill/%s/%s' % (slug(survey), token)" style="width: -moz-available;">
  14. <t t-foreach="survey.page_ids" t-as="page">
  15. <div class="page-header">
  16. <h1 t-field='page.title' />
  17. <t t-if="page.description"><div t-field='page.description' class="oe_no_empty"/></t>
  18. </div>
  19. <t t-foreach='page.question_ids' t-as='question'>
  20. <t t-set="prefix" t-value="'%s_%s_%s' % (survey.id, page.id, question.id)" />
  21. <div class="js_question-wrapper" t-att-id="prefix">
  22. <h2>
  23. <span t-field='question.question' />
  24. <span t-if="question.constr_mandatory" class="text-danger">*</span>
  25. <span t-if="quizz_correction" class="badge" t-att-data-score-question="question.id"></span>
  26. </h2>
  27. <t t-if="question.description"><div class="text-muted oe_no_empty" t-field='question.description'/></t>
  28. <t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t>
  29. <t t-if="question.type == 'textbox'"><t t-call="survey.textbox"/></t>
  30. <t t-if="question.type == 'numerical_box'"><t t-call="survey.numerical_box"/></t>
  31. <t t-if="question.type == 'date'"><t t-call="survey.date"/></t>
  32. <t t-if="question.type == 'simple_choice'"><t t-call="survey.simple_choice"/></t>
  33. <t t-if="question.type == 'multiple_choice'"><t t-call="survey.multiple_choice"/></t>
  34. <t t-if="question.type == 'matrix'"><t t-call="survey.matrix"/></t>
  35. <t t-if="question.type == 'upload_file'"><t t-call="survey_attachment.upload_file"/></t>
  36. <div class="js_errzone alert alert-danger" style="display:none;"></div>
  37. </div>
  38. </t>
  39. <hr/>
  40. </t>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </t>
  46. </template>
  47. </odoo>