Initial work on re-themeing auth with Bootstrap CSS

This commit is contained in:
2011-10-27 14:25:25 +01:00
parent d5a291b520
commit 9a26bfd235
14 changed files with 427 additions and 247 deletions

View File

@@ -1,31 +1,64 @@
{% load installed %}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>TEST Auth</title>
<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" type="text/css" media="screen">
<link rel="stylesheet" href="{{ STATIC_URL }}bootstrap/bootstrap.css" type="text/css" media="screen">
<style type="text/css">
html {
background-color: #9FB190;
}
body {
background-color: #9FB190;
padding-top: 40px;
}
div.topbar div.fill {
background-color: #5F6757;
background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#5F6757));
background-image: -moz-linear-gradient(top, #333333, #5F6757);
background-image: -ms-linear-gradient(top, #333333, #5F6757);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #5F6757));
background-image: -webkit-linear-gradient(top, #333333, #5F6757);
background-image: -o-linear-gradient(top, #333333, #5F6757);
background-image: linear-gradient(top, #333333, #5F6757);
}
div.content {
background-color: white;
padding: 20px;
margin: 0 -20px;
-webkit-border-radius: 0 0 6px 6px;
-moz-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="{{ STATIC_URL }}bootstrap/js/bootstrap-dropdown.js"></script>
<script src="{{ STATIC_URL }}bootstrap/js/bootstrap-alerts.js"></script>
{% block HeadTag %}{% endblock %}
</head>
<body>
<div id="container">
<div id="header">
<!--<h1>TEST Auth - {% block title %}{% endblock %}</h1>-->
</div>
<div id="navigation">
<ul>
<div class="topbar">
<div class="fill">
<div class="container">
<a class="brand" href="/">TEST Auth</a>
<ul class="nav">
{% if request.user.is_authenticated %}
<li><a href="{% url sso.views.profile %}">Profile</a></li>
{% if "groups"|installed %}
<li><a href="{% url groups.views.group_list %}">Groups</a></li>
{% endif %}
{% if "api"|installed %}
<li><a href="{% url oauth-list-tokens %}">Application Access</a></li>
{% endif %}
<li class="dropdown" data-dropdown="dropdown"><a href="#" class="dropdown-toggle">{{ request.user.username}}</a>
<ul class="dropdown-menu">
<li><a href="{% url sso.views.profile %}">Your Profile</a></li>
{% if "groups"|installed %}<li><a href="{% url groups.views.group_list %}"> Your Groups</a></li>{% endif %}
<li><a href="{% url eve_api.views.eveapi_character %}">Your Characters</a></li>
<li class="divider"></li>
{% if "api"|installed %}<li><a href="{% url oauth-list-tokens %}">3rd Party App Access</a></li>{% endif %}
</ul>
</li>
{% if "hr"|installed %}
<li><a href="{% url hr-index %}">HR</a></li>
{% endif %}
<li><a href="{% url eve_api.views.eveapi_character %}">Characters</a></li>
{% if perms.sso.can_search_users %}
<li><a href="{% url sso.views.user_lookup %}">Lookup User</a></li>
{% endif %}
@@ -39,19 +72,26 @@
{% else %}
<li><a href="{% url django.contrib.auth.views.login %}">Login</a></li>
{% endif %}
</ul>
</div>
<div id="content">
{% if messages %}
<ul id="messagelist">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% block content %}{% endblock %}
</div>
</div>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="content">
{% if messages %}
{% for message in messages %}
<div class="alert-message fade in {{ message.tags }}" data-alert="alert">
<a class="close" href="#">x</a>
<p>{{ message }}</p>
</div>
{% endfor %}
{% endif %}
{% block content %}{% endblock %}
</div>
</div>
</body>
</html>

View File

@@ -3,20 +3,23 @@
{% block title %}OAuth Access Authorization{% endblock %}
{% block content %}
<div class="page-header">
<h1>Access Authorization</h1>
</div>
<h1>Access Authorization</h1>
<p>You have come here because you are in the process of allowing a external application to access your private Auth data. If you are not, then please close this window. Otherwise, please confirm below if you wish to give access to your private Auth data. This can be revoked at any time from the main Auth panel.</p>
<p>You have come here because you are in the process of allowing a external application to access your private Auth data. If you are not, then please close this window. Otherwise, please confirm below if you wish to give access to your private Auth data. This can be revoked at any time from the main Auth panel.</p>
<p><b>{{ consumer.name }}</b></p>
<p>{{ consumer.description }}</p>
<p><b>{{ consumer.name }}</b></p>
<p>{{ consumer.description }}</p>
<form action="{% url piston.authentication.oauth_user_auth %}" method="POST">
<table>
<form action="{% url piston.authentication.oauth_user_auth %}" method="POST">
<fieldset>
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
<button type="submit">Confirm</button>
</form>
</table>
{% csrf_token %}
<button type="submit">Confirm</button>
</fieldset>
</form>
{% endblock %}

View File

@@ -4,10 +4,12 @@
{% block content %}
<h1>Access Authorization</h1>
<div class="page-header">
<h1>Access Authorization</h1>
</div>
<p>Access is now enabled for the requesting application. It seems the application did not provide a way to give it the required information so you need to provide this to it. This has happened either due to it being a desktop application or not being configured properly.</p>
<p>Access is now enabled for the requesting application. It seems the application did not provide a way to give it the required information so you need to provide this to it. This has happened either due to it being a desktop application or not being configured properly.</p>
<p>Token/PIN: <b>{{ token.verifier }}</td></p>
<p>Token/PIN: <b>{{ token.verifier }}</td></p>
{% endblock %}

View File

@@ -1,7 +1,12 @@
{% extends "registration/registration_base.html" %}
{% block title %}{% if account %}Activation complete{% else %}Activation problem{% endif %}{% endblock %}
{% block content %}
{% if account %}
<div class="page-header">
<h1>Account Activation</h1>
</div>
<p>Thanks {{ account }}, activation complete! You may now <a href='{% url auth_login %}'>login</a> using the username and password you set at registration.</p>
{% else %}
<p>Oops &ndash; it seems that your activation key is invalid. Please check the url again.</p>

View File

@@ -3,25 +3,40 @@
{% block content %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
<div class="alert-message fade in error" data-alert="alert">
<a class="close" href="#">x</a>
<p>Your username or password was incorrect, please try again.</p>
</div>
{% endif %}
<form method="post" action="{% url django.contrib.auth.views.login %}">
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<p><a href="{% url auth_password_reset %}">Forgot</a> your password? <a href="{% url registration_register %}">Need an account</a>?</p>
<fieldset>
<legend>Login</legend>
<div class="clearfix">
{{ form.username.label_tag }}
<div class="input">
<td>{{ form.username }}</td>
</div>
</div>
<div class="clearfix">
{{ form.password.label_tag }}
<div class="input">
<td>{{ form.password }}</td>
</div>
</div>
<input type="submit" value="login" />
<input type="hidden" name="next" value="{{ next }}" />
{% csrf_token %}
<div class="row">
<div class="span10">
<a href="{% url auth_password_reset %}" class="btn">Forgotten Password</a>
<a href="{% url registration_register %}" class="btn success">Create Account</a>
</div>
<div class="span6">
<input type="submit" value="Login" class="btn primary pull-right"/>
</div>
</div>
<input type="hidden" name="next" value="{{ next }}" />
{% csrf_token %}
</fieldset>
</form>
{% endblock %}

View File

@@ -1,5 +1,8 @@
{% extends "registration/registration_base.html" %}
{% block title %}Logged out{% endblock %}
{% block HeadTag %}
<meta http-equiv="refresh" content="3; url=/">
{% endblock %}
{% block content %}
<p>Successfully logged out!</p>
{% endblock %}

View File

@@ -1,15 +1,22 @@
{% extends "registration/registration_base.html" %}
{% block title %}Register for an account{% endblock %}
{% block content %}
<h3>Registration</h3>
<div class="page-header">
<h1>Registration</h1>
</div>
<p>Please complete this form to register for a new Auth account, please be aware that you are required to confirm your email account so please use a valid address.</p>
<h3>Problematic Providers</h3>
<h2>Problematic Providers</h2>
<p>In addition, some providers maybe blocked form auth due to their draconian spam detection routines, which has flagged this server numerous times for no reason. These include AT&T services, Cox, and a few other mainland US ISPs. If you have a Google Mail account please consider using that instead of your ISP email account.</p>
<form method='post' action=''>
<table>
{{ form }}
</table>
{% csrf_token %}
<input type="submit" value="Send activation email" />
<table>
{{ form }}
</table>
{% csrf_token %}
<input type="submit" value="Send activation email" class="btn primary"/>
</form>
{% endblock %}