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

@ -12,9 +12,9 @@ import {Icon} from "../lib/bootstrap-components";
import {checkPermissions} from "../lib/permissions";
import {getUrl} from "../lib/urls";
import {
tableDeleteDialogAddDeleteButton,
tableDeleteDialogInit,
tableDeleteDialogRender
tableAddDeleteButton,
tableRestActionDialogInit,
tableRestActionDialogRender
} from "../lib/modals";
@withTranslation()
@ -26,7 +26,7 @@ export default class List extends Component {
super(props);
this.state = {};
tableDeleteDialogInit(this);
tableRestActionDialogInit(this);
}
@withAsyncErrorHandler
@ -165,7 +165,7 @@ export default class List extends Component {
});
}
tableDeleteDialogAddDeleteButton(actions, this, perms, data[0], data[1]);
tableAddDeleteButton(actions, this, perms, `rest/reports/${data[0]}`, data[1], t('deletingReport'), t('reportDeleted'));
return { refreshTimeout, actions };
}
@ -175,7 +175,7 @@ export default class List extends Component {
return (
<div>
{tableDeleteDialogRender(this, `rest/reports`, t('deletingReport'), t('reportDeleted'))}
{tableRestActionDialogRender(this)}
<Toolbar>
{this.state.createPermitted &&
<NavButton linkTo="/reports/create" className="btn-primary" icon="plus" label={t('createReport')}/>