|
@@ -5,11 +5,22 @@ import { withTranslation } from 'react-i18next';
|
|
|
class CustomizeFunctionOption extends React.PureComponent {
|
|
class CustomizeFunctionOption extends React.PureComponent {
|
|
|
|
|
|
|
|
render() {
|
|
render() {
|
|
|
- const { t } = this.props;
|
|
|
|
|
-
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div>
|
|
|
|
|
- <label htmlFor="settingForm[customize:isEnabledTimeline]" className="col-xs-3 control-label">{ t('customize_page.Timeline function') }</label>
|
|
|
|
|
|
|
+ <div className="form-group row">
|
|
|
|
|
+ <div className="col-xs-offset-4 col-xs-6 text-left">
|
|
|
|
|
+ <div className="checkbox checkbox-success">
|
|
|
|
|
+ <input
|
|
|
|
|
+ type="checkbox"
|
|
|
|
|
+ id={this.props.optionId}
|
|
|
|
|
+ checked={this.props.isChecked}
|
|
|
|
|
+ onChange={this.props.onChecked}
|
|
|
|
|
+ />
|
|
|
|
|
+ <label htmlFor={this.props.optionId}>
|
|
|
|
|
+ {this.props.label}
|
|
|
|
|
+ </label>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {this.props.children}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
@@ -19,11 +30,11 @@ class CustomizeFunctionOption extends React.PureComponent {
|
|
|
CustomizeFunctionOption.propTypes = {
|
|
CustomizeFunctionOption.propTypes = {
|
|
|
t: PropTypes.func.isRequired, // i18next
|
|
t: PropTypes.func.isRequired, // i18next
|
|
|
|
|
|
|
|
- behaviorType: PropTypes.string.isRequired,
|
|
|
|
|
- labelHtml: PropTypes.string.isRequired,
|
|
|
|
|
- isSelected: PropTypes.bool.isRequired,
|
|
|
|
|
- onSelected: PropTypes.func.isRequired,
|
|
|
|
|
- children: PropTypes.object.isRequired,
|
|
|
|
|
|
|
+ optionId: PropTypes.string.isRequired,
|
|
|
|
|
+ label: PropTypes.string.isRequired,
|
|
|
|
|
+ isChecked: PropTypes.bool.isRequired,
|
|
|
|
|
+ onChecked: PropTypes.func.isRequired,
|
|
|
|
|
+ children: PropTypes.array.isRequired,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export default withTranslation()(CustomizeFunctionOption);
|
|
export default withTranslation()(CustomizeFunctionOption);
|