Skip to content
This repository has been archived by the owner on Sep 13, 2018. It is now read-only.

Commit

Permalink
pull in mediathread login form as-is
Browse files Browse the repository at this point in the history
  • Loading branch information
thraxil committed Oct 24, 2013
1 parent 5a17bde commit 2c768c7
Show file tree
Hide file tree
Showing 2 changed files with 197 additions and 23 deletions.
79 changes: 56 additions & 23 deletions ccnmtldjango/template/+package+/templates/registration/login.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,62 @@
{% extends "base.html" %}
{% load bootstrap %}
{% block content %}

<h2>Choose a Login Option...</h2>

<form method="get" action="{{ wind_base }}login" class="form well">
<input type="hidden" name="service" value="{{ wind_service }}" />
<input type="hidden" name="destination" value="http{% if request.is_secure %}s{% endif %}://{{ request.get_host }}/accounts/windlogin/?next={{ next }}" />
<p>If you have a Columbia University Network ID (UNI)... </p>
<input type="submit" value="LOG IN" class="btn btn-primary"/></p>
</form>

<form method="post" action="." class="form well">
<p>If you have a project account...</p>
{% block title %}
Please Login
{% endblock %}

<label for="id_username">{{ form.username|bootstrap }}</label>
<label for="id_password">{{ form.password|bootstrap }}</label>
{% block usernav %}{% endblock %}

<input type="submit" value="LOG IN" class="btn btn-primary" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
{% block content %}

<p>Otherwise, you may <a href="/registration/register/"
class="btn btn-large btn-info add-box-shadow" id="signup">Sign up</a> for an account.</p>
<div class="loginbox-container columbia">
<div class="loginbox">
<h2>Choose a login option...</h2>
<div class="content">
{% if wind_base %}
<form method="get" action="{{ wind_base }}login">
{% csrf_token %}
<input type="hidden" name="service" value="{{ wind_service }}" />
<input type="hidden" name="destination" value="http://{{ request.get_host }}/accounts/windlogin/?next={{ next|urlencode }}" />
<p>If you have a Columbia University Network ID (UNI)...</p>
<input class="regbutton" type="submit" value="Columbia Log In" />
</form>
{% endif %}

<p class="smalltxt"><a href="http://cuit.columbia.edu/cuit/manage-my-uni" title="Learn more about UNI" target="_blank">What is a UNI?</a></p>
<!-- End UNI LOG IN -->

<hr class="seperator" />

{% if form.errors %}
<p class="errornote">
<span>
<b>ERROR:</b> Invalid username or password.
</span>
Please try again. Note that both username and password are case-sensitive.
</p>
{% endif %}

<p>If you have a guest account...</p>
<form id="login-local" name="login_local" method="post" action=".">
{% csrf_token %}
<div class="login-local-form" {% if not form.errors %}style="display: none"{% endif %}>
<div class="fieldwrapper">
<label for="id_username">Username:</label>
{{ form.username }}
</div><!-- fieldwrapper -->

<div class="fieldwrapper">
<label for="id_password">Password:</label>
{{ form.password }}
</div><!-- fieldwrapper -->
</div>
<input class="regbutton" type="button" value="Guest Log In" {% if form.errors %}style="display: none"{% endif %}
onclick="jQuery('.login-local-form').show(); jQuery(this).hide(); return false;"/>
<input class="regbutton login-local-form" type="submit" value="Log In" {% if not form.errors %}style="display: none;"{% endif %} />
<input type="hidden" name="next" value="{{ next|urlencode }}" />
</form>
<p class="smalltxt"><a href="/registration/register/" title="Create your new project account">Need a new account?</a></p>
</div>
</div>
</div>

{% endblock %}


141 changes: 141 additions & 0 deletions ccnmtldjango/template/media/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,144 @@ body > .container {
#content {
min-height: 100%;
}

/* LOGIN PAGE */
.login-description {
margin: 30px 30px 15px 30px;
text-align: center;
width: 100%;
}

.login-description h2 {
line-height: 1.3em;
display: block;
}

.loginbox-container {
float: right;
height: 265px;
margin-top: 10px;
}

.loginbox-container.columbia {
height: 300px;
}
.loginbox
{
display: block;
width: 300px;
margin: 0 30px 0 20px;
padding: 0;
border: 1px solid #999;
background-color: #fff;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
font-size: 12px;
}
.loginbox h2
{
margin: 0 !important;
padding: 5px 10px !important;
-moz-border-radius: 10px 10px 0 0;
-webkit-border-radius: 10px 10px 0 0;
background: #e0e0e0;
font-weight: bold !important;
font-size: 14px !important;
color: black;
}
.loginbox .content
{
margin: 0;
padding: 10px 10px 0 10px;
border: 0;
}

.loginbox .seperator
{
margin: 20px 0;
padding: 0;
border: 0;
border-top: 1px dotted #999;
background-color: #fff;
}

.loginbox .fieldwrapper
{
margin: 0 0 10px 10px;
padding: 0;
border: 0;
}
.loginbox .fieldwrapper label
{
display: block;
font-weight: bold;
color: #666;
font-size: 12px;
}

.loginbox .fieldwrapper input {
width: 250px;
margin: 2px 0;
padding: 3px;
border: 0;
border: 1px solid #ccc;
background-color: #f4f4f4;
font: bold 12px arial, helvetica, verdana, sans-serif;
}

.loginbox .fieldwrapper input:focus
{
border: 1px solid #06f;
background-color: #fff;
}

.loginbox .regbutton
{
cursor: pointer;
padding: 4px 17px;
margin: 0 0 10px 10px;
color: #000;
font-weight: normal;
font-size: 14px;
border: 1px solid #ccc;
border-bottom: 1px solid #ccc;
border-left-color: #ccc;
border-right-color: #ccc;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
text-align: center;
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e6e6e6));
background: -moz-linear-gradient(top, #fff, #e6e6e6);
font: bold 14px arial, helvetica, verdana, sans-serif !important;
text-transform: uppercase;
}
.loginbox .regbutton:hover
{
border: 1px solid #999;
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ddd));
background: -moz-linear-gradient(top, #fff, #ddd);
}
.loginbox .regbutton:active
{
border: 1px solid #006666;
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#669999));
background: -moz-linear-gradient(top, #fff, #669999);
}

.loginbox .smalltxt
{
font-size: 11px;
}

.errornote {
background: url("/site_media/img/icon_alert.png") no-repeat 5px 5px #FFEBE8;
border: 1px solid #c00 !important;
display: block;
font-size: 11px !important;
margin: 0 0 10px 0;
padding: 5px 5px 5px 10px !important;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
line-height: 140%;
}

0 comments on commit 2c768c7

Please sign in to comment.