Skip to content

Commit

Permalink
Fixed update password not working
Browse files Browse the repository at this point in the history
  • Loading branch information
svera authored Apr 28, 2024
1 parent f334eef commit a45be00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ On first run, Coreander creates an admin user with the following credentials:
* `WORDS_PER_MINUTE`: Defines a default words per minute reading speed that will be used for not logged-in users. Defaults to 250.
* `SESSION_TIMEOUT`: Specifies the maximum time a user session may last, in hours. Floating-point values are allowed. Defaults to 24 hours.
* `UPLOAD_DOCUMENT_MAX_SIZE`: Maximum document size allowed to be uploaded to the library, in megabytes. Set this to 0 to unlimit upload size. Defaults to 20 megabytes.

* `HOSTNAME`: The name of the host the server is running on.
3 changes: 2 additions & 1 deletion internal/webserver/embedded/views/users/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</div>
<div class='tab-pane fade p-3 {{if eq .ActiveTab "password"}}show active{{end}}' id="password-tab-pane" role="tabpanel" aria-labelledby="password-tab"
tabindex="0">
<form method="post" action="/{{.Lang}}/users/{{.User.Uuid}}/edit">
<form method="post" action="/{{.Lang}}/users/{{.User.Username}}/edit">
{{if eq .Session.Uuid .User.Uuid}}
<div class="mb-3">
<label for="old-password" class="form-label">{{t .Lang "Current password"}}</label>
Expand Down Expand Up @@ -98,6 +98,7 @@
</div>

<input type="hidden" name="password-tab" value="true">
<input type="hidden" name="id" value="{{.User.Uuid}}">
<button type="submit" class="btn btn-primary">{{t .Lang "Update"}}</button>
</form>
</div>
Expand Down

0 comments on commit a45be00

Please sign in to comment.