diff options
author | haraldox <hnaumann+github@gmail.com> | 2018-01-30 11:29:56 +0100 |
---|---|---|
committer | haraldox <hnaumann+github@gmail.com> | 2018-01-30 11:29:56 +0100 |
commit | cd041c1e22b6b903ea7b336e672e0d9376728ae0 (patch) | |
tree | d7df20d543ac17f2f2b32f8b75d7cdee957d1b36 /src/components | |
parent | alternative UX implementation of check for email address count > 0 (diff) | |
download | ferdium-app-cd041c1e22b6b903ea7b336e672e0d9376728ae0.tar.gz ferdium-app-cd041c1e22b6b903ea7b336e672e0d9376728ae0.tar.zst ferdium-app-cd041c1e22b6b903ea7b336e672e0d9376728ae0.zip |
Revert "alternative UX implementation of check for email address count > 0"
This reverts commit 56520969f508c1db257d7573962ad6b762205e56.
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/auth/Invite.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/components/auth/Invite.js b/src/components/auth/Invite.js index c4c35d538..3eb1f2765 100644 --- a/src/components/auth/Invite.js +++ b/src/components/auth/Invite.js | |||
@@ -30,10 +30,6 @@ const messages = defineMessages({ | |||
30 | id: 'invite.skip.label', | 30 | id: 'invite.skip.label', |
31 | defaultMessage: '!!!I want to do this later', | 31 | defaultMessage: '!!!I want to do this later', |
32 | }, | 32 | }, |
33 | noEmailAddresses: { | ||
34 | id: 'invite.error.noEmails', | ||
35 | defaultMessage: '!!!At least one email address is required', | ||
36 | } | ||
37 | }); | 33 | }); |
38 | 34 | ||
39 | @observer | 35 | @observer |
@@ -68,16 +64,6 @@ export default class Invite extends Component { | |||
68 | e.preventDefault(); | 64 | e.preventDefault(); |
69 | this.form.submit({ | 65 | this.form.submit({ |
70 | onSuccess: (form) => { | 66 | onSuccess: (form) => { |
71 | |||
72 | const atLeastOneEmailAddress = form.$('invite') | ||
73 | .map(invite => {return invite.$('email').value}) | ||
74 | .some(email => email.trim() !== '') | ||
75 | |||
76 | if (!atLeastOneEmailAddress) { | ||
77 | form.invalidate('no-email-addresses') | ||
78 | return | ||
79 | } | ||
80 | |||
81 | this.props.onSubmit({ invites: form.values().invite }); | 67 | this.props.onSubmit({ invites: form.values().invite }); |
82 | }, | 68 | }, |
83 | onError: () => {}, | 69 | onError: () => {}, |
@@ -111,11 +97,6 @@ export default class Invite extends Component { | |||
111 | </div> | 97 | </div> |
112 | </div> | 98 | </div> |
113 | ))} | 99 | ))} |
114 | {form.error === 'no-email-addresses' && ( | ||
115 | <p className="franz-form__error invite-form__error"> | ||
116 | {intl.formatMessage(messages.noEmailAddresses)} | ||
117 | </p> | ||
118 | )} | ||
119 | <Button | 100 | <Button |
120 | type="submit" | 101 | type="submit" |
121 | className="auth__button" | 102 | className="auth__button" |