modified procedure to download CO2 template file
This commit is contained in:
parent
3dc0364d2e
commit
d377d6ae94
2 changed files with 1 additions and 15 deletions
|
|
@ -140,20 +140,6 @@ function generateJSONStructure(endpoint, jsonData) {
|
|||
}
|
||||
}
|
||||
|
||||
// Method to download Excel template available on CERNBox
|
||||
function downloadTemplate(
|
||||
uri = "https://caimira-resources.web.cern.ch/CO2_template.xlsx",
|
||||
filename = "CO2_template.xlsx"
|
||||
) {
|
||||
const link = document.createElement("a");
|
||||
link.download = filename;
|
||||
link.href = uri;
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
delete link;
|
||||
}
|
||||
|
||||
function insertErrorFor(referenceNode, text) {
|
||||
const element = $("<span></span>")
|
||||
.addClass("error_text text-danger")
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@
|
|||
<div class="modal-body">
|
||||
<div class="d-flex d-row justify-content-between">
|
||||
<h5 class="mt-auto mb-auto">Upload an Excel file to preview in HTML Table</h5>
|
||||
<button type="button" class="btn btn-primary btn-sm" onclick="downloadTemplate()">Download template</button>
|
||||
<a class="btn btn-primary btn-sm" href="https://caimira-resources.web.cern.ch/CO2_template.xlsx">Download template</a>
|
||||
</div>
|
||||
<br>
|
||||
<!-- Input element to upload an excel file -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue