aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings/user/EditUserForm.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/settings/user/EditUserForm.js')
-rw-r--r--src/components/settings/user/EditUserForm.js25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/components/settings/user/EditUserForm.js b/src/components/settings/user/EditUserForm.js
index 0e3ac6b10..a1a353e57 100644
--- a/src/components/settings/user/EditUserForm.js
+++ b/src/components/settings/user/EditUserForm.js
@@ -3,11 +3,10 @@ import PropTypes from 'prop-types';
3import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; 3import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
4import { defineMessages, intlShape } from 'react-intl'; 4import { defineMessages, intlShape } from 'react-intl';
5import { Link } from 'react-router'; 5import { Link } from 'react-router';
6 6import { Input } from '@meetfranz/forms';
7// import { Link } from 'react-router';
8 7
9import Form from '../../../lib/Form'; 8import Form from '../../../lib/Form';
10import Input from '../../ui/Input'; 9// import Input from '../../ui/Input';
11import Button from '../../ui/Button'; 10import Button from '../../ui/Button';
12import Radio from '../../ui/Radio'; 11import Radio from '../../ui/Radio';
13import Infobox from '../../ui/Infobox'; 12import Infobox from '../../ui/Infobox';
@@ -39,13 +38,12 @@ const messages = defineMessages({
39 }, 38 },
40}); 39});
41 40
42export default @observer class EditServiceForm extends Component { 41export default @observer class EditUserForm extends Component {
43 static propTypes = { 42 static propTypes = {
44 status: MobxPropTypes.observableArray.isRequired, 43 status: MobxPropTypes.observableArray.isRequired,
45 form: PropTypes.instanceOf(Form).isRequired, 44 form: PropTypes.instanceOf(Form).isRequired,
46 onSubmit: PropTypes.func.isRequired, 45 onSubmit: PropTypes.func.isRequired,
47 isSaving: PropTypes.bool.isRequired, 46 isSaving: PropTypes.bool.isRequired,
48 isEnterprise: PropTypes.bool.isRequired,
49 }; 47 };
50 48
51 static contextTypes = { 49 static contextTypes = {
@@ -68,7 +66,6 @@ export default @observer class EditServiceForm extends Component {
68 // user, 66 // user,
69 status, 67 status,
70 form, 68 form,
71 isEnterprise,
72 isSaving, 69 isSaving,
73 } = this.props; 70 } = this.props;
74 const { intl } = this.context; 71 const { intl } = this.context;
@@ -98,23 +95,21 @@ export default @observer class EditServiceForm extends Component {
98 )} 95 )}
99 <h2>{intl.formatMessage(messages.headlineAccount)}</h2> 96 <h2>{intl.formatMessage(messages.headlineAccount)}</h2>
100 <div className="grid__row"> 97 <div className="grid__row">
101 <Input field={form.$('firstname')} focus /> 98 <Input {...form.$('firstname').bind()} focus />
102 <Input field={form.$('lastname')} /> 99 <Input {...form.$('lastname').bind()} />
103 </div> 100 </div>
104 <Input field={form.$('email')} /> 101 <Input {...form.$('email').bind()} />
105 {!isEnterprise && ( 102 <Radio field={form.$('accountType')} />
106 <Radio field={form.$('accountType')} /> 103 {form.$('accountType').value === 'company' && (
107 )}
108 {!isEnterprise && form.$('accountType').value === 'company' && (
109 <Input field={form.$('organization')} /> 104 <Input field={form.$('organization')} />
110 )} 105 )}
111 <h2>{intl.formatMessage(messages.headlinePassword)}</h2> 106 <h2>{intl.formatMessage(messages.headlinePassword)}</h2>
112 <Input 107 <Input
113 field={form.$('oldPassword')} 108 {...form.$('oldPassword').bind()}
114 showPasswordToggle 109 showPasswordToggle
115 /> 110 />
116 <Input 111 <Input
117 field={form.$('newPassword')} 112 {...form.$('newPassword').bind()}
118 showPasswordToggle 113 showPasswordToggle
119 scorePassword 114 scorePassword
120 /> 115 />