aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/EditServiceScreen.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-02-19 11:50:11 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-02-19 11:50:11 +0100
commit857221ad84b31819d22bb4ce028dd8cb8d606f86 (patch)
treefecf60fe2e210197f3eac53e55ad44ac94d3ca3c /src/containers/settings/EditServiceScreen.js
parentAutomatic i18n update (i18n.meetfranz.com) (diff)
parentfix(Linux): Fix window restore on notification click (@closingin) (diff)
downloadferdium-app-857221ad84b31819d22bb4ce028dd8cb8d606f86.tar.gz
ferdium-app-857221ad84b31819d22bb4ce028dd8cb8d606f86.tar.zst
ferdium-app-857221ad84b31819d22bb4ce028dd8cb8d606f86.zip
Merge branch 'develop' into i18n
Diffstat (limited to 'src/containers/settings/EditServiceScreen.js')
-rw-r--r--src/containers/settings/EditServiceScreen.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js
index c26195a1e..67c2731fc 100644
--- a/src/containers/settings/EditServiceScreen.js
+++ b/src/containers/settings/EditServiceScreen.js
@@ -121,7 +121,7 @@ export default class EditServiceScreen extends Component {
121 label: intl.formatMessage(messages.team), 121 label: intl.formatMessage(messages.team),
122 placeholder: intl.formatMessage(messages.team), 122 placeholder: intl.formatMessage(messages.team),
123 value: service.team, 123 value: service.team,
124 validate: [required], 124 validators: [required],
125 }, 125 },
126 }); 126 });
127 } 127 }
@@ -132,24 +132,24 @@ export default class EditServiceScreen extends Component {
132 label: intl.formatMessage(messages.customUrl), 132 label: intl.formatMessage(messages.customUrl),
133 placeholder: 'https://', 133 placeholder: 'https://',
134 value: service.customUrl, 134 value: service.customUrl,
135 validate: [required, url], 135 validators: [required, url],
136 }, 136 },
137 }); 137 });
138 } 138 }
139 139
140 // More fine grained and use case specific validation rules 140 // More fine grained and use case specific validation rules
141 if (recipe.hasTeamId && recipe.hasCustomUrl) { 141 if (recipe.hasTeamId && recipe.hasCustomUrl) {
142 config.fields.team.validate = [oneRequired(['team', 'customUrl'])]; 142 config.fields.team.validators = [oneRequired(['team', 'customUrl'])];
143 config.fields.customUrl.validate = [url, oneRequired(['team', 'customUrl'])]; 143 config.fields.customUrl.validators = [url, oneRequired(['team', 'customUrl'])];
144 } 144 }
145 145
146 // If a service can be hosted and has a teamId or customUrl 146 // If a service can be hosted and has a teamId or customUrl
147 if (recipe.hasHostedOption && (recipe.hasTeamId || recipe.hasCustomUrl)) { 147 if (recipe.hasHostedOption && (recipe.hasTeamId || recipe.hasCustomUrl)) {
148 if (config.fields.team) { 148 if (config.fields.team) {
149 config.fields.team.validate = []; 149 config.fields.team.validators = [];
150 } 150 }
151 if (config.fields.customUrl) { 151 if (config.fields.customUrl) {
152 config.fields.customUrl.validate = [url]; 152 config.fields.customUrl.validators = [url];
153 } 153 }
154 } 154 }
155 155