mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Implement login form in template and add support for flash messages via a toast.
This commit is contained in:
parent
b6a67fcd4d
commit
3b04addc17
@ -21,19 +21,20 @@
|
||||
<div class="card medium">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Log In</span>
|
||||
<form>
|
||||
<form method="POST">
|
||||
{{ form.hidden_tag() }}
|
||||
<div class="input-field">
|
||||
<input id="username" type="text" class="validate">
|
||||
<label for="username">Username</label>
|
||||
{{ form.email(class='validate', type='email') }}
|
||||
{{ form.email.label }}
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input id="password" type="password" class="validate">
|
||||
<label for="password">Password</label>
|
||||
{{ form.password(class='validate') }}
|
||||
{{ form.password.label }}
|
||||
</div>
|
||||
<a href="#!">Forgot Password?</a>
|
||||
<br><br>
|
||||
<div class="card-action">
|
||||
<input class="btn right" type="submit" value="Log In" data-_extension-text-contrast="">
|
||||
{{ form.submit(class='btn right') }}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -93,7 +93,6 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!--JavaScript at end of body for optimized loading-->
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/materialize.min.js') }}"></script>
|
||||
<script>
|
||||
M.AutoInit();
|
||||
@ -105,6 +104,9 @@
|
||||
document.getElementById("nav-settings"),
|
||||
{"alignment": "right", "constrainWidth": false, "coverTrigger": false}
|
||||
);
|
||||
{% for message in get_flashed_messages() %}
|
||||
M.toast({html: '{{ message }}'})
|
||||
{% endfor %}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user