import React from 'react' import { translate } from 'react-i18next' export class AddMemberForm extends React.Component { constructor (props) { super(props) this.state = { newUserEmail: '', newUserProfile: '' } } handleChangeNewUserEmail = e => this.setState({newUserEmail: e.target.value}) handleChangeNewUserProfile = e => this.setState({newUserProfile: e.currentTarget.value}) handleClickAddUser = () => { const { props, state } = this if (state.newUserEmail === '' || state.newUserProfile === '') { GLOBAL_dispatchEvent({ type: 'addFlashMsg', data: { msg: props.t('Please type a name and select a profile'), type: 'warning', delay: undefined } }) return } props.onClickAddUser(state.newUserEmail, state.newUserProfile) } render () { const { props, state } = this return (
{/*
*/}
{props.t('Choose the profile of the user')}
{Object.keys(props.profile).map(p => props.profile[p]).map(p => )}
) } } export default translate()(AddMemberForm)