web: make user password-reset button use action button
This commit is contained in:
parent
c65b2944b3
commit
3045cf1aef
|
@ -127,7 +127,5 @@ class UserPasswordResetView(LoginRequiredMixin, PermissionRequiredMixin, DetailV
|
|||
link = request.build_absolute_uri(
|
||||
reverse_lazy("authentik_flows:default-recovery") + f"?{querystring}"
|
||||
)
|
||||
messages.success(
|
||||
request, _("Password reset link: <pre>%(link)s</pre>" % {"link": link})
|
||||
)
|
||||
messages.success(request, _("Password reset link: %(link)s" % {"link": link}))
|
||||
return redirect("/")
|
||||
|
|
|
@ -31,7 +31,6 @@ export class ActionButton extends SpinnerButton {
|
|||
}
|
||||
return r;
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.then(() => {
|
||||
this.setDone(SUCCESS_CLASS);
|
||||
})
|
||||
|
|
|
@ -20,7 +20,7 @@ export class Message extends LitElement {
|
|||
message?: APIMessage;
|
||||
|
||||
@property({type: Number})
|
||||
removeAfter = 3000;
|
||||
removeAfter = 8000;
|
||||
|
||||
@property({attribute: false})
|
||||
onRemove?: (m: APIMessage) => void;
|
||||
|
|
|
@ -5,6 +5,7 @@ import { TablePage } from "../../elements/table/TablePage";
|
|||
|
||||
import "../../elements/buttons/ModalButton";
|
||||
import "../../elements/buttons/Dropdown";
|
||||
import "../../elements/buttons/ActionButton";
|
||||
import { TableColumn } from "../../elements/table/Table";
|
||||
import { User } from "../../api/Users";
|
||||
|
||||
|
@ -90,9 +91,9 @@ export class UserListPage extends TablePage<User> {
|
|||
</li>
|
||||
</ul>
|
||||
</ak-dropdown>
|
||||
<a class="pf-c-button pf-m-tertiary" href="${User.adminUrl(`${item.pk}/reset/`)}">
|
||||
<ak-action-button method="GET" url="${User.adminUrl(`${item.pk}/reset/`)}">
|
||||
${gettext("Reset Password")}
|
||||
</a>
|
||||
</ak-action-button>
|
||||
<a class="pf-c-button pf-m-tertiary" href="${`-/impersonation/${item.pk}/`}">
|
||||
${gettext("Impersonate")}
|
||||
</a>`,
|
||||
|
|
Reference in a new issue