diff options
-rw-r--r-- | src/components/auth/Import.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js index 078244434..7de571896 100644 --- a/src/components/auth/Import.js +++ b/src/components/auth/Import.js | |||
@@ -41,22 +41,20 @@ export default class Import extends Component { | |||
41 | intl: intlShape, | 41 | intl: intlShape, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | prepareForm() { | 44 | config = { |
45 | const { services } = this.props; | ||
46 | |||
47 | const config = { | ||
48 | fields: { | 45 | fields: { |
49 | import: [...services.filter(s => s.recipe).map(s => ({ | 46 | import: [...this.props.services.filter(s => s.recipe).map(s => ({ |
50 | add: { | 47 | fields: { |
51 | default: true, | 48 | add: { |
52 | options: s, | 49 | default: true, |
50 | options: s, | ||
51 | }, | ||
53 | }, | 52 | }, |
54 | }))], | 53 | }))], |
55 | }, | 54 | }, |
56 | }; | 55 | }; |
57 | 56 | ||
58 | return new Form(config, this.context.intl); | 57 | form = new Form(this.config, this.context.intl); |
59 | } | ||
60 | 58 | ||
61 | submit(e) { | 59 | submit(e) { |
62 | const { services } = this.props; | 60 | const { services } = this.props; |
@@ -74,7 +72,9 @@ export default class Import extends Component { | |||
74 | } | 72 | } |
75 | 73 | ||
76 | render() { | 74 | render() { |
77 | this.form = this.prepareForm(); | 75 | // if (this.form === undefined) { |
76 | // this.form = this.prepareForm(); | ||
77 | // } | ||
78 | const { intl } = this.context; | 78 | const { intl } = this.context; |
79 | const { services, isSubmitting, inviteRoute } = this.props; | 79 | const { services, isSubmitting, inviteRoute } = this.props; |
80 | 80 | ||