import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; import { defineMessages, intlShape } from 'react-intl'; import { Link } from 'react-router'; import { Input } from '@meetfranz/forms'; import Form from '../../../lib/Form'; // import Input from '../../ui/Input'; import Button from '../../ui/Button'; import Radio from '../../ui/Radio'; import Infobox from '../../ui/Infobox'; console.log('input', Input); const messages = defineMessages({ headline: { id: 'settings.account.headline', defaultMessage: '!!!Account', }, headlineProfile: { id: 'settings.account.headlineProfile', defaultMessage: '!!!Update Profile', }, headlineAccount: { id: 'settings.account.headlineAccount', defaultMessage: '!!!Account Information', }, headlinePassword: { id: 'settings.account.headlinePassword', defaultMessage: '!!!Change Password', }, successInfo: { id: 'settings.account.successInfo', defaultMessage: '!!!Your changes have been saved', }, buttonSave: { id: 'settings.account.buttonSave', defaultMessage: '!!!Update profile', }, }); export default @observer class EditUserForm extends Component { static propTypes = { status: MobxPropTypes.observableArray.isRequired, form: PropTypes.instanceOf(Form).isRequired, onSubmit: PropTypes.func.isRequired, isSaving: PropTypes.bool.isRequired, }; static contextTypes = { intl: intlShape, }; submit(e) { e.preventDefault(); this.props.form.submit({ onSuccess: (form) => { const values = form.values(); this.props.onSubmit(values); }, onError: () => {}, }); } render() { const { // user, status, form, isSaving, } = this.props; const { intl } = this.context; return (