ail-framework/var/www/templates/modals/tracker_remove_object.html

40 lines
1.4 KiB
HTML
Raw Permalink Normal View History

<div id="modal_tracker_remove_object" class="modal fade" role="dialog">
<div class="modal-dialog modal-lg">
<div id="modal_tracker_remove_object_content" class="modal-content">
<div class="modal-header" style="border-bottom: 4px solid #cccccc; background-color: #cccccc; color: #ffffff;">
<h4>Remove Object From Tracker</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body text-center">
<h2><span class="badge-warning" id="modal_tracker_remove_object_gid">Warning</span></h2>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" >Close</button>
<a href="#" class="btn btn-danger" id="modal_tracker_remove_object_delete">
<i class="fas fa-trash-alt"></i> Remove
</a>
</div>
</div>
</div>
</div>
<script>
// tagid + objtype + objid
$('#modal_tracker_remove_object').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
let obj_gid = button.data('obj_gid')
let tracker_uuid = button.data('tracker_uuid')
let modal = $(this)
modal.find('#modal_tracker_remove_object_gid').text(obj_gid)
modal.find('#modal_tracker_remove_object_delete').prop("href", "{{ url_for('hunters.tracker_object_remove') }}?uuid="+ tracker_uuid +"&gid="+ obj_gid);
})
</script>