File tree 4 files changed +10
-0
lines changed 4 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -872,6 +872,9 @@ func ForgotPasswd(ctx *context.Context) {
872
872
return
873
873
}
874
874
875
+ email := ctx .Query ("email" )
876
+ ctx .Data ["Email" ] = email
877
+
875
878
ctx .Data ["IsResetRequest" ] = true
876
879
ctx .HTML (200 , tplForgotPassword )
877
880
}
Original file line number Diff line number Diff line change @@ -193,13 +193,15 @@ func SettingsDeleteAvatar(ctx *context.Context) {
193
193
func SettingsPassword (ctx * context.Context ) {
194
194
ctx .Data ["Title" ] = ctx .Tr ("settings" )
195
195
ctx .Data ["PageIsSettingsPassword" ] = true
196
+ ctx .Data ["Email" ] = ctx .User .Email
196
197
ctx .HTML (200 , tplSettingsPassword )
197
198
}
198
199
199
200
// SettingsPasswordPost response for change user's password
200
201
func SettingsPasswordPost (ctx * context.Context , form auth.ChangePasswordForm ) {
201
202
ctx .Data ["Title" ] = ctx .Tr ("settings" )
202
203
ctx .Data ["PageIsSettingsPassword" ] = true
204
+ ctx .Data ["PageIsSettingsDelete" ] = true
203
205
204
206
if ctx .HasError () {
205
207
ctx .HTML (200 , tplSettingsPassword )
@@ -684,6 +686,7 @@ func SettingsDeleteAccountLink(ctx *context.Context) {
684
686
func SettingsDelete (ctx * context.Context ) {
685
687
ctx .Data ["Title" ] = ctx .Tr ("settings" )
686
688
ctx .Data ["PageIsSettingsDelete" ] = true
689
+ ctx .Data ["Email" ] = ctx .User .Email
687
690
688
691
if ctx .Req .Method == "POST" {
689
692
if _ , err := models .UserSignIn (ctx .User .Name , ctx .Query ("password" )); err != nil {
Original file line number Diff line number Diff line change 22
22
<div class="ui red button delete-button" data-type="form" data-form="#delete-form">
23
23
{{.i18n.Tr "settings.confirm_delete_account"}}
24
24
</div>
25
+ <div>
26
+ <a href="{{AppSubUrl}}/user/forget_password?email={{.Email}}">{{.i18n.Tr "auth.forget_password"}}</a>
27
+ </div>
25
28
</form>
26
29
</div>
27
30
</div>
Original file line number Diff line number Diff line change 29
29
30
30
<div class="field">
31
31
<button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
32
+ <a href="{{AppSubUrl}}/user/forget_password?email={{.Email}}">{{.i18n.Tr "auth.forget_password"}}</a>
32
33
</div>
33
34
</form>
34
35
{{else}}
You can’t perform that action at this time.
0 commit comments