2022-02-01 12:40:06 +00:00
|
|
|
<div class="modal fade" id="allocateModal" tabindex="-1" style="display: none;" aria-hidden="true"
|
|
|
|
data-show-action-form="{{ form_new_allocate.type.data }}">
|
2022-01-11 12:42:38 +00:00
|
|
|
<div class="modal-dialog modal-fullscreen">
|
|
|
|
<div class="modal-content">
|
|
|
|
|
|
|
|
<div class="modal-header">
|
2022-02-03 10:44:51 +00:00
|
|
|
<h5 class="modal-title">New Action <span id="title-action"></span></h5>
|
2022-01-11 12:42:38 +00:00
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
|
</div>
|
|
|
|
|
2022-02-03 09:14:10 +00:00
|
|
|
<form action="
|
|
|
|
{% if lot %}
|
|
|
|
{{ url_for('inventory.devices.lot_allocate_add', lot_id=lot.id) }}
|
|
|
|
{% else %}
|
|
|
|
{{ url_for('inventory.devices.allocate_add') }}
|
|
|
|
{% endif %}" method="post">
|
2022-01-11 12:42:38 +00:00
|
|
|
{{ form_new_allocate.csrf_token }}
|
|
|
|
<div class="modal-body">
|
2022-02-01 12:40:06 +00:00
|
|
|
<p class="text-danger" id="pol" style="display: none;">
|
2022-01-11 12:42:38 +00:00
|
|
|
You need select first some device before to do one action
|
|
|
|
</p>
|
2022-02-01 12:40:06 +00:00
|
|
|
{% for field in form_new_allocate %}
|
|
|
|
{% if field != form_new_allocate.csrf_token %}
|
|
|
|
{% if field == form_new_allocate.devices %}
|
2022-01-11 12:42:38 +00:00
|
|
|
{{ field(class_="devicesList") }}
|
2022-02-01 12:40:06 +00:00
|
|
|
{% elif field == form_new_allocate.type %}
|
2022-01-11 12:42:38 +00:00
|
|
|
{{ field(class_="form-control") }}
|
|
|
|
{% else %}
|
|
|
|
<div class="col-12">
|
|
|
|
{{ field.label(class_="form-label") }}
|
|
|
|
{{ field(class_="form-control") }}
|
|
|
|
{% if field.errors %}
|
2022-02-02 13:17:42 +00:00
|
|
|
<p class="text-danger">
|
2022-01-11 12:42:38 +00:00
|
|
|
{% 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>
|
2022-02-01 12:40:06 +00:00
|
|
|
<input type="submit" class="btn btn-primary" style="display: none;" value="Create" />
|
2022-01-11 12:42:38 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|