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.
44 lines
2.8 KiB
44 lines
2.8 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template id="matrix" inherit_id="survey.matrix">
|
|
<xpath expr="//table" position="replace">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th t-foreach="question.labels_ids" t-as="col_label"><span t-field="col_label.value"/></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr t-foreach="question.labels_ids_2" t-as="row_label">
|
|
<th><span t-field="row_label.value"/></th>
|
|
<td t-foreach="question.labels_ids" t-as="col_label">
|
|
<input t-if="question.matrix_subtype == 'simple'" type="radio" t-att-name="'%s_%s' % (prefix, row_label.id)" t-att-value='col_label.id'/>
|
|
<input t-if="question.matrix_subtype == 'multiple'" type="checkbox" t-att-name="'%s_%s_%s' % (prefix, row_label.id, col_label.id)" t-att-value='col_label.id'/>
|
|
<t t-if="question.matrix_subtype == 'custom'">
|
|
<textarea t-if="col_label.type == 'free_text'" class="form-control" rows="3" t-att-name="'%s_%s_%s' % (prefix, row_label.id, col_label.id)"></textarea>
|
|
<input t-if="col_label.type == 'textbox'" type="text" class="form-control" t-att-name="'%s_%s_%s' % (prefix, row_label.id, col_label.id)"/>
|
|
<input t-if="col_label.type == 'numerical_box'" type="number" step="any" class="form-control" t-att-name="'%s_%s_%s' % (prefix, row_label.id, col_label.id)"/>
|
|
<!-- <div t-if="col_label.type == 'date'" class='input-group date' t-attf-id="#datetimepicker_#{question.id}_#{row_label.id}_#{col_label.id}" data-target-input="nearest">
|
|
<input type="text" class="form-control datetimepicker-input" t-attf-data-target="#datetimepicker_#{question.id}_#{row_label.id}_#{col_label.id}" t-att-name="'%s_%s_%s' % (prefix, row_label.id, col_label.id)"/>
|
|
<div class="input-group-append" t-attf-data-target="#datetimepicker_#{question.id}_#{row_label.id}_#{col_label.id}" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
|
</div>
|
|
</div> -->
|
|
<select t-if="col_label.type == 'dropdown'" t-att-name="'%s_%s_%s' % (prefix, row_label.id, col_label.id)" class="form-control" id="seldpbox1">
|
|
<option></option>
|
|
<t t-foreach="col_label.value_ids" t-as="dpv">
|
|
<option t-att-value="dpv.id"><t t-esc="dpv.name"/></option>
|
|
</t>
|
|
</select>
|
|
<input t-if="col_label.type == 'checkbox'" type="checkbox" t-att-name="'%s_%s_%s' % (prefix, row_label.id, col_label.id)" t-att-value='col_label.id'/>
|
|
</t>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|