DEV: Add disabled attribute to form templates (#27033)

This commit is contained in:
Isaac Janzen 2024-05-15 11:40:51 -06:00 committed by GitHub
parent 2b5e0bca53
commit 33871c4830
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -24,5 +24,6 @@
pattern={{@validations.pattern}}
minlength={{@validations.minimum}}
maxlength={{@validations.maximum}}
disabled={{@attributes.disabled}}
/>
</div>

View File

@ -20,6 +20,11 @@ const FORM_TEMPLATES = [
id: description
attributes:
label: "Description"
- type: input
id: disabled-input
attributes:
label: "Disabled input"
disabled: true
`,
},
{
@ -124,6 +129,13 @@ acceptance("Composer Form Template", function (needs) {
"reply control is open"
);
assert.ok(
document.querySelector(
".form-template-field__input[name='disabled-input']"
).disabled,
"disabled-input is disabled"
);
await fillIn(".form-template-field__input[name='full-name']", "John Smith");
await fillIn(