aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth
diff options
context:
space:
mode:
authorLibravatar haraldox <hnaumann+github@gmail.com>2018-01-30 11:29:56 +0100
committerLibravatar haraldox <hnaumann+github@gmail.com>2018-01-30 11:29:56 +0100
commitcd041c1e22b6b903ea7b336e672e0d9376728ae0 (patch)
treed7df20d543ac17f2f2b32f8b75d7cdee957d1b36 /src/components/auth
parentalternative UX implementation of check for email address count > 0 (diff)
downloadferdium-app-cd041c1e22b6b903ea7b336e672e0d9376728ae0.tar.gz
ferdium-app-cd041c1e22b6b903ea7b336e672e0d9376728ae0.tar.zst
ferdium-app-cd041c1e22b6b903ea7b336e672e0d9376728ae0.zip
Revert "alternative UX implementation of check for email address count > 0"
Diffstat (limited to 'src/components/auth')
-rw-r--r--src/components/auth/Invite.js19
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"