web/admin: use new group form for create
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
12bfa404c8
commit
1b496dd472
|
@ -72,9 +72,6 @@ export class AdminURLManager {
|
|||
return `/administration/users/${rest}`;
|
||||
}
|
||||
|
||||
static groups(rest: string): string {
|
||||
return `/administration/groups/${rest}`;
|
||||
}
|
||||
}
|
||||
|
||||
export class UserURLManager {
|
||||
|
|
|
@ -10,7 +10,6 @@ import { TableColumn } from "../../elements/table/Table";
|
|||
import { PAGE_SIZE } from "../../constants";
|
||||
import { CoreApi, Group } from "authentik-api";
|
||||
import { DEFAULT_CONFIG } from "../../api/Config";
|
||||
import { AdminURLManager } from "../../api/legacy";
|
||||
import "../../elements/forms/ModalForm";
|
||||
import "./GroupForm";
|
||||
|
||||
|
@ -88,12 +87,19 @@ export class GroupListPage extends TablePage<Group> {
|
|||
|
||||
renderToolbar(): TemplateResult {
|
||||
return html`
|
||||
<ak-modal-button href=${AdminURLManager.groups("create/")}>
|
||||
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
||||
<ak-forms-modal>
|
||||
<span slot="submit">
|
||||
${gettext("Create")}
|
||||
</ak-spinner-button>
|
||||
<div slot="modal"></div>
|
||||
</ak-modal-button>
|
||||
</span>
|
||||
<span slot="header">
|
||||
${gettext("Create Group")}
|
||||
</span>
|
||||
<ak-group-form slot="form">
|
||||
</ak-group-form>
|
||||
<button slot="trigger" class="pf-c-button pf-m-primary">
|
||||
${gettext("Create")}
|
||||
</button>
|
||||
</ak-forms-modal>
|
||||
${super.renderToolbar()}
|
||||
`;
|
||||
}
|
||||
|
|
Reference in New Issue