login: use base view

This commit is contained in:
Élie Bouttier 2014-08-13 18:53:18 -07:00
parent 38dcbe7874
commit 8e8e8243fd

View file

@ -1,45 +1,30 @@
{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
{% extends 'base.html' %}
<title>Issue Tracker - Signin</title>
{% load bootstrap_tags %}
<!-- Bootstrap core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
{% block content %}
<!-- Custom styles for this template -->
<link href="{% static 'css/signin.css' %}" rel="stylesheet">
<div class="panel panel-default">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<div class="panel-heading">
<h1>
Login
<div class="pull-right">
<a href="{% url 'list-project' %}"><button class="btn btn-warning">Cancel</button></a>
</div>
</h1>
</div>
<body>
<div class="container">
<form class="form-signin" role="form" method="post" action="{% url 'login' %}">
<h2 class="form-signin-heading">Please sign in</h2>
<div class="panel-body">
<div class="col-md-offset-4 col-md-4">
<form action="" method="post" role="form">
{{ form|as_bootstrap }}
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
<input name="username" type="text" class="form-control" placeholder="Usename" required autofocus>
<input name="password" type="password" class="form-control" placeholder="Password" required>
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div> <!-- /container -->
</body>
</html>
</div>
{% endblock %}