e09265279d
• Fixed: - group editing dialog • Updated: - FileInput to take in file from props to state - GroupCreateModal, GroupCreate to take in groupId
36 lines
899 B
JavaScript
36 lines
899 B
JavaScript
import { defineMessages, injectIntl } from 'react-intl'
|
|
import ModalLayout from './modal_layout'
|
|
import GroupCreate from '../../features/group_create'
|
|
|
|
const messages = defineMessages({
|
|
title: { id: 'create_group', defaultMessage: 'Create group' },
|
|
update: { id: 'groups.form.update', defaultMessage: 'Update group' },
|
|
})
|
|
|
|
export default
|
|
@injectIntl
|
|
class GroupCreateModal extends PureComponent {
|
|
|
|
static propTypes = {
|
|
intl: PropTypes.object.isRequired,
|
|
onClose: PropTypes.func.isRequired,
|
|
groupId: PropTypes.string,
|
|
}
|
|
|
|
render() {
|
|
const { intl, onClose, groupId } = this.props
|
|
|
|
const title = intl.formatMessage(groupId ? messages.update : messages.title)
|
|
|
|
return (
|
|
<ModalLayout
|
|
title={title}
|
|
width={440}
|
|
onClose={onClose}
|
|
>
|
|
<GroupCreate onCloseModal={onClose} params={{ id: groupId }} />
|
|
</ModalLayout>
|
|
)
|
|
}
|
|
}
|