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