Fixed alerts panel and renamed submit -> Login

master
Hiyorimi 6 years ago
parent a1757b282a
commit 66b97d55d6
  1. 24
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/layout.html
  2. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/nav.html

@ -36,17 +36,19 @@
<main role="main"> <main role="main">
{% with messages = get_flashed_messages(with_categories=true) %} {% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %} {% if messages %}
<div class="row"> <div class="container">
<div class="col-md-12"> <div class="row">
{% for category, message in messages %} <div class="col-md-12">
<div class="alert alert-{{ category }}"> {% for category, message in messages %}
<a class="close" title="Close" href="#" data-dismiss="alert">&times;</a> <div class="alert alert-{{ category }}">
{{message}} <a class="close" title="Close" href="#" data-dismiss="alert">&times;</a>
</div><!-- end .alert --> {{message}}
{% endfor %} </div><!-- end .alert -->
</div><!-- end col-md --> {% endfor %}
</div><!-- end row --> </div><!-- end col-md -->
{% endif %} </div><!-- end row -->
</div>
{% endif %}
{% endwith %} {% endwith %}
{% block content %}{% endblock %} {% block content %}{% endblock %}

@ -31,12 +31,12 @@
</li> </li>
</ul> </ul>
{% elif form %} {% elif form %}
<form class="form-inline my-2" id="loginForm" method="POST" action="/" role="login"> <form class="form-inline" id="loginForm" method="POST" action="/" role="login">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" /> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div class="input-group mb-2 mr-sm-2"> <div class="input-group mb-2 mr-sm-2">
{{ form.username(placeholder="Username", class_="form-control mr-sm-1 my-auto") }} {{ form.password(placeholder="Password", {{ form.username(placeholder="Username", class_="form-control mr-sm-1 my-auto") }} {{ form.password(placeholder="Password",
class_="form-control mr-sm-1 my-auto") }} class_="form-control mr-sm-1 my-auto") }}
<button class="btn btn-light btn-primary m-auto" type="submit">submit</button> <button class="btn btn-light btn-primary m-auto" type="submit">Login</button>
</div> </div>
</form> </form>
<ul class="navbar-nav my-auto"> <ul class="navbar-nav my-auto">

Loading…
Cancel
Save