aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/components/auth/Invite.js19
-rw-r--r--src/i18n/locales/en-US.json1
-rw-r--r--src/styles/invite.scss4
-rw-r--r--src/styles/main.scss1
4 files changed, 0 insertions, 25 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"
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json
index f58d5634b..63d7ce60b 100644
--- a/src/i18n/locales/en-US.json
+++ b/src/i18n/locales/en-US.json
@@ -45,7 +45,6 @@
45 "invite.name.label": "Name", 45 "invite.name.label": "Name",
46 "invite.email.label": "Email address", 46 "invite.email.label": "Email address",
47 "invite.skip.label": "I want to do this later", 47 "invite.skip.label": "I want to do this later",
48 "invite.error.noEmails": "At least one email address is required",
49 "subscription.submit.label": "I want to support the development of Franz", 48 "subscription.submit.label": "I want to support the development of Franz",
50 "subscription.paymentSessionError": "Could not initialize payment form", 49 "subscription.paymentSessionError": "Could not initialize payment form",
51 "subscription.includedFeatures": "Paid Franz Premium Supporter Account includes", 50 "subscription.includedFeatures": "Paid Franz Premium Supporter Account includes",
diff --git a/src/styles/invite.scss b/src/styles/invite.scss
deleted file mode 100644
index 345095da8..000000000
--- a/src/styles/invite.scss
+++ /dev/null
@@ -1,4 +0,0 @@
1.invite-form__error {
2 text-align: center;
3 margin-bottom: 20px !important; /* otherwise overridden by rule: p:last-of-type */
4}
diff --git a/src/styles/main.scss b/src/styles/main.scss
index 20f1803e4..261396f6f 100644
--- a/src/styles/main.scss
+++ b/src/styles/main.scss
@@ -18,7 +18,6 @@ $mdi-font-path: '../node_modules/mdi/fonts';
18@import './type.scss'; 18@import './type.scss';
19@import './welcome.scss'; 19@import './welcome.scss';
20@import './auth.scss'; 20@import './auth.scss';
21@import './invite.scss';
22@import './tooltip.scss'; 21@import './tooltip.scss';
23@import './info-bar.scss'; 22@import './info-bar.scss';
24@import './status-bar-target-url.scss'; 23@import './status-bar-target-url.scss';