import React, { Component } from 'react' import PropTypes from 'prop-types' import actions from '../actions' import CustomFieldsInputs from '../../helpers/CustomFieldsInputs' export default class EditModal extends Component { constructor(props) { super(props) this.updateValue = this.updateValue.bind(this) } handleSubmit() { if(actions.validateFields(this.refs) == true) { this.props.saveModal(this.props.modal.modalProps.index, _.assign({}, this.refs, {custom_fields: this.custom_fields})) $('#JourneyPatternModal').modal('hide') } } updateValue(attribute, e) { actions.resetValidation(e.currentTarget) this.props.modal.modalProps.journeyPattern[attribute] = e.target.value this.forceUpdate() } renderModalTitle() { if (this.props.editMode) { return (