diff --git a/frontend/src/component/strategies/add-strategy.jsx b/frontend/src/component/strategies/add-strategy.jsx index faf9ec2ce6..0390f558f5 100644 --- a/frontend/src/component/strategies/add-strategy.jsx +++ b/frontend/src/component/strategies/add-strategy.jsx @@ -1,7 +1,7 @@ import React, { PropTypes, Component } from 'react'; -import { Textfield, IconButton, Menu, MenuItem, Checkbox } from 'react-mdl'; -import { HeaderTitle, FormButtons } from '../common'; +import { Textfield, IconButton, Menu, MenuItem, Checkbox, Card, CardTitle, CardText } from 'react-mdl'; +import { FormButtons } from '../common'; const trim = (value) => { @@ -54,6 +54,23 @@ const Parameter = ({ set, input = {}, index }) => ( ); +const EditHeader = () => ( +
+

Edit strategy

+

+ Be carefull! Changing a strategy definition might also require changes + implementation in the clients. +

+
+); + +const CreateHeader = () => ( +
+

Create a new Strategy definition

+
+); + + const Parameters = ({ input = [], count = 0, updateInList }) => (
{ gerArrayWithEntries(count) @@ -86,7 +103,9 @@ class AddStrategy extends Component { // TODO unwind this stuff if (this.props.initCallRequired === true) { this.props.init(this.props.input); - this.props.setValue('_params', this.props.input.parameters.length); + if (this.props.input.parameters) { + this.props.setValue('_params', this.props.input.parameters.length); + } } } @@ -104,7 +123,7 @@ class AddStrategy extends Component { return (
- + {editmode ? : }