mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00:00
DEV: Add disabled
attribute to form templates (#27033)
This commit is contained in:
parent
2b5e0bca53
commit
33871c4830
@ -24,5 +24,6 @@
|
|||||||
pattern={{@validations.pattern}}
|
pattern={{@validations.pattern}}
|
||||||
minlength={{@validations.minimum}}
|
minlength={{@validations.minimum}}
|
||||||
maxlength={{@validations.maximum}}
|
maxlength={{@validations.maximum}}
|
||||||
|
disabled={{@attributes.disabled}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
@ -20,6 +20,11 @@ const FORM_TEMPLATES = [
|
|||||||
id: description
|
id: description
|
||||||
attributes:
|
attributes:
|
||||||
label: "Description"
|
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"
|
"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(".form-template-field__input[name='full-name']", "John Smith");
|
||||||
|
|
||||||
await fillIn(
|
await fillIn(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user