Skip to content

Commit

Permalink
Fix the incorrect route path in the user edit page. (#27007)
Browse files Browse the repository at this point in the history
Regression of #26713

After #26713 , the base path of user edit has been changed to
`/admin/users/{userid}/edit`
## Before

https://github.com/go-gitea/gitea/assets/50507092/5f4a3f64-fe2b-4499-b110-e01c9d87ea19
  • Loading branch information
CaiCandong authored Sep 18, 2023
1 parent 9631958 commit 323135b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/admin/user/edit.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{.locale.Tr "admin.users.edit_account"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post">
<form class="ui form" action="./edit" method="post">
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<div class="field {{if .Err_UserName}}error{{end}}">
Expand Down Expand Up @@ -157,7 +157,7 @@
{{.locale.Tr "settings.avatar"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
<form class="ui form" action="./avatar" method="post" enctype="multipart/form-data">
{{.CsrfTokenHtml}}
{{if not .DisableGravatar}}
<div class="inline field">
Expand Down Expand Up @@ -186,7 +186,7 @@

<div class="field">
<button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
<button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
<button class="ui red button link-action" data-url="./avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
</div>
</form>
</div>
Expand All @@ -197,7 +197,7 @@
{{svg "octicon-trash"}}
{{.locale.Tr "settings.delete_account_title"}}
</div>
<form class="ui form" method="post" action="{{.Link}}/delete">
<form class="ui form" method="post" action="./delete">
<div class="content">
<p>{{.locale.Tr "settings.delete_account_desc"}}</p>
{{$.CsrfTokenHtml}}
Expand Down

0 comments on commit 323135b

Please sign in to comment.