[DEV-226] fix modal behavior when pressing enter (#1139)

This commit is contained in:
Joel Elias Méndez 2022-02-04 12:22:52 -03:00 committed by GitHub
parent 527843f00f
commit d90b7d48c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -65,12 +65,12 @@ class AdminPanelCustomTagsModal extends React.Component {
<FormField name="name" label={i18n('NAME')} fieldProps={{size: 'large'}} required={nameRequired} /> <FormField name="name" label={i18n('NAME')} fieldProps={{size: 'large'}} required={nameRequired} />
<FormField name="color" label={i18n('COLOR')} decorator={ColorSelector} /> <FormField name="color" label={i18n('COLOR')} decorator={ColorSelector} />
<div className='admin-panel-custom-tags-modal__actions'> <div className='admin-panel-custom-tags-modal__actions'>
<Button onClick={this.onDiscardClick.bind(this)} size="small">
{i18n('CANCEL')}
</Button>
<SubmitButton type="secondary" size="small"> <SubmitButton type="secondary" size="small">
{i18n('SAVE')} {i18n('SAVE')}
</SubmitButton> </SubmitButton>
<Button onClick={this.onDiscardClick.bind(this)} size="small">
{i18n('CANCEL')}
</Button>
</div> </div>
</Form> </Form>
</div> </div>

View File

@ -2,6 +2,7 @@
&__actions{ &__actions{
display: flex; display: flex;
flex-direction: row-reverse;
justify-content: space-between; justify-content: space-between;
} }
} }

View File

@ -63,8 +63,8 @@ class InviteUserWidget extends React.Component {
<Captcha ref="captcha" /> <Captcha ref="captcha" />
</div> </div>
<div className="invite-user-widget__buttons-container"> <div className="invite-user-widget__buttons-container">
<Button onClick={(e) => {e.preventDefault(); ModalContainer.closeModal();}} type="link">{i18n('CANCEL')}</Button>
<SubmitButton type="secondary">{i18n('INVITE_USER')}</SubmitButton> <SubmitButton type="secondary">{i18n('INVITE_USER')}</SubmitButton>
<Button onClick={(e) => {e.preventDefault(); ModalContainer.closeModal();}} type="link">{i18n('CANCEL')}</Button>
</div> </div>
</Form> </Form>
{this.renderMessage()} {this.renderMessage()}

View File

@ -18,7 +18,7 @@
&__buttons-container { &__buttons-container {
display: flex; display: flex;
flex-direction: row; flex-direction: row-reverse;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }