check the checkbox in a devices list when one form is invalid
This commit is contained in:
parent
662f75bb7b
commit
a55944e379
|
@ -16,7 +16,7 @@
|
|||
<div class="col-12">
|
||||
{{ field.label(class_="form-label") }}: <span class="devices-count"></span>
|
||||
{{ field(class_="devicesList") }}
|
||||
<p class="text-danger">
|
||||
<p class="text-danger pol">
|
||||
You need select first some device before to do one action
|
||||
</p>
|
||||
<p class="enumeration-devices"></p>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{% endfor %}
|
||||
</select>
|
||||
<input class="devicesList" type="hidden" name="devices" />
|
||||
<p class="text-danger">
|
||||
<p class="text-danger pol">
|
||||
You need select first some device for adding this in a lot
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{% endfor %}
|
||||
</select>
|
||||
<input class="devicesList" type="hidden" name="device" />
|
||||
<p class="text-danger">
|
||||
<p class="text-danger pol">
|
||||
You need select first some device for adding this in a tag
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -11,16 +11,13 @@
|
|||
<form action="{{ url_for('inventory.devices.allocate_add') }}" method="post">
|
||||
{{ form_new_allocate.csrf_token }}
|
||||
<div class="modal-body">
|
||||
<p class="text-danger" id="pol" style="display: none;">
|
||||
You need select first some device before to do one action
|
||||
</p>
|
||||
{% for field in form_new_allocate %}
|
||||
{% if field != form_new_allocate.csrf_token %}
|
||||
{% if field == form_new_allocate.devices %}
|
||||
<div class="col-12">
|
||||
{{ field.label(class_="form-label") }}: <span class="devices-count"></span>
|
||||
{{ field(class_="devicesList") }}
|
||||
<p class="text-danger">
|
||||
<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>
|
||||
|
|
|
@ -237,7 +237,11 @@
|
|||
<td>
|
||||
<input type="checkbox" class="deviceSelect" data="{{ dev.id }}"
|
||||
data-device-type="{{ dev.type }}" data-device-manufacturer="{{ dev.manufacturer }}"
|
||||
data-device-dhid="{{ dev.devicehub_id }}" />
|
||||
data-device-dhid="{{ dev.devicehub_id }}"
|
||||
{% if form_new_allocate.type.data and dev.id in list_devices %}
|
||||
checked="checked"
|
||||
{% endif %}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url_for('inventory.devices.device_details', id=dev.devicehub_id)}}">
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{% endfor %}
|
||||
</select>
|
||||
<input class="devicesList" type="hidden" name="devices" />
|
||||
<p class="text-danger">
|
||||
<p class="text-danger pol">
|
||||
You need select first some device for remove this from a lot
|
||||
</p>
|
||||
</div>
|
||||
|
|
Reference in a new issue