diff --git a/config.yaml b/config.yaml index 9cc10d3..23c0f04 100644 --- a/config.yaml +++ b/config.yaml @@ -85,3 +85,10 @@ actions: shell: sleep 5 timeout: 5 icon: "😪" + +- title: Delete old backups + icon: ashtonished + shell: rm -rf /opt/oldBackups/ + arguments: + - type: confirmation + title: Are you sure?! diff --git a/webui/js/ArgumentForm.js b/webui/js/ArgumentForm.js index 0bd069c..af14572 100644 --- a/webui/js/ArgumentForm.js +++ b/webui/js/ArgumentForm.js @@ -93,6 +93,15 @@ class ArgumentForm extends window.HTMLElement { for (const choice of arg.choices) { domEl.appendChild(this.createSelectOption(choice)) } + } else if (arg.type === 'confirmation') { + this.domBtnStart.disabled = true + + domEl = document.createElement('input') + domEl.setAttribute('type', 'checkbox') + domEl.onchange = () => { + this.domBtnStart.disabled = false + domEl.disabled = true + } } else { domEl = document.createElement('input') domEl.onchange = () => {