mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Update settings page.
This commit is contained in:
		@@ -125,9 +125,9 @@ def password_reset(token):
 | 
				
			|||||||
                           title='Password Reset')
 | 
					                           title='Password Reset')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@auth.route('/account', methods=['GET', 'POST'])
 | 
					@auth.route('/settings', methods=['GET', 'POST'])
 | 
				
			||||||
@login_required
 | 
					@login_required
 | 
				
			||||||
def account():
 | 
					def settings():
 | 
				
			||||||
    form = ChangeAccountForm()
 | 
					    form = ChangeAccountForm()
 | 
				
			||||||
    if form.validate_on_submit():
 | 
					    if form.validate_on_submit():
 | 
				
			||||||
        flash('It is just a test, nothing changed.')
 | 
					        flash('It is just a test, nothing changed.')
 | 
				
			||||||
@@ -142,6 +142,6 @@ def account():
 | 
				
			|||||||
        if form.password.data:
 | 
					        if form.password.data:
 | 
				
			||||||
            current_user.password = form.password.data
 | 
					            current_user.password = form.password.data
 | 
				
			||||||
        db.session.commit()
 | 
					        db.session.commit()
 | 
				
			||||||
        return redirect(url_for('auth.account'))
 | 
					        return redirect(url_for('auth.settings'))
 | 
				
			||||||
    return render_template('auth/account.html.j2', form=form,
 | 
					    return render_template('auth/settings.html.j2', form=form,
 | 
				
			||||||
                           title='Account')
 | 
					                           title='Settings')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,16 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% block page_content %}
 | 
					{% block page_content %}
 | 
				
			||||||
<div class="col s12">
 | 
					<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">
 | 
					  <div class="card">
 | 
				
			||||||
    <form method="POST">
 | 
					    <form method="POST">
 | 
				
			||||||
      <div class="card-content">
 | 
					      <div class="card-content">
 | 
				
			||||||
@@ -20,17 +20,12 @@
 | 
				
			|||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <ul id="nav-account-dropdown" class="dropdown-content">
 | 
					      <ul id="nav-account-dropdown" class="dropdown-content">
 | 
				
			||||||
        {% if current_user.is_authenticated %}
 | 
					        {% 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>
 | 
					        <li><a href="{{ url_for('auth.logout') }}"><i class="material-icons">chevron_left</i>Log out</a></li>
 | 
				
			||||||
        {% else %}
 | 
					        {% 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.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>
 | 
					        <li><a href="{{ url_for('auth.register') }}"><i class="material-icons">chevron_right</i>Register</a></li>
 | 
				
			||||||
        {% endif %}
 | 
					        {% endif %}
 | 
				
			||||||
      </ul>
 | 
					      </ul>
 | 
				
			||||||
      <div id="nav-settings-dropdown" class="dropdown-content grey-text text-darken-4">
 | 
					 | 
				
			||||||
        <p>Settings</p>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <nav>
 | 
					      <nav>
 | 
				
			||||||
        <div class="nav-wrapper">
 | 
					        <div class="nav-wrapper">
 | 
				
			||||||
          <a href="#!" class="brand-logo">
 | 
					          <a href="#!" class="brand-logo">
 | 
				
			||||||
@@ -40,13 +35,13 @@
 | 
				
			|||||||
          <ul class="right hide-on-med-and-down">
 | 
					          <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-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-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>
 | 
					          </ul>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </nav>
 | 
					      </nav>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <ul id="slide-out" class="sidenav sidenav-fixed">
 | 
					      <ul id="slide-out" class="sidenav sidenav-fixed">
 | 
				
			||||||
        <li><a href="{{ url_for('main.index') }}">Opaque</a></li>
 | 
					        <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>
 | 
					      </ul>
 | 
				
			||||||
    </header>
 | 
					    </header>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user