FIX: allows {{d-button}} to set a form attribute (#7056)

This attribute is used when a submit button is out of a form. It makes it explicit which form this button is submitting.

It's currently used in our login modal form.
This commit is contained in:
Joffrey JAFFEUX
2019-02-25 09:49:49 +01:00
committed by GitHub
parent 9faf058120
commit 919839fd97
3 changed files with 18 additions and 5 deletions

View File

@ -35,3 +35,11 @@ componentTest("text only button", {
assert.ok(this.$("button span.d-button-label").length, "it has the label");
}
});
componentTest("form attribute", {
template: '{{d-button form="login-form"}}',
test(assert) {
assert.ok(exists("button[form=login-form]"), "it has the form attribute");
}
});