Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
1960b14d
Commit
1960b14d
authored
5 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Re- rename edit_profile to settings
parent
15a418cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/auth/views.py
+6
-6
6 additions, 6 deletions
app/auth/views.py
app/templates/auth/settings.html.j2
+0
-0
0 additions, 0 deletions
app/templates/auth/settings.html.j2
app/templates/base.html.j2
+2
-2
2 additions, 2 deletions
app/templates/base.html.j2
with
8 additions
and
8 deletions
app/auth/views.py
+
6
−
6
View file @
1960b14d
...
...
@@ -131,9 +131,9 @@ def password_reset(token):
title
=
'
Password Reset
'
)
@auth.route
(
'
/
edit_profile
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@auth.route
(
'
/
settings
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@login_required
def
edit_profile
():
def
settings
():
"""
View where loged in User can change own User information like Password etc.
"""
...
...
@@ -144,7 +144,7 @@ def edit_profile():
db
.
session
.
add
(
current_user
)
db
.
session
.
commit
()
flash
(
'
Your password has been updated.
'
)
return
redirect
(
url_for
(
'
auth.
edit_profile
'
))
return
redirect
(
url_for
(
'
auth.
settings
'
))
else
:
flash
(
'
Invalid password.
'
)
change_profile_form
=
EditProfileForm
(
user
=
current_user
)
...
...
@@ -155,14 +155,14 @@ def edit_profile():
flash
(
'
Your email has been updated.
'
)
change_profile_form
.
email
.
data
=
current_user
.
email
return
render_template
(
'
auth/
edit_profile
.html.j2
'
,
'
auth/
settings
.html.j2
'
,
change_password_form
=
change_password_form
,
change_profile_form
=
change_profile_form
,
title
=
'
Edit Profile
'
title
=
'
Settings
'
)
@auth.route
(
'
/
edit_profile
/delete_self/<int:user_id>
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@auth.route
(
'
/
settings
/delete_self/<int:user_id>
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@login_required
def
delete_self
(
user_id
):
selected_user
=
User
.
query
.
filter_by
(
id
=
user_id
).
first
()
...
...
This diff is collapsed.
Click to expand it.
app/templates/auth/
edit_profile
.html.j2
→
app/templates/auth/
settings
.html.j2
+
0
−
0
View file @
1960b14d
File moved
This diff is collapsed.
Click to expand it.
app/templates/base.html.j2
+
2
−
2
View file @
1960b14d
...
...
@@ -72,7 +72,7 @@
</div>
<ul
id=
"nav-account-dropdown"
class=
"dropdown-content"
>
{% if current_user.is_authenticated %}
<li><a
href=
"{{ url_for('auth.
edit_profile
') }}"
><i
class=
"material-icons"
>
settings
</i>
Settings
</a></li>
<li><a
href=
"{{ url_for('auth.
settings
') }}"
><i
class=
"material-icons"
>
settings
</i>
Settings
</a></li>
<li><a
href=
"{{ url_for('auth.logout') }}"
><i
class=
"material-icons"
>
power_settings_new
</i>
Log out
</a></li>
{% else %}
<li><a
href=
"{{ url_for('auth.login') }}"
><i
class=
"material-icons"
>
person
</i>
Log in
</a></li>
...
...
@@ -116,7 +116,7 @@
<li><div
class=
"divider"
></div></li>
<li><a
class=
"subheader"
>
Account
</a></li>
{% if current_user.is_authenticated %}
<li><a
href=
"{{ url_for('auth.
edit_profile
') }}"
><i
class=
"material-icons"
>
settings
</i>
Settings
</a></li>
<li><a
href=
"{{ url_for('auth.
settings
') }}"
><i
class=
"material-icons"
>
settings
</i>
Settings
</a></li>
<li><a
href=
"{{ url_for('auth.logout') }}"
><i
class=
"material-icons"
>
power_settings_new
</i>
Log out
</a></li>
{% else %}
<li><a
href=
"{{ url_for('auth.login') }}"
><i
class=
"material-icons"
>
person
</i>
Log in
</a></li>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment