Added confirmations for unsubscribe, blacklist and remove from blacklist

This commit is contained in:
Tomas Bures 2018-11-22 11:31:16 +01:00
parent aeaaf116d7
commit b058169e12
25 changed files with 290 additions and 228 deletions

View file

@ -11,9 +11,9 @@ import moment from 'moment';
import mailtrainConfig from 'mailtrainConfig';
import {checkPermissions} from "../../lib/permissions";
import {
tableDeleteDialogAddDeleteButton,
tableDeleteDialogInit,
tableDeleteDialogRender
tableAddDeleteButton,
tableRestActionDialogInit,
tableRestActionDialogRender
} from "../../lib/modals";
@withTranslation()
@ -25,7 +25,7 @@ export default class List extends Component {
super(props);
this.state = {};
tableDeleteDialogInit(this);
tableRestActionDialogInit(this);
}
@withAsyncErrorHandler
@ -74,7 +74,7 @@ export default class List extends Component {
});
}
tableDeleteDialogAddDeleteButton(actions, this, perms, data[0], data[1]);
tableAddDeleteButton(actions, this, perms, `rest/reports/templates/${data[0]}`, data[1], t('deletingReportTemplate'), t('reportTemplateDeleted'));
return actions;
}
@ -83,7 +83,7 @@ export default class List extends Component {
return (
<div>
{tableDeleteDialogRender(this, `rest/reports/templates`, t('deletingReportTemplate'), t('reportTemplateDeleted'))}
{tableRestActionDialogRender(this)}
{this.state.createPermitted &&
<Toolbar>
<DropdownMenu className="btn-primary" label={t('createReportTemplate')}>