2022-02-21 12:03:35 +00:00
|
|
|
{% if form_new_trade %}
|
2022-02-18 12:37:45 +00:00
|
|
|
<div class="modal fade" id="tradeLotModal" tabindex="-1" style="display: none;" aria-hidden="true"
|
|
|
|
data-show-action-form="{{ form_new_trade.check_valid() }}">
|
2022-02-09 13:06:28 +00:00
|
|
|
<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.trade_add') }}" method="post">
|
|
|
|
{{ form_new_trade.csrf_token }}
|
|
|
|
<div class="modal-body">
|
|
|
|
{% for field in form_new_trade %}
|
|
|
|
{% if field != form_new_trade.csrf_token %}
|
|
|
|
{% if field == form_new_trade.devices %}
|
2022-02-18 12:37:45 +00:00
|
|
|
{{ field }}
|
2022-02-09 13:06:28 +00:00
|
|
|
{% elif field == form_new_trade.lot %}
|
|
|
|
{{ field }}
|
|
|
|
{% elif field == form_new_trade.type %}
|
|
|
|
{{ field }}
|
|
|
|
{% else %}
|
|
|
|
<div class="col-12">
|
|
|
|
{{ field.label(class_="form-label") }}
|
|
|
|
{% if field == form_new_trade.confirm %}
|
|
|
|
<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" value="Create" />
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-24 13:15:58 +00:00
|
|
|
{% else %}
|
|
|
|
<div class="modal fade" id="tradeLotModal" tabindex="-1" style="display: none;" aria-hidden="true"
|
|
|
|
data-show-action-form="None">
|
|
|
|
</div>
|
2022-02-21 12:03:35 +00:00
|
|
|
{% endif %}
|