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

@ -10,9 +10,9 @@ import {Link} from "react-router-dom";
import {Icon} from "../lib/bootstrap-components";
import {checkPermissions} from "../lib/permissions";
import {
tableDeleteDialogAddDeleteButton,
tableDeleteDialogInit,
tableDeleteDialogRender
tableAddDeleteButton,
tableRestActionDialogInit,
tableRestActionDialogRender
} from "../lib/modals";
@withTranslation()
@ -24,7 +24,7 @@ export default class List extends Component {
super(props);
this.state = {};
tableDeleteDialogInit(this);
tableRestActionDialogInit(this);
}
@withAsyncErrorHandler
@ -121,7 +121,7 @@ export default class List extends Component {
});
}
tableDeleteDialogAddDeleteButton(actions, this, perms, data[0], data[1]);
tableAddDeleteButton(actions, this, perms, `rest/lists/${data[0]}`, data[1], t('deletingList'), t('listDeleted'));
return actions;
}
@ -130,7 +130,7 @@ export default class List extends Component {
return (
<div>
{tableDeleteDialogRender(this, `rest/lists`, t('deletingList'), t('listDeleted'))}
{tableRestActionDialogRender(this)}
{this.state.createPermitted &&
<Toolbar>
<NavButton linkTo="/lists/create" className="btn-primary" icon="plus" label={t('createList')}/>