add custom DynamicArrayField to better handle arrays

This commit is contained in:
Jens Langhammer
2019-03-08 15:11:01 +01:00
parent 56d872af15
commit 6dcdf7bcce
9 changed files with 169 additions and 0 deletions

View File

@ -0,0 +1,17 @@
{% load utils %}
{% spaceless %}
<div class="dynamic-array-widget">
{% for widget in widget.subwidgets %}
<div class="array-item input-group">
{% include widget.template_name %}
<div class="input-group-btn">
<button class="array-remove btn btn-danger" type="button">
<span class="pficon-delete"></span>
</button>
</div>
</div>
{% endfor %}
<div><button type="button" class="add-array-item btn btn-default">Add another</button></div>
</div>
{% endspaceless %}