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