Skip to content

Commit

Permalink
add own section for delete account on settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Mar 14, 2024
1 parent 9de69ec commit ea1447b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
3 changes: 3 additions & 0 deletions KratosSelfService/Resources/CustomTranslator.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,7 @@
<data name="deleteAccount.text" xml:space="preserve">
<value>Möchten Sie wirklich, dass Ihr Benutzerkonto gelöscht wird?</value>
</data>
<data name="settings.deleteAccountButtonLabel" xml:space="preserve">
<value>Account löschen</value>
</data>
</root>
3 changes: 3 additions & 0 deletions KratosSelfService/Resources/CustomTranslator.resx
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,7 @@
<data name="deleteAccount.confirm" xml:space="preserve">
<value>Confirm</value>
</data>
<data name="settings.deleteAccountButtonLabel" xml:space="preserve">
<value>Delete Account</value>
</data>
</root>
21 changes: 18 additions & 3 deletions KratosSelfService/Views/Settings/Settings.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</li>
}
<li>
<a href="settings/delete-account[email protected]&[email protected]">
<a href="#delete-account">
<span class="icon-text is-warning">
<span class="icon">
<i class="fa-solid fa-user-xmark fa-sm"></i>
Expand Down Expand Up @@ -99,8 +99,8 @@
<h3 class="subtitle">
@group.Key.ToLocalTitleString(OryTranslator)
</h3>
<form class="mb-3 @(group.Key == KratosUiNode.GroupEnum.Oidc ? "columns is-multiline" : "")"
action="@Model.flow.Ui.Action"
<form class="mb-3 @(group.Key == KratosUiNode.GroupEnum.Oidc ? "columns is-multiline" : "")"
action="@Model.flow.Ui.Action"
method="@Model.flow.Ui.Method">
@foreach (var node in defaultNodes)
{
Expand All @@ -115,6 +115,21 @@
</form>
</div>
}
<div class="box p-5" id="delete-account">
<h3 class="subtitle">
@CustomTranslator.Get("settings.deleteAccount")
</h3>
<div class="mb-3">
<div class="field">
<div class="control">
<a href="settings/[email protected]&[email protected]"
class="button is-danger">
@CustomTranslator.Get("settings.deleteAccountButtonLabel")
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

0 comments on commit ea1447b

Please sign in to comment.