add wizard
This commit is contained in:
parent
2e1b8b9ef2
commit
526f70f9c0
3 changed files with 27 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
import { Controller } from '@hotwired/stimulus';
|
||||
|
||||
export class RadioEnabledSubmitController extends Controller {
|
||||
static targets = ['submit'];
|
||||
declare readonly submitTarget: HTMLButtonElement;
|
||||
|
||||
click() {
|
||||
if (
|
||||
this.element.querySelectorAll('input[type="radio"]:checked').length > 0
|
||||
) {
|
||||
this.submitTarget.disabled = false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue