49 lines
1.6 KiB
HTML
49 lines
1.6 KiB
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>
|
||
|
||
{% if source_type_name == 'mail' %}
|
||
<!-- special alfortville stuff, this should be factored out -->
|
||
<div id="copies">
|
||
<p><strong>Copies</strong> (<a rel="popup" data-inplace-submit="true" href="{% url 'alfortville-copies' pk=source_pk %}">{% trans 'Edit' %}</a>)</p>
|
||
<p class="info">Pour information : <span>...</span></p>
|
||
<p class="avis">Pour avis facultatif : <span>...</span></p>
|
||
<p class="mandatory_avis">Pour avis requis : <span>...</span></p>
|
||
<script>$('#copies').trigger('welco:load-copies');</script>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if associations|length %}
|
||
<div class="done">
|
||
{% if validation_steps %}
|
||
{% for validation_step in validation_steps %}
|
||
<button class="done" data-action-url="{% url 'qualif-done' %}?step={{validation_step.id}}">{{validation_step.label}}</button>
|
||
{% endfor %}
|
||
{% else %}
|
||
<button class="done" data-action-url="{% url 'qualif-done' %}">{% trans 'Submit' %}</button>
|
||
{% endif %}
|
||
</div>
|
||
{% endif %}
|
||
</form>
|
||
{% endif %}
|
||
</div>
|