forked from bansalrajnikant/djime
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now can't signup or access site without being
logged in, like in the pinax intranet project.
- Loading branch information
1 parent
00437c5
commit e32c8fe
Showing
4 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<html> | ||
<head> | ||
<title>Pinax</title> | ||
<style> | ||
body { | ||
background-color: #444; | ||
margin: 0; | ||
} | ||
body { | ||
color: #333; | ||
font-family: "Helvetica Neue", Arial, sans-serif; | ||
font-size: 10pt; | ||
} | ||
a, a:visited { | ||
color: #13C; | ||
} | ||
img { | ||
border: 0; | ||
} | ||
.main { | ||
margin-top: 80px; | ||
} | ||
.header { | ||
width: 350px; | ||
background: #035 url('{{ STATIC_URL }}pinax/images/heading.png') left top repeat-x; | ||
margin: 0 auto; | ||
padding: 0 20px; | ||
border: 1px solid #000; | ||
} | ||
.logo { | ||
width: 190px; | ||
margin: 0 auto; | ||
} | ||
.box { | ||
width: 350px; | ||
margin: 0 auto; | ||
background: #DEF; | ||
padding: 5px 20px; | ||
border-left: 1px solid #000; | ||
border-right: 1px solid #000; | ||
border-bottom: 1px solid #000; | ||
} | ||
td { | ||
color: #333; | ||
font-size: 11pt; | ||
} | ||
a { | ||
color: #333; | ||
} | ||
a:hover { | ||
color: #666; | ||
} | ||
input[type="text"], input[type="password"], textarea { | ||
padding: 3px; | ||
margin: 3px; | ||
border: solid 1px #C6C6C6; | ||
border-bottom: solid 1px #E3E3E3; | ||
color: #666; | ||
font-size: 12pt; | ||
background: #F3F3F3 url('{{ STATIC_URL }}pinax/images/form-shadow.png') left top repeat-x; | ||
} | ||
input[type="submit"] { | ||
|
||
background-color: #9BC; | ||
padding: 5px 12px; | ||
border: 1px solid #666; | ||
font-family: "Helvetica Neue", Arial, sans-serif; | ||
font-size: 11pt; | ||
color: #000; | ||
} | ||
.warning { | ||
color: #C00; | ||
} | ||
ul.errorlist { | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
color: #C00; | ||
} | ||
{% if openid_login %} | ||
#userpass { | ||
display: none; | ||
} | ||
{% else %} | ||
#openid { | ||
display: none; | ||
} | ||
{% endif %} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="main"> | ||
<div class="header"> | ||
<div class="logo"><img src="{{ STATIC_URL }}pinax/images/logo.png" alt="Pinax" /></div> | ||
</div> | ||
|
||
{% include "account/userpass_login.html" %} | ||
|
||
{% include "account/openid_login.html" %} | ||
|
||
</div> | ||
<script src="{{ STATIC_URL }}pinax/js/jquery-1.3.2.min.js" type="text/javascript"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
$("#id_username").focus(); | ||
$("#openid_switch").click(function() { | ||
$("#userpass").hide(); | ||
$("#openid").show(); | ||
return false; | ||
}); | ||
$("#normal_switch").click(function() { | ||
$("#openid").hide(); | ||
$("#userpass").show(); | ||
return false; | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div id="openid" class="box"> | ||
<form class="login" method="POST" action="/openid/register/"> | ||
<table> | ||
<tr><td colspan="2">{{ form.non_field_errors }}</td></tr> | ||
<tr> | ||
<td><label for="id_username"><img src="{{ STATIC_URL }}images/openid-icon.png" /> OpenID Identifier</label></td> | ||
<td><input class="openid" type="text" name="openid_url" /></td> | ||
</tr> | ||
<tr><td></td><td><input type="submit" value="Log in »" /></td></tr> | ||
<tr><td></td><td><a href="{% url acct_login %}" id="normal_switch">Switch to normal login</a></td></tr> | ||
</table> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div id="userpass" class="box"> | ||
{% if user.is_authenticated %} | ||
<p><span class="warning">NOTE:</span> you are already logged in as {{ user }}.</p> | ||
{% endif %} | ||
<form class="login" method="POST" action="{% url acct_login %}"> | ||
<table> | ||
<tr><td colspan="2">{{ form.non_field_errors }}</td></tr> | ||
{% for field in form %} | ||
{% if field.errors %}<tr><td colspan="2">{{ field.errors }}</td></tr>{% endif %} | ||
<tr><td width="100px">{{ field.label_tag }}</td><td>{{ field }}</td></tr> | ||
{% endfor %} | ||
<tr><td></td><td><input type="submit" value="Log in »" /></td></tr> | ||
<tr><td></td><td><a href="{% url acct_passwd_reset %}">Forgot password?</a></td></tr> | ||
<tr><td></td><td><img src="{{ STATIC_URL }}images/openid-icon.png" /> <a href="/openid/register/" id="openid_switch">Switch to OpenID login</a></td></tr> | ||
</table> | ||
</form> | ||
</div> |