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

circulation: fix password change on patron profile #953

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,12 @@ export class ChangePasswordFormComponent implements OnInit {
this.formFields = [
{
key: 'password',
type: 'input',
type: 'passwordGenerator',
focus: true,
templateOptions: {
type: 'password',
api: "/api/user/password/generate",
label: this._translateService.instant('New password'),
required: true,
// same as Invenio
minLength: 6,
maxLength: 128,
keydown: (field, event) => {
if (event.key === 'Enter') {
event.preventDefault();
Expand Down
3 changes: 2 additions & 1 deletion projects/shared/src/lib/api/user-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export class UserApiService {
public changePassword(username: string, password: string) {
const data = {
username,
new_password: password
new_password: password,
new_password_confirm: password
};
const url = `${this._apiPrefix}/change-password`;
return this._httpClient.post<any>(url, data);
Expand Down