1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-20 05:08:14 +00:00

Combined all RequestActions implementation and merge upstream and remove WIP

Signed-off-by: Alex Lau(AvengerMoJo) <avengermojo@gmail.com>
This commit is contained in:
Alex Lau(AvengerMoJo)
2024-08-25 21:27:36 +08:00
committed by Yu Daike
parent 734ddf7118
commit ed7fa95528
19 changed files with 676 additions and 15 deletions

View File

@@ -0,0 +1,19 @@
export function initRequireActionsSelect() {
const raselect = document.querySelector('add-require-actions-modal');
if (!raselect) return;
const checkboxes = document.querySelectorAll('.ui.radio.checkbox');
for (const box of checkboxes) {
box.addEventListener('change', function() {
const hiddenInput = this.nextElementSibling;
const isChecked = this.querySelector('input[type="radio"]').checked;
hiddenInput.disabled = !isChecked;
// Disable other hidden inputs
for (const otherbox of checkboxes) {
const otherHiddenInput = otherbox.nextElementSibling;
if (otherbox !== box) {
otherHiddenInput.disabled = isChecked;
}
}
});
}
}