add alert when no there are any device selected
This commit is contained in:
parent
f655bfb895
commit
692358c343
|
@ -155,5 +155,7 @@ function export_file(type_file) {
|
|||
if (devices_id){
|
||||
var url = "/inventory/export/"+type_file+"/?ids="+devices_id;
|
||||
window.location.href = url;
|
||||
} else {
|
||||
$("#exportAlertModal").click();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<div class="modal fade" id="exportErrorModal" tabindex="-1" style="display: none;" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Error export</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<p class="text-danger pol">
|
||||
You need select first some device for use export file
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -205,6 +205,7 @@
|
|||
<i class="bi bi-reply"></i>
|
||||
Exports
|
||||
</button>
|
||||
<span class="d-none" id="exportAlertModal" data-bs-toggle="modal" data-bs-target="#exportErrorModal"></span>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnExport">
|
||||
<li>
|
||||
<a href="javascript:export_file('devices')" class="dropdown-item">
|
||||
|
@ -372,6 +373,7 @@
|
|||
{% include "inventory/allocate.html" %}
|
||||
{% include "inventory/data_wipe.html" %}
|
||||
{% include "inventory/trade.html" %}
|
||||
{% include "inventory/alert_export_error.html" %}
|
||||
|
||||
<!-- CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest"></script>
|
||||
|
|
Reference in New Issue