Add support for displaying a message when a formset is empty.
Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
d59466123b
commit
93dbf789d0
@@ -52,11 +52,16 @@
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% for form in formset.forms %}
|
||||
{% include 'appearance/generic_form_instance.html' %}
|
||||
{% for form in formset.forms %}
|
||||
{% include 'appearance/generic_form_instance.html' %}
|
||||
{% empty %}
|
||||
<tr><td class="text-center" colspan=99>
|
||||
{% if form_empty_label %}{{ form_empty_label }}{% else %}{% trans 'No results' %}{% endif %}
|
||||
</td></tr>
|
||||
{% endfor %}
|
||||
|
||||
{% if form_display_mode_table %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user