Skip to content

Commit 7b6da90

Browse files
committed
Fix: Loading state not showing & user not automatically logout after password reset
1 parent 837237c commit 7b6da90

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

assets/src/js/frontend/dashboard/pages/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ const settings = () => {
311311

312312
await this.resetPasswordMutation?.mutate(data);
313313
form.reset(formId, data as unknown as Record<string, unknown>);
314+
window.location.reload();
314315
},
315316
};
316317
};

templates/dashboard/account/settings/security.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ class="tutor-card tutor-card-rounded-2xl tutor-flex tutor-flex-column tutor-gap-
7070
->size( Size::SMALL )
7171
->attr( 'form', $form_id )
7272
->attr( 'type', 'submit' )
73+
->attr( ':class', "{ 'tutor-btn-loading': resetPasswordMutation?.isPending }" )
74+
->attr( ':disabled', 'resetPasswordMutation?.isPending' )
7375
->get();
7476

7577
$modal_footer = sprintf(

0 commit comments

Comments
 (0)