Skip to content

Commit

Permalink
improved user invite form (#1792)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Ricci <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 15, 2021
1 parent 812a0a6 commit 3bc9f0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions webapp/views/App/views/Users/UserInvite/UserInvite.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const UserInviteComponent = () => {
placeholder={i18n.t('common.email')}
value={UserInvite.getEmail(userInvite)}
validation={Validation.getFieldValidation(UserInvite.keys.email)(validation)}
onChange={(value) => onUpdate({ name: UserInvite.keys.email, value })}
onChange={(value) => onUpdate({ name: UserInvite.keys.email, value: value.trim() })}
/>
</FormItem>
<FormItem label={i18n.t('common.group')}>
Expand Down Expand Up @@ -71,7 +71,6 @@ const UserInviteComponent = () => {
<Button
testId={DataTestId.userInvite.submitBtn}
className="btn-invite"
disabled={Validation.isNotValid(validation)}
onClick={onInvite}
iconClassName="icon-envelop icon-left icon-12px"
label="userInviteView.sendInvitation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const useOnInvite = ({ userInvite, setUserInvite, repeatInvitation = fals
}
} else {
setUserInvite(userInviteValidated)
dispatch(NotificationActions.notifyWarning({ key: 'common.formContainsErrorsCannotContinue' }))
}
}, [userInvite])
}

0 comments on commit 3bc9f0e

Please sign in to comment.