diff --git a/frontend/src/component/feature/form/strategy-configure.jsx b/frontend/src/component/feature/form/strategy-configure.jsx index ab44195399..8fa9273d43 100644 --- a/frontend/src/component/feature/form/strategy-configure.jsx +++ b/frontend/src/component/feature/form/strategy-configure.jsx @@ -1,6 +1,7 @@ import React, { PropTypes } from 'react'; import { Textfield, Button, Card, CardTitle, CardText, CardActions, CardMenu, IconButton } from 'react-mdl'; import { Link } from 'react-router'; +import StrategyInputPersentage from './strategy-input-persentage'; const style = { flex: '1', @@ -39,18 +40,27 @@ class StrategyConfigure extends React.Component { if (keys.length === 0) { return null; } - return keys.map(field => ( - - )); + return keys.map(field => { + if (strategyDefinition.parametersTemplate[field] === 'percentage') { + return (); + } else { + return ( + + ); + } + }); } return null; } diff --git a/frontend/src/component/feature/form/strategy-input-persentage.jsx b/frontend/src/component/feature/form/strategy-input-persentage.jsx new file mode 100644 index 0000000000..43c63a633a --- /dev/null +++ b/frontend/src/component/feature/form/strategy-input-persentage.jsx @@ -0,0 +1,15 @@ +import React from 'react'; +import { Slider } from 'react-mdl'; + +const labelStyle = { + margin: '0', + color: '#3f51b5', + fontSize: '12px', +}; + +export default ({ field, value, onChange }) => ( +
+ + +
+);