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}`;
|
return `/administration/users/${rest}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static groups(rest: string): string {
|
|
||||||
return `/administration/groups/${rest}`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class UserURLManager {
|
export class UserURLManager {
|
||||||
|
|
|
@ -10,7 +10,6 @@ import { TableColumn } from "../../elements/table/Table";
|
||||||
import { PAGE_SIZE } from "../../constants";
|
import { PAGE_SIZE } from "../../constants";
|
||||||
import { CoreApi, Group } from "authentik-api";
|
import { CoreApi, Group } from "authentik-api";
|
||||||
import { DEFAULT_CONFIG } from "../../api/Config";
|
import { DEFAULT_CONFIG } from "../../api/Config";
|
||||||
import { AdminURLManager } from "../../api/legacy";
|
|
||||||
import "../../elements/forms/ModalForm";
|
import "../../elements/forms/ModalForm";
|
||||||
import "./GroupForm";
|
import "./GroupForm";
|
||||||
|
|
||||||
|
@ -88,12 +87,19 @@ export class GroupListPage extends TablePage<Group> {
|
||||||
|
|
||||||
renderToolbar(): TemplateResult {
|
renderToolbar(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<ak-modal-button href=${AdminURLManager.groups("create/")}>
|
<ak-forms-modal>
|
||||||
<ak-spinner-button slot="trigger" class="pf-m-primary">
|
<span slot="submit">
|
||||||
${gettext("Create")}
|
${gettext("Create")}
|
||||||
</ak-spinner-button>
|
</span>
|
||||||
<div slot="modal"></div>
|
<span slot="header">
|
||||||
</ak-modal-button>
|
${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()}
|
${super.renderToolbar()}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue