Create Account
authorMadhusudan.C.S <madhusudancs@gmail.com>
Thu, 06 Aug 2009 22:36:36 +0530
changeset 9 38727da8a948
parent 8 294ff7ac9cb6
child 10 393d0030945b
Create Account
app/projrev/views/login.py
app/site-content/css/login.css
app/templates/projrev/auth/create_account.html
app/templates/projrev/auth/forgot_password.html
app/templates/projrev/auth/login.html
app/templates/projrev/base.html
--- a/app/projrev/views/login.py	Thu Aug 06 20:20:36 2009 +0530
+++ b/app/projrev/views/login.py	Thu Aug 06 22:36:36 2009 +0530
@@ -78,11 +78,14 @@
   """Resend the password if forgotten.
   """
 
+  template = 'projrev/auth/forgot_password.html'
   if request.POST:
-    pass
+    context = {
+        'password_sent': True,
+        }
   else:
     context = {}
-    template = 'projrev/auth/forgot_password.html'
+    
 
   return render_to_response(template, context)
 
--- a/app/site-content/css/login.css	Thu Aug 06 20:20:36 2009 +0530
+++ b/app/site-content/css/login.css	Thu Aug 06 22:36:36 2009 +0530
@@ -9,9 +9,9 @@
 
 fieldset			{ border: 0; }
 
-label				{ width: 115px; text-align: right; float: left; margin: 0 10px 0 0; padding: 9px 0 0 0; font-size: 16px; }
+label				{ width: 115px; text-align: right; float: left; margin: 0 10px 0 0; padding: 9px 0 0 0; font-size: 14px; }
 
-input				{ width: 220px; display: block; padding: 4px; margin: 0 0 10px 0; font-size: 18px;
+input				{ width: 220px; display: block; padding: 4px; margin: 0 0 10px 0; font-size: 14px;
 					  color: #3a3a3a; font-family: Georgia, serif;}
 input[type=checkbox]{ width: 20px; margin: 0; display: inline-block; }
 					  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/templates/projrev/auth/create_account.html	Thu Aug 06 22:36:36 2009 +0530
@@ -0,0 +1,50 @@
+{% extends "projrev/base.html" %}
+
+{% block stylesheets %}
+<link rel="stylesheet" href="/site-content/css/login.css" type="text/css"/>
+<link type="text/css" rel="stylesheet" href="/site-content/css/colorbox.css" />
+{% endblock stylesheets %}
+
+{% block scripts %}
+{{ block.super }}
+{% if exits or password_err %}
+<script type="text/javascript">
+  $(document).ready(function () {
+    $("#inline").colorbox({width:"50%", inline:true, open: true, href:"#message", title:"hello"});
+  });
+</script>
+{% endif %}
+{% endblock scripts %}
+
+{% block body %}
+  <form id="login-form" action="#" method="POST">
+    <fieldset>
+    
+      <legend>Log in</legend>
+      <label for="login">Email</label>
+      <input type="text" id="login" name="username"/>
+      <div class="clear"></div>
+      
+      <label for="password">Password</label>
+      <input type="password" id="password" name="password"/>
+      <div class="clear"></div>
+
+      <label for="confirmpassword">Password</label>
+      <input type="password" id="confirmpassword" name="confirmpassword"/>
+      <div class="clear"></div>
+      <br />
+      <input type="submit" style="margin: -20px 0 0 287px;" class="button" name="Create" value="Create"/> 
+    </fieldset>
+  </form>
+  <div class='hidden' style="display: none;">
+    <p><a id="inline" href="#"></a></p>
+    <div id='message' style='padding:10px; background:#fff;'>
+      {% if exits %}
+      The Email ID already exists. Please close this box and enter another ID.<br/>
+      {% endif %}
+      {% if password_err %}
+      The passwords did not match. Please close the box and enter email ID and correct passwords again.<br/>
+      {% endif %}
+    </div>
+  </div>
+{% endblock body %}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/templates/projrev/auth/forgot_password.html	Thu Aug 06 22:36:36 2009 +0530
@@ -0,0 +1,21 @@
+{% extends "projrev/base.html" %}
+{% block stylesheets %}
+<link rel="stylesheet" href="/site-content/css/login.css" type="text/css"/>
+{% endblock stylesheets %}
+{% block body %}
+  <form id="login-form" action="#" method="POST">
+    <fieldset>
+    
+      <legend>Log in</legend>
+      {% if password_sent %}
+      The password has been mailed to your Email ID.<br/>
+      {% else %}
+      <label for="login">Email</label>
+      <input type="text" id="login" name="username"/>
+      <div class="clear"></div>
+      <br />
+      <input type="submit" style="margin: -20px 0 0 287px;" class="button" name="commit" value="Submit"/>
+      {% endif %} 
+    </fieldset>
+  </form>
+{% endblock body %}
\ No newline at end of file
--- a/app/templates/projrev/auth/login.html	Thu Aug 06 20:20:36 2009 +0530
+++ b/app/templates/projrev/auth/login.html	Thu Aug 06 22:36:36 2009 +0530
@@ -7,7 +7,11 @@
     <fieldset>
     
       <legend>Log in</legend>
-      
+      {% if error %}
+      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+      Wrong Email or password.<br/>
+      {% endif %}
       <label for="login">Email</label>
       <input type="text" id="login" name="username"/>
       <div class="clear"></div>
--- a/app/templates/projrev/base.html	Thu Aug 06 20:20:36 2009 +0530
+++ b/app/templates/projrev/base.html	Thu Aug 06 22:36:36 2009 +0530
@@ -11,12 +11,15 @@
 
 {% block stylesheets %} 
 <link rel="stylesheet" href="/site-content/css/projrev.css" type="text/css"/>
+<link type="text/css" rel="stylesheet" href="/site-content/css/colorbox.css" />
 {% endblock stylesheets %}
 
 {% block scripts %}
   <script type="text/javascript" 
   src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
   </script>
+  <script type="text/javascript" src="/site-content/js/jquery.colorbox-min.js">
+  </script>
 {% endblock scripts %}
 <title>National Mission on Education through ICT</title>