Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed update password not working #84

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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