mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 11:02:46 +08: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}}
|
||||
minlength={{@validations.minimum}}
|
||||
maxlength={{@validations.maximum}}
|
||||
disabled={{@attributes.disabled}}
|
||||
/>
|
||||
</div>
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user