
The FormsetStep is no longer needed, TableStep is used instead, with a special version of DataTable, FormsetDataTable, that apart from all the normal DataTable features also generates a Django Formset with all of its data, and displays it the same way the FormsetStep did. One issue is not addressed: * The user-provided data in the forms can be lost if that row gets updated by ajax autoupdate. Change-Id: I5264b484f61212c21102739b803d40d9d31ae2cc
28 lines
829 B
HTML
28 lines
829 B
HTML
<tr{{ row.attr_string|safe }}>
|
|
{% for cell in row %}
|
|
<td{{ cell.attr_string|safe }}>
|
|
{% if cell.field %}
|
|
{{ cell.field }}
|
|
{% for error in cell.field.errors %}
|
|
<span class="help-inline">{{ error }}</span>
|
|
{% endfor %}
|
|
{% else %}
|
|
{%if cell.wrap_list %}<ul>{% endif %}{{ cell.value }}{%if cell.wrap_list %}</ul>{% endif %}
|
|
{% endif %}
|
|
{% if forloop.first %}
|
|
{% for field in row.form.hidden_fields %}
|
|
{{ field }}
|
|
{% for error in field.errors %}
|
|
<span class="help-inline">{{ field.name }}: {{ error }}</span>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% if row.form.non_field_errors %}
|
|
<div class="alert alert-error">
|
|
{{ row.form.non_field_errors }}
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|