Skip to content

Commit

Permalink
fix bug exposed by eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav0 committed Nov 6, 2024
1 parent 364beef commit afbae73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addon/components/bs-modal/footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{else}}
{{#if @submitTitle}}
<Button @onClick={{@onClose}}>{{bs-default @closeTitle "Ok"}}</Button>
<Button @type={{bs-default @submitButtonType "primary"}} onClick={{@onSubmit}} disabled={{bs-default @submitDisabled false}}>{{@submitTitle}}</Button>
<Button @type={{bs-default @submitButtonType "primary"}} @buttonType="submit" onSubmit={{@onSubmit}} disabled={{bs-default @submitDisabled false}}>{{@submitTitle}}</Button>
{{else}}
<Button @type="primary" @onClick={{@onClose}}>{{bs-default @closeTitle "Ok"}}</Button>
{{/if}}
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/components/bs-modal/footer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module('Integration | Component | bs-modal/footer', function (hooks) {
assert.strictEqual(
this.element.querySelector('.modal-footer button').getAttribute('type'),
'button',
'Submit button is of type submit.'
'Submit button is of type button.'
);
assert.dom('.modal-footer button').hasText('close', 'Button title is correct.');
});
Expand All @@ -31,7 +31,7 @@ module('Integration | Component | bs-modal/footer', function (hooks) {
assert.strictEqual(
this.element.querySelector('.modal-footer button:first-child').getAttribute('type'),
'button',
'Submit button is of type submit.'
'Close button is of type button.'
);
assert.dom('.modal-footer button:first-child').hasText('close', 'Close button title is correct.');
assert.dom('.modal-footer button:last-child').hasClass('btn-primary', 'Submit button is a primary button.');
Expand Down

0 comments on commit afbae73

Please sign in to comment.