2022-01-03 12:40:30 +00:00
|
|
|
<div class="modal fade" id="actionModal" tabindex="-1" style="display: none;" aria-hidden="true">
|
2022-01-04 11:56:28 +00:00
|
|
|
<div class="modal-dialog modal-fullscreen">
|
2022-01-03 12:40:30 +00:00
|
|
|
<div class="modal-content">
|
|
|
|
|
|
|
|
<div class="modal-header">
|
2022-01-04 11:56:28 +00:00
|
|
|
<h5 class="modal-title">New Action</h5>
|
2022-01-03 12:40:30 +00:00
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
|
</div>
|
|
|
|
|
2022-01-05 15:00:13 +00:00
|
|
|
<form action="{{ url_for('inventory.devices.action_add') }}" method="post">
|
2022-01-05 11:13:44 +00:00
|
|
|
{{ form_new_action.csrf_token }}
|
2022-01-03 12:40:30 +00:00
|
|
|
<div class="modal-body">
|
|
|
|
<p class="text-danger">
|
2022-01-04 11:56:28 +00:00
|
|
|
You need select first some device before to do one action
|
2022-01-03 12:40:30 +00:00
|
|
|
</p>
|
2022-01-05 11:13:44 +00:00
|
|
|
{% for field in form_new_action %}
|
|
|
|
{% if field != form_new_action.csrf_token %}
|
2022-01-05 15:00:13 +00:00
|
|
|
{% if field == form_new_action.devices %}
|
2022-01-05 11:13:44 +00:00
|
|
|
{{ field(class_="devicesList") }}
|
2022-01-05 15:00:13 +00:00
|
|
|
{% elif field == form_new_action.lot %}
|
|
|
|
{{ field(class_="form-control") }}
|
2022-01-05 11:13:44 +00:00
|
|
|
{% else %}
|
|
|
|
<div class="col-12">
|
|
|
|
{{ field.label(class_="form-label") }}
|
|
|
|
{{ field(class_="form-control") }}
|
|
|
|
{% if field.errors %}
|
|
|
|
<p class="text-danger">
|
|
|
|
{% for error in field.errors %}
|
|
|
|
{{ error }}<br/>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2022-01-03 12:40:30 +00:00
|
|
|
</div>
|
|
|
|
|
2022-01-05 11:13:44 +00:00
|
|
|
|
2022-01-03 12:40:30 +00:00
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
2022-01-04 11:56:28 +00:00
|
|
|
<input type="submit" class="btn btn-primary d-none" value="Create" />
|
2022-01-03 12:40:30 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|