-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix redirects on user settings introduced by menu refactoring #3975
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
Fix redirects on user settings introduced by menu refactoring #3975
Conversation
9751f02
to
8fd9a70
Compare
Codecov Report
@@ Coverage Diff @@
## master #3975 +/- ##
==========================================
- Coverage 19.97% 19.96% -0.01%
==========================================
Files 153 153
Lines 30524 30523 -1
==========================================
- Hits 6097 6094 -3
- Misses 23513 23514 +1
- Partials 914 915 +1
Continue to review full report at Codecov.
|
Doesn't changes won't be lost on redirect? |
What changes do you mean? The flash messages? |
@lafriks Ah ok I get it. You mean the form data? Actually this was only implemented in a few situations, but if we want it for all settings I can change that of course. |
@lafriks I had a look on how to implement that for all settings. However it is not a small change. So maybe we should postpone the prefilling of forms until this and the refactoring PR's are merged. |
c481503
to
9e9e56b
Compare
@lafriks @JonasFranzDEV I've changed the PR to just load missing data, but IMO this can be done better. But think this should be done in a separate PR and after all the other PR's regarding the settings are merged. |
9e9e56b
to
1e0bc04
Compare
I've rebased the changes with master, so the previous refactoring is now included. Furthermore I have to annotate that because we don't redirect back to the original settings page some links defined on these pages don't work properly after submitting a form with an error as url differs. |
d703ea9
to
8b00469
Compare
@@ -32,6 +32,7 @@ const ( | |||
func Profile(ctx *context.Context) { | |||
ctx.Data["Title"] = ctx.Tr("settings") | |||
ctx.Data["PageIsSettingsProfile"] = true | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought it is more consistent with the rest of the code base.
But of course I can remove it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JonasFranzDEV Do you want me to remove it?
8b00469
to
032292d
Compare
make LG-TM work |
Adresses #3974
Settings pages that host more than one modules now load missing data after
POST
requests.