diff options
author | 2019-03-26 16:25:49 +0100 | |
---|---|---|
committer | 2019-03-26 16:25:59 +0100 | |
commit | 03c76d7a6e5c5529e39f245dd350c0bc8abbd128 (patch) | |
tree | 00477465d79f7eb640b135781d5f2b15a0d984a2 /src/features/workspaces/components/CreateWorkspaceForm.js | |
parent | show infobox when updating workspaces (diff) | |
download | ferdium-app-03c76d7a6e5c5529e39f245dd350c0bc8abbd128.tar.gz ferdium-app-03c76d7a6e5c5529e39f245dd350c0bc8abbd128.tar.zst ferdium-app-03c76d7a6e5c5529e39f245dd350c0bc8abbd128.zip |
indicate any server interaction with spinners and infoboxes
Diffstat (limited to 'src/features/workspaces/components/CreateWorkspaceForm.js')
-rw-r--r-- | src/features/workspaces/components/CreateWorkspaceForm.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/features/workspaces/components/CreateWorkspaceForm.js b/src/features/workspaces/components/CreateWorkspaceForm.js index 83f6e07f7..8b5039246 100644 --- a/src/features/workspaces/components/CreateWorkspaceForm.js +++ b/src/features/workspaces/components/CreateWorkspaceForm.js | |||
@@ -10,7 +10,7 @@ import { required } from '../../../helpers/validation-helpers'; | |||
10 | const messages = defineMessages({ | 10 | const messages = defineMessages({ |
11 | submitButton: { | 11 | submitButton: { |
12 | id: 'settings.workspace.add.form.submitButton', | 12 | id: 'settings.workspace.add.form.submitButton', |
13 | defaultMessage: '!!!Save workspace', | 13 | defaultMessage: '!!!Create workspace', |
14 | }, | 14 | }, |
15 | name: { | 15 | name: { |
16 | id: 'settings.workspace.add.form.name', | 16 | id: 'settings.workspace.add.form.name', |
@@ -40,6 +40,7 @@ class CreateWorkspaceForm extends Component { | |||
40 | 40 | ||
41 | static propTypes = { | 41 | static propTypes = { |
42 | classes: PropTypes.object.isRequired, | 42 | classes: PropTypes.object.isRequired, |
43 | isSubmitting: PropTypes.bool.isRequired, | ||
43 | onSubmit: PropTypes.func.isRequired, | 44 | onSubmit: PropTypes.func.isRequired, |
44 | }; | 45 | }; |
45 | 46 | ||
@@ -69,7 +70,7 @@ class CreateWorkspaceForm extends Component { | |||
69 | 70 | ||
70 | render() { | 71 | render() { |
71 | const { intl } = this.context; | 72 | const { intl } = this.context; |
72 | const { classes } = this.props; | 73 | const { classes, isSubmitting } = this.props; |
73 | const { form } = this; | 74 | const { form } = this; |
74 | return ( | 75 | return ( |
75 | <div className={classes.form}> | 76 | <div className={classes.form}> |
@@ -84,6 +85,8 @@ class CreateWorkspaceForm extends Component { | |||
84 | type="submit" | 85 | type="submit" |
85 | label={intl.formatMessage(messages.submitButton)} | 86 | label={intl.formatMessage(messages.submitButton)} |
86 | onClick={this.submitForm.bind(this, form)} | 87 | onClick={this.submitForm.bind(this, form)} |
88 | busy={isSubmitting} | ||
89 | buttonType={isSubmitting ? 'secondary' : 'primary'} | ||
87 | /> | 90 | /> |
88 | </div> | 91 | </div> |
89 | ); | 92 | ); |