2021-02-04 19:15:23 +01:00
|
|
|
import React, { PureComponent } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Button from '../../../ui/button';
|
2019-11-04 13:40:46 +01:00
|
|
|
|
|
|
|
export default class SignatureRequestFooter extends PureComponent {
|
|
|
|
static propTypes = {
|
|
|
|
cancelAction: PropTypes.func.isRequired,
|
|
|
|
signAction: PropTypes.func.isRequired,
|
2021-12-02 19:09:18 +01:00
|
|
|
disabled: PropTypes.bool,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-11-04 13:40:46 +01:00
|
|
|
|
|
|
|
static contextTypes = {
|
|
|
|
t: PropTypes.func,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-11-04 13:40:46 +01:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
render() {
|
2021-10-21 21:17:03 +02:00
|
|
|
const { cancelAction, signAction, disabled = false } = this.props;
|
2019-11-04 13:40:46 +01:00
|
|
|
return (
|
|
|
|
<div className="signature-request-footer">
|
2022-08-08 22:28:49 +02:00
|
|
|
<Button
|
|
|
|
onClick={cancelAction}
|
|
|
|
type="secondary"
|
|
|
|
data-testid="signature-cancel-button"
|
|
|
|
>
|
2022-11-30 08:13:14 +01:00
|
|
|
{this.context.t('reject')}
|
2020-11-03 00:41:28 +01:00
|
|
|
</Button>
|
2022-08-08 22:28:49 +02:00
|
|
|
<Button
|
|
|
|
onClick={signAction}
|
|
|
|
type="primary"
|
|
|
|
data-testid="signature-sign-button"
|
|
|
|
disabled={disabled}
|
|
|
|
>
|
2020-11-03 00:41:28 +01:00
|
|
|
{this.context.t('sign')}
|
|
|
|
</Button>
|
2019-11-04 13:40:46 +01:00
|
|
|
</div>
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
2019-11-04 13:40:46 +01:00
|
|
|
}
|
|
|
|
}
|