diff options
author | 2018-11-21 13:59:04 +0100 | |
---|---|---|
committer | 2018-11-21 13:59:04 +0100 | |
commit | 972aded4500cc7851bc27f50e765572de903f6ed (patch) | |
tree | 33a03fb93d44235278cf6b490f4ef2a0a38e047a | |
parent | Update upgrade dark theme styles (diff) | |
download | ferdium-app-972aded4500cc7851bc27f50e765572de903f6ed.tar.gz ferdium-app-972aded4500cc7851bc27f50e765572de903f6ed.tar.zst ferdium-app-972aded4500cc7851bc27f50e765572de903f6ed.zip |
Disable button when form is pristine and user input is required
-rw-r--r-- | src/components/settings/services/EditServiceForm.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index 29e49ada2..6893ef0a2 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -201,6 +201,8 @@ export default @observer class EditServiceForm extends Component { | |||
201 | activeTabIndex = 2; | 201 | activeTabIndex = 2; |
202 | } | 202 | } |
203 | 203 | ||
204 | const requiresUserInput = !recipe.hasHostedOption && (recipe.hasTeamId || recipe.hasCustomUrl); | ||
205 | |||
204 | return ( | 206 | return ( |
205 | <div className="settings__main"> | 207 | <div className="settings__main"> |
206 | <div className="settings__header"> | 208 | <div className="settings__header"> |
@@ -339,6 +341,7 @@ export default @observer class EditServiceForm extends Component { | |||
339 | type="submit" | 341 | type="submit" |
340 | label={intl.formatMessage(messages.saveService)} | 342 | label={intl.formatMessage(messages.saveService)} |
341 | htmlForm="form" | 343 | htmlForm="form" |
344 | disabled={form.isPristine && requiresUserInput} | ||
342 | /> | 345 | /> |
343 | )} | 346 | )} |
344 | </div> | 347 | </div> |