2016-02-13 20:58:47 +05:30
|
|
|
import React, { PropTypes } from 'react';
|
2016-01-16 17:36:22 +05:30
|
|
|
|
|
|
|
import { FormattedMessage as Message } from 'react-intl';
|
|
|
|
|
2016-05-14 16:56:17 +05:30
|
|
|
import { Button } from 'components/ui/form';
|
|
|
|
import AuthTitle from 'components/auth/AuthTitle';
|
2016-01-16 17:36:22 +05:30
|
|
|
|
2016-05-14 16:56:17 +05:30
|
|
|
import messages from './Permissions.intl.json';
|
|
|
|
import Body from './PermissionsBody';
|
2016-02-13 20:58:47 +05:30
|
|
|
|
|
|
|
export default function Permissions() {
|
2016-03-13 14:06:31 +05:30
|
|
|
const componentsMap = {
|
2016-05-14 16:56:17 +05:30
|
|
|
Title: () => <AuthTitle title={messages.permissionsTitle} />,
|
2016-02-13 20:58:47 +05:30
|
|
|
Body,
|
2016-05-14 16:56:17 +05:30
|
|
|
Footer: () => <Button color="orange" autoFocus label={messages.approve} />,
|
2016-03-13 14:06:31 +05:30
|
|
|
Links: (props, context) => (
|
2016-02-29 23:46:33 +05:30
|
|
|
<a href="#" onClick={(event) => {
|
|
|
|
event.preventDefault();
|
|
|
|
|
2016-03-13 14:06:31 +05:30
|
|
|
context.reject();
|
2016-02-29 23:46:33 +05:30
|
|
|
}}>
|
2016-01-31 18:29:38 +05:30
|
|
|
<Message {...messages.decline} />
|
|
|
|
</a>
|
|
|
|
)
|
|
|
|
};
|
2016-03-13 14:06:31 +05:30
|
|
|
|
|
|
|
componentsMap.Links.contextTypes = {
|
|
|
|
reject: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
|
|
|
|
return componentsMap;
|
2016-01-31 18:29:38 +05:30
|
|
|
}
|