register funktion
This commit is contained in:
54
lernplattform/templates/block_login.html
Normal file
54
lernplattform/templates/block_login.html
Normal file
@ -0,0 +1,54 @@
|
||||
<!-- wenn logged out -->
|
||||
{% if not session['logged_in'] %}
|
||||
<h5>{{ user_name }}</h5>
|
||||
<p>Login oder <a href="/register">Registrieren</a></p>
|
||||
<p class="light">Warum registrieren? Zum Schutz der Daten und dem Speichern deines Lernfortschrittes.</p>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
{% if category == 'login' %}
|
||||
<p class="errormsg">{{message}}</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<form name="loginForm" action="/login" method="post" onsubmit="return validateForm()">
|
||||
<div class="row mb-3">
|
||||
<label for="inputEmail3" class="col-sm-3 col-form-label">Benutzer</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="username" name="username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="inputPassword3" class="col-sm-3 col-form-label">Password</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="password" class="form-control" id="password" name="password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-8 offset-2">
|
||||
<input type="checkbox" name="remember" id="remember">
|
||||
<label for="remember">Eingeloggt bleiben</label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="form_id" value="login">
|
||||
<button type="submit" class="btn btn-primary">Einloggen</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<!-- wenn logged out -->
|
||||
|
||||
<!-- wenn logged in -->
|
||||
{% if session['logged_in'] %}
|
||||
<!--<img src="https://via.placeholder.com/100" alt="Profile Picture" />-->
|
||||
<h5>{{ user_name }}</h5>
|
||||
<p>Web Developer at Webestica</p>
|
||||
<p class="light">I'd love to change the world, but they won’t give me the source code.</p>
|
||||
<div class="d-flex justify-content-around">
|
||||
<span>256 Posts</span>
|
||||
<span>2.5K Followers</span>
|
||||
<span>365 Following</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- wenn logged in -->
|
Reference in New Issue
Block a user