mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Update settings page.
This commit is contained in:
parent
8458271a5c
commit
678ac670ea
@ -125,9 +125,9 @@ def password_reset(token):
|
||||
title='Password Reset')
|
||||
|
||||
|
||||
@auth.route('/account', methods=['GET', 'POST'])
|
||||
@auth.route('/settings', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
def account():
|
||||
def settings():
|
||||
form = ChangeAccountForm()
|
||||
if form.validate_on_submit():
|
||||
flash('It is just a test, nothing changed.')
|
||||
@ -142,6 +142,6 @@ def account():
|
||||
if form.password.data:
|
||||
current_user.password = form.password.data
|
||||
db.session.commit()
|
||||
return redirect(url_for('auth.account'))
|
||||
return render_template('auth/account.html.j2', form=form,
|
||||
title='Account')
|
||||
return redirect(url_for('auth.settings'))
|
||||
return render_template('auth/settings.html.j2', form=form,
|
||||
title='Settings')
|
||||
|
@ -2,7 +2,16 @@
|
||||
|
||||
{% block page_content %}
|
||||
<div class="col s12">
|
||||
<h2>Change account information</h2>
|
||||
<h2>Settings</h2>
|
||||
<p> </p>
|
||||
</div>
|
||||
|
||||
<div class="col s12 m4">
|
||||
<h3>Account</h3>
|
||||
<p>Lo-fi you probably haven't heard of them etsy leggings raclette kickstarter four dollar toast. Raw denim fingerstache food truck chia health goth synth. Forage man bun intelligentsia freegan PBR&B banh mi asymmetrical chambray.</p>
|
||||
</div>
|
||||
|
||||
<div class="col s12 m8">
|
||||
<div class="card">
|
||||
<form method="POST">
|
||||
<div class="card-content">
|
@ -20,17 +20,12 @@
|
||||
</div>
|
||||
<ul id="nav-account-dropdown" class="dropdown-content">
|
||||
{% if current_user.is_authenticated %}
|
||||
<li><a href="{{ url_for('auth.account') }}"><i class="material-icons">person</i>Account</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons">chevron_left</i>Log out</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ url_for('auth.login') }}"><i class="material-icons">chevron_right</i>Log in</a></li>
|
||||
<li><a href="{{ url_for('auth.register') }}"><i class="material-icons">chevron_right</i>Register</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div id="nav-settings-dropdown" class="dropdown-content grey-text text-darken-4">
|
||||
<p>Settings</p>
|
||||
</div>
|
||||
<nav>
|
||||
<div class="nav-wrapper">
|
||||
<a href="#!" class="brand-logo">
|
||||
@ -40,13 +35,13 @@
|
||||
<ul class="right hide-on-med-and-down">
|
||||
<li><a id="nav-notifications" class="dropdown-trigger" href="#!" data-target="nav-notifications-dropdown"><i class="material-icons">notifications</i></a></li>
|
||||
<li><a id="nav-account" class="dropdown-trigger" href="#!" data-target="nav-account-dropdown"><i class="material-icons">account_circle</i></a></li>
|
||||
<li><a id="nav-settings" class="dropdown-trigger" href="#!" data-target="nav-settings-dropdown"><i class="material-icons">settings</i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<ul id="slide-out" class="sidenav sidenav-fixed">
|
||||
<li><a href="{{ url_for('main.index') }}">Opaque</a></li>
|
||||
<li><a href="{{ url_for('auth.settings') }}"><i class="material-icons">settings</i> Settings</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user