Files
enviPy-bayer/templates/modals/objects/download_pathway_modal.html
jebus 6e6b394289 Cleanup (#52)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#52
2025-08-22 06:36:22 +12:00

37 lines
1.4 KiB
HTML

{% load static %}
<!-- Download Pathway -->
<div id="download_pathway_modal" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Download Pathway</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
By clicking on Download the Pathway will be converted into a CSV and directly downloaded.
<form id="download-pathway-modal-form" accept-charset="UTF-8" action="{{ pathway.url }}"
data-remote="true" method="GET">
<input type="hidden" name="download" value="true"/>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="download-pathway-modal-submit">Download</button>
</div>
</div>
</div>
</div>
<script>
$(function () {
$('#download-pathway-modal-submit').click(function (e) {
e.preventDefault();
$('#download-pathway-modal-form').submit();
$('#download_pathway_modal').modal('hide');
});
})
</script>