Allow to export all attachment_types via the new element dialog.

This commit is contained in:
Jan Böhmer 2019-04-11 19:09:22 +02:00
parent 70c12e47a2
commit a46bcd229b
2 changed files with 75 additions and 2 deletions

View file

@ -43,6 +43,8 @@
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#info">{% trans %}infos.label{% endtrans %}</a></li>
{% if entity.id %}
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#export">{% trans %}export.label{% endtrans %}</a> </li>
{% else %}
<li class="nav-item"><a data-toggle="tab" class="link-anchor nav-link" href="#import_export">{% trans %}import_export.label{% endtrans %}</a> </li>
{% endif %}
</ul>
@ -143,6 +145,60 @@
</div>
</form>
</div>
{% else %} {# For new element we have a combined import/export tab #}
<div id="import_export" class="tab-pane fade">
<hr>
<fieldset>
<legend>{% trans %}export_all.label{% endtrans %}</legend>
<form class="form-horizontal" data-no-ajax method="post" action="{{ path('attachment_type_export_all') }}">
<div class="form-row">
<label class="col-form-label col-md-2">{% trans %}export.format{% endtrans %}</label>
<div class="col">
<select class="form-control" name="format">
<option value="json">JSON</option>
<option value="xml">XML</option>
<option value="csv">CSV</option>
<option value="yaml">YAML</option>
</select>
</div>
</div>
<div class="form-row mt-2">
<label class="col-form-label col-md-2">{% trans %}export.level{% endtrans %}</label>
<div class="col">
<select class="form-control" name="level">
<option value="simple">{% trans %}export.level.simple{% endtrans %}</option>
<option value="extended" selected>{% trans %}export.level.extended{% endtrans %}</option>
<option value="full">{% trans %}export.level.full{% endtrans %}</option>
</select>
</div>
</div>
<div class="form-row mt-2">
<div class="offset-2 col">
<div class="form-check abc-checkbox">
<input class="form-check-input" name="include_children" id="include_children" type="checkbox" checked>
<label class="form-check-label" for="include_children">
{% trans %}export.include_children{% endtrans %}
</label>
</div>
</div>
</div>
<div class="form-row mt-2">
<div class="offset-2 col">
<button type="submit" class="btn btn-primary">{% trans %}export.btn{% endtrans %}</button>
</div>
</div>
</form>
</fieldset>
</div>
{% endif %}
</div>