adapted checkbox text
This commit is contained in:
parent
68c0592f0f
commit
914de7421f
2 changed files with 9 additions and 10 deletions
|
|
@ -862,15 +862,14 @@ function copy_clipboard(shareable_link) {
|
|||
navigator.clipboard.writeText(shareable_link);
|
||||
}
|
||||
|
||||
function display_rename_column(bool, id) {
|
||||
function check_download_button() {
|
||||
// Handle the disable property of the download button
|
||||
let download_button = document.getElementById('downloadCSV');
|
||||
if (document.querySelectorAll('input[type="checkbox"]:checked').length <= 1) {
|
||||
download_button.disabled = true;
|
||||
}
|
||||
else {
|
||||
download_button.disabled = false;
|
||||
}
|
||||
document.querySelectorAll('input[type="checkbox"]:checked').length <= 1 ? download_button.disabled = true : download_button.disabled = false;
|
||||
}
|
||||
|
||||
function display_rename_column(bool, id) {
|
||||
check_download_button();
|
||||
// Change the visibility of renaming section
|
||||
if (bool) document.getElementById(id).style.display = 'flex';
|
||||
else document.getElementById(id).style.display = 'none';
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@
|
|||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" name="checkedItems" id="Concentrations" onclick="display_rename_column(this.checked, 'concentrations-rename-div')">
|
||||
<label class="form-check-label" for="Concentrations">Concentrations</label>
|
||||
<label class="form-check-label" for="Concentrations">Concentration - Current scenario</label>
|
||||
<div id="concentrations-rename-div" class="align-items-center" style="display:none">
|
||||
<label class="col-form-label" for="concentrations-rename-div">Column name:</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-4 ml-2" id="Concentrations__rename" placeholder="Concentrations" value="Concentrations">
|
||||
|
|
@ -273,8 +273,8 @@
|
|||
</div>
|
||||
{% else %}
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" name="checkedItems" id="Alternative Scenarios">
|
||||
<label class="form-check-label" for="Alternative Scenarios">Alternative Scenarios</label>
|
||||
<input type="checkbox" class="form-check-input" name="checkedItems" id="Alternative Scenarios" onclick="check_download_button()">
|
||||
<label class="form-check-label" for="Alternative Scenarios">Concentration - Alternative scenarios</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue