This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/templates/inventory/data_wipe.html

86 lines
3.4 KiB
HTML

<div class="modal fade" id="datawipeModal" tabindex="-1" style="display: none;" aria-hidden="true"
data-show-action-form="{{ form_new_datawipe.type.data }}">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">New Action <span id="title-action"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="{{ url_for('inventory.devices.datawipe_add') }}" method="post" enctype="multipart/form-data">
{{ form_new_datawipe.csrf_token }}
<div class="modal-body">
{% for field in form_new_datawipe %}
{% if field != form_new_datawipe.csrf_token %}
{% if field == form_new_datawipe.devices %}
<div class="col-12">
{{ field.label(class_="form-label") }}: <span class="devices-count"></span>
{{ field(class_="devicesList") }}
<p class="text-danger pol" style="display: none;">
You need select first some device before to do one action
</p>
<p class="enumeration-devices"></p>
</div>
{% elif field == form_new_datawipe.lot %}
{{ field }}
{% elif field == form_new_datawipe.type %}
{{ field }}
{% elif field == form_new_datawipe.document %}
{% for _field in field %}
<div class="col-12">
{{ _field.label(class_="form-label") }}
{% if _field == field.success %}
<div class="form-check form-switch">
{{ _field(class_="form-check-input") }}
<small class="text-muted">{{ _field.description }}</small>
</div>
{% else %}
{{ _field(class_="form-control") }}
<small class="text-muted">{{ _field.description }}</small>
{% endif %}
{% if _field.errors %}
<p class="text-danger">
{% for error in _field.errors %}
{{ error }}<br/>
{% endfor %}
</p>
{% endif %}
</div>
{% endfor %}
{% else %}
<div class="col-12">
{{ field.label(class_="form-label") }}
{% if field == form_new_datawipe.success %}
<div class="form-check form-switch">
{{ field(class_="form-check-input") }}
<small class="text-muted">{{ field.description }}</small>
</div>
{% else %}
{{ field(class_="form-control") }}
<small class="text-muted">{{ field.description }}</small>
{% endif %}
{% if field.errors %}
<p class="text-danger">
{% for error in field.errors %}
{{ error }}<br/>
{% endfor %}
</p>
{% endif %}
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<input type="submit" class="btn btn-primary" style="display: none;" value="Create" />
</div>
</form>
</div>
</div>
</div>