add count to allocate action
This commit is contained in:
parent
7f9a6784e9
commit
c10a5f24b4
|
@ -61,7 +61,7 @@ function removeTag() {
|
|||
function newAction(action) {
|
||||
$("#actionModal #type").val(action);
|
||||
$("#actionModal #title-action").html(action);
|
||||
devices_count = $(".deviceSelect").filter(':checked').length;
|
||||
var devices_count = $(".deviceSelect").filter(':checked').length;
|
||||
$("#actionModal .devices-count").html(devices_count);
|
||||
$("#activeActionModal").click();
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ function newAction(action) {
|
|||
function newAllocate(action) {
|
||||
$("#allocateModal #type").val(action);
|
||||
$("#allocateModal #title-action").html(action);
|
||||
devices_count = $(".deviceSelect").filter(':checked').length;
|
||||
$("#actionModal .devices-count").html(devices_count);
|
||||
var devices_count = $(".deviceSelect").filter(':checked').length;
|
||||
$("#allocateModal .devices-count").html(devices_count);
|
||||
$("#activeAllocateModal").click();
|
||||
}
|
||||
|
|
|
@ -15,13 +15,12 @@
|
|||
{% if field == form_new_action.devices %}
|
||||
<div class="col-12">
|
||||
{{ field.label(class_="form-label") }}: <span class="devices-count"></span>
|
||||
{{ field(class_="form-control") }}
|
||||
{{ field(class_="devicesList") }}
|
||||
<p class="text-danger">
|
||||
You need select first some device before to do one action
|
||||
</p>
|
||||
<p class="enumeration-devices"></p>
|
||||
</div>
|
||||
{{ field(class_="devicesList") }}
|
||||
{% elif field == form_new_action.type %}
|
||||
{{ field(class_="form-control") }}
|
||||
{% else %}
|
||||
|
|
|
@ -22,7 +22,14 @@
|
|||
{% 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">
|
||||
You need select first some device before to do one action
|
||||
</p>
|
||||
<p class="enumeration-devices"></p>
|
||||
</div>
|
||||
{% elif field == form_new_allocate.type %}
|
||||
{{ field(class_="form-control") }}
|
||||
{% else %}
|
||||
|
|
Reference in New Issue