github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/templates/components/two-step-button.hbs (about) 1 {{#if this.isIdle}} 2 <button 3 data-test-idle-button 4 type="button" 5 class="button {{if this.classes.idleButton this.classes.idleButton "is-danger is-outlined"}} is-important is-small" 6 disabled={{this.disabled}} 7 onclick={{action "promptForConfirmation"}}> 8 {{this.idleText}} 9 </button> 10 {{else if this.isPendingConfirmation}} 11 <span 12 data-test-confirmation-message 13 class="confirmation-text {{this.classes.confirmationMessage}} {{if this.alignRight "is-right-aligned"}} {{if this.inlineText "has-text-inline"}}"> 14 {{this.confirmationMessage}} 15 </span> 16 <button 17 data-test-cancel-button 18 type="button" 19 class="button is-outlined is-small {{if this.classes.cancelButton this.classes.cancelButton "is-dark"}}" 20 disabled={{this.awaitingConfirmation}} 21 onclick={{action (queue 22 (action "setToIdle") 23 (action this.onCancel) 24 )}}> 25 {{this.cancelText}} 26 </button> 27 <button 28 data-test-confirm-button 29 class="button is-small {{if this.awaitingConfirmation "is-loading"}} {{if this.classes.confirmButton this.classes.confirmButton "is-danger"}}" 30 disabled={{this.awaitingConfirmation}} 31 onclick={{action "confirm"}} 32 type="button"> 33 {{this.confirmText}} 34 </button> 35 {{/if}}