27 lines
692 B
HTML
27 lines
692 B
HTML
{% load i18n %}
|
|
<div {% if not source_pk %}class="inactive"{% endif %}>
|
|
{% if source_pk %}
|
|
<form>
|
|
{% if associations|length %}
|
|
<ul>
|
|
{% for association in associations %}
|
|
<li>{{association.formdef_name}}
|
|
{% if not association.formdata_id %}
|
|
(<a class="remove" href="{% url 'ajax-remove-association' pk=association.id %}">✖</a>)</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<li><a href="#" class="plus">{% trans 'Add another' %}</a></li>
|
|
</ul>
|
|
{% endif %}
|
|
|
|
<div class="add-formdef-reference" {% if associations|length %}style="display: none"{% endif %}>
|
|
<div>
|
|
{{form.formdef_reference}}
|
|
</div>
|
|
<button class="add">{% trans 'Add' %}</button>
|
|
</div>
|
|
|
|
</form>
|
|
{% endif %}
|
|
</div>
|