BUGFIX: missing labels
This commit is contained in:
parent
09024ab65d
commit
0aa87504e4
|
@ -32,8 +32,8 @@ function initCronType()
|
||||||
document.querySelectorAll('.crontype-inputs:not(.d-none)').forEach(elem => elem.classList.add('d-none'));
|
document.querySelectorAll('.crontype-inputs:not(.d-none)').forEach(elem => elem.classList.add('d-none'));
|
||||||
document.querySelector('.crontype-' + type).classList.remove('d-none');
|
document.querySelector('.crontype-' + type).classList.remove('d-none');
|
||||||
|
|
||||||
document.querySelector('.crontype-inputs:not(.d-none) input').disabled = false;
|
document.querySelectorAll('.crontype-inputs:not(.d-none) input').forEach(elem => elem.disabled = false);
|
||||||
document.querySelector('.crontype-inputs.d-none input').disabled = true;
|
document.querySelectorAll('.crontype-inputs.d-none input').forEach(elem => elem.disabled = true);
|
||||||
|
|
||||||
if (type == 'http') {
|
if (type == 'http') {
|
||||||
document.querySelectorAll('.croncategory-group:not(.crontype-group) button').forEach(elem => elem.innerText = elem.dataset.defaultText)
|
document.querySelectorAll('.croncategory-group:not(.crontype-group) button').forEach(elem => elem.innerText = elem.dataset.defaultText)
|
||||||
|
@ -42,8 +42,8 @@ function initCronType()
|
||||||
document.querySelectorAll('.croncategory-group:not(.crontype-group)').forEach(elem => elem.classList.add('d-none'));
|
document.querySelectorAll('.croncategory-group:not(.crontype-group)').forEach(elem => elem.classList.add('d-none'));
|
||||||
document.querySelectorAll('.croncategory-inputs:not(.crontype-inputs)').forEach(elem => elem.classList.add('d-none'));
|
document.querySelectorAll('.croncategory-inputs:not(.crontype-inputs)').forEach(elem => elem.classList.add('d-none'));
|
||||||
|
|
||||||
document.querySelector('.croncategory-inputs:not(.d-none) input').disabled = false;
|
document.querySelectorAll('.croncategory-inputs:not(.d-none) input').forEach(elem => elem.disabled = false);
|
||||||
document.querySelector('.croncategory-inputs.d-none input').disabled = true;
|
document.querySelectorAll('.croncategory-inputs.d-none input').forEach(elem => elem.disabled = true);
|
||||||
}
|
}
|
||||||
if (type == 'reboot') {
|
if (type == 'reboot') {
|
||||||
if (document.querySelector('#btn-group-discriminator') === null) {
|
if (document.querySelector('#btn-group-discriminator') === null) {
|
||||||
|
|
|
@ -67,6 +67,8 @@
|
||||||
Reboot
|
Reboot
|
||||||
{% elseif data.crontype == 'http' %}
|
{% elseif data.crontype == 'http' %}
|
||||||
Http request
|
Http request
|
||||||
|
{% else %}
|
||||||
|
Job type
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="crontypeButton">
|
<div class="dropdown-menu" aria-labelledby="crontypeButton">
|
||||||
|
@ -82,6 +84,8 @@
|
||||||
Local
|
Local
|
||||||
{% elseif data.hosttype == 'ssh' %}
|
{% elseif data.hosttype == 'ssh' %}
|
||||||
SSH
|
SSH
|
||||||
|
{% else %}
|
||||||
|
Host type
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="hosttypeButton">
|
<div class="dropdown-menu" aria-labelledby="hosttypeButton">
|
||||||
|
@ -95,11 +99,13 @@
|
||||||
<div id="btn-group-discriminator" class="d-none">
|
<div id="btn-group-discriminator" class="d-none">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="dropdown croncategory-group containertype-group{% if data.crontype != 'http' %} btn-group{% else %} d-none{% endif %}">
|
<div class="dropdown croncategory-group containertype-group{% if data.crontype != 'http' %} btn-group{% else %} d-none{% endif %}">
|
||||||
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="containertypeButton" data-default-text="" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="containertypeButton" data-default-text="Container" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
{% if data.containertype == 'none' or data.containertype == '' %}
|
{% if data.containertype == 'none' or data.containertype == '' %}
|
||||||
None
|
None
|
||||||
{% elseif data.containertype == 'docker' %}
|
{% elseif data.containertype == 'docker' %}
|
||||||
Docker
|
Docker
|
||||||
|
{% else %}
|
||||||
|
Container
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="containertypeButton">
|
<div class="dropdown-menu" aria-labelledby="containertypeButton">
|
||||||
|
|
Loading…
Reference in New Issue