summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrimal Pappachan2012-04-11 20:09:17 +0530
committerPrimal Pappachan2012-04-11 20:09:17 +0530
commite4fbbcbc9198d9a3501fd6e533da185798260f2d (patch)
treec53cbf8fc1987bf740f6200cf0a718bf759d18f2
parente15ecfed4de3e858ef52d0766c65ce60e266b98f (diff)
parent3169cee5cc638705bf9a3f65c1965e9da30c846f (diff)
downloadaloha-e4fbbcbc9198d9a3501fd6e533da185798260f2d.tar.gz
aloha-e4fbbcbc9198d9a3501fd6e533da185798260f2d.tar.bz2
aloha-e4fbbcbc9198d9a3501fd6e533da185798260f2d.zip
merged
-rw-r--r--aloha/allotter/forms.py26
-rw-r--r--aloha/allotter/management/commands/loadusers.py7
-rw-r--r--aloha/settings.py2
-rw-r--r--aloha/static/js/browser-check.js4
-rw-r--r--aloha/template/allotter/apply.html22
-rw-r--r--aloha/template/allotter/complete.html10
-rw-r--r--aloha/template/base.html4
-rw-r--r--aloha/template/browser-version.html1
8 files changed, 45 insertions, 31 deletions
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py
index c0837fe..3547f88 100644
--- a/aloha/allotter/forms.py
+++ b/aloha/allotter/forms.py
@@ -11,6 +11,7 @@ from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, Fieldset, HTML, ButtonHolder, Div
from string import digits, uppercase
+import settings
BIRTH_YEAR_CHOICES = tuple(range(1960, 1994, 1))
DD_YEAR_CHOICES = (2012,)
@@ -26,8 +27,8 @@ class UserLoginForm(forms.Form):
help_text="As on your Examination Admit Card")
##Application number as password
- password = forms.CharField(label = "Application Number",
- max_length=10, help_text="As on your Examination Admit Card")
+ #password = forms.CharField(label = "Application Number",
+ # max_length=10, help_text="As on your Examination Admit Card")
dob = forms.DateField(label="Date of Birth",
widget=SelectDateWidget(years=BIRTH_YEAR_CHOICES, attrs={"class":"span1"}),
@@ -64,22 +65,23 @@ class UserLoginForm(forms.Form):
except User.DoesNotExist:
raise forms.ValidationError("Entered Registration Number haven't appeared for JAM Exam.")
- def clean_password(self):
-
- pwd = self.cleaned_data['password']
-
+# def clean_password(self):
+#
+# pwd = self.cleaned_data['password']
+#
##Verifying the length of application number and whether it contains
##only digits.
- if str(pwd).strip(digits) and len(pwd) != 5:
- msg = "Not a valid Application Number"
- raise forms.ValidationError(msg)
-
- return pwd
+# if str(pwd).strip(digits) and len(pwd) != 5:
+# msg = "Not a valid Application Number"
+# raise forms.ValidationError(msg)
+#
+# return pwd
def clean(self):
super(UserLoginForm, self).clean()
- u_name, pwd = self.cleaned_data.get('username'), self.cleaned_data.get('password')
+ u_name = self.cleaned_data.get('username')
+ pwd = settings.DEFAULT_PASSWORD
dob = self.cleaned_data["dob"]
dd_no = self.cleaned_data.get("dd_no")
dd_date = self.cleaned_data.get("dd_date")
diff --git a/aloha/allotter/management/commands/loadusers.py b/aloha/allotter/management/commands/loadusers.py
index 99fd075..172aa95 100644
--- a/aloha/allotter/management/commands/loadusers.py
+++ b/aloha/allotter/management/commands/loadusers.py
@@ -3,6 +3,7 @@ from datetime import datetime
from csv import DictReader
from django.core.management.base import BaseCommand
from allotter.models import Exam, Application, User, Profile
+from settings import DEFAULT_PASSWORD
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
@@ -38,9 +39,8 @@ def load_users(options):
for data in userReader:
- appno = data['AppNo.']
regno = data['Reg.No.']
- new_user = User.objects.create_user(regno, password=appno, email="")
+ new_user = User.objects.create_user(regno, password=DEFAULT_PASSWORD, email="")
application = Application(user=new_user)
application.np = int(data['NP'])
if data['P1'].strip():
@@ -56,10 +56,9 @@ def load_users(options):
application.nat = data['Nat']
application.gender = data['Gdr']
application.cent = data['Cent']
- application.cgy = data['Cgy']
application.save()
dob = datetime.strptime(data['DOB'], "%d/%m/%y")
new_profile = Profile(user=new_user, application=application)
new_profile.dob = dob
new_profile.save()
- print "Added user with {0} and {1} with dob as {2}".format(appno,regno,dob) \ No newline at end of file
+ print "Added user with {0} with dob as {1}".format(regno,dob)
diff --git a/aloha/settings.py b/aloha/settings.py
index e75064b..8efb057 100644
--- a/aloha/settings.py
+++ b/aloha/settings.py
@@ -185,3 +185,5 @@ APPLICATION_PDF = "application.pdf"
AUTO_LOGOUT_DELAY = 15
+DEFAULT_PASSWORD = "JamPassword"
+
diff --git a/aloha/static/js/browser-check.js b/aloha/static/js/browser-check.js
index 17bda46..c0d7fc3 100644
--- a/aloha/static/js/browser-check.js
+++ b/aloha/static/js/browser-check.js
@@ -1,8 +1,8 @@
$(document).ready(function(){
- if(($.browser.msie) && ($.browser.version <8)){
+ if(($.browser.msie) && ($.browser.version <=6)){
window.location="/browser-version"
}
- if(($.browser.mozilla) && (parseInt($.browser.version) <=5)){
+ if(($.browser.mozilla) && (parseInt($.browser.version) <3)){
window.location="/browser-version"
}
if(($.browser.webkit) && (parseInt($.browser.version <=530))){
diff --git a/aloha/template/allotter/apply.html b/aloha/template/allotter/apply.html
index 39d1411..92771bd 100644
--- a/aloha/template/allotter/apply.html
+++ b/aloha/template/allotter/apply.html
@@ -53,7 +53,7 @@ $(document).ready(function(){
<hr/>
-<h4>You are eligible for programmes on the basis of <b>{{first_paper}} ({{first_paper_code}}) </b>
+<h3>You are eligible for programmes on the basis of <b>{{first_paper}} ({{first_paper_code}}) </b>
{% comment %}
Checking if there is second paper and displaying its name.
@@ -65,7 +65,7 @@ and <b>{{second_paper}} ({{second_paper_code}})</b>
{% endif %}
-</h4>
+</h3>
<br/>
@@ -78,19 +78,21 @@ that you are NOT interested in. </p>
<p><b>Please note:</b> The order of Preference plays an important role in
the admission process.</p>
-<p>
-<b>Note: </b>If you have qualified in two papers in JAM 2012 and would like to choose programmes eligible
+<div class="alert alert-info">
+<h3 class="alert-heading">Note</h3>
+<b>If you have qualified in two papers in JAM 2012 and would like to choose programmes eligible
under both the papers, the order of preferences should be combined. For example: a candidate
qualifying both BT and CY can have an order of preference such as 1 under BT, 2 under CY, 3
-under BT and so on.
-</p>
+under BT and so on.</b>
+</div>
-<p>
+<div class="alert alert-info">
+<h3 class="alert-heading">Warning!</h3>
<b>Candidates should ensure that the choices specified by them
are distinct for each programme of their interest and are in the
ascending order of their preference - i.e. their most preferred
programme is selected as 1, etc.</b>
-</p>
+</div>
@@ -124,7 +126,7 @@ Listing the options for first test paper.
<td><p> {{option.opt_location }} </p></td>
<td><select class="{{option.opt_code}}" name="{{option.opt_code}}">
{% for i in options_range %}
- <option value="{{i}}" selected="selected">Preference {{i}}</option>
+ <option value="{{i}}" >Preference {{i}}</option>
{% endfor %}
<option value="0" selected="selected">None</option>
</select>
@@ -154,7 +156,7 @@ Listing the options for first test paper.
<td><p> {{option.opt_location }} </p></td>
<td><select class="{{option.opt_code}}" name="{{option.opt_code}}">
{% for i in options_range %}
- <option value="{{i}}" selected="selected">Preference {{i}}</option>
+ <option value="{{i}}">Preference {{i}}</option>
{% endfor %}
<option value="0" selected="selected">None</option>
</select>
diff --git a/aloha/template/allotter/complete.html b/aloha/template/allotter/complete.html
index 49adf29..2df9544 100644
--- a/aloha/template/allotter/complete.html
+++ b/aloha/template/allotter/complete.html
@@ -59,16 +59,24 @@ options otherwise click <b>Quit Allotment</b> to exit the allotment process </h4
<br/>
<br/>
+
{% if not quit_status %}
+
+<hr />
+
<p>You may edit your options by clicking <b>Edit Options</b>. <i>Please keep in mind that your previous options
will be deleted.</i></p>
<form id="apply" action="/allotter/apply/" method="post">
{% csrf_token %}
<input type="submit" name="apply" value="Edit Options" class="btn" />
</form>
+
{% endif %}
+
+<hr />
+
<p>Click on the button <b>Download Application PDF</b> to download
a PDF of the application form. <br/> <br/>
Candidates are advised
@@ -90,7 +98,7 @@ your completed application form to the "Organizing chairman, GATE-JAM 2012, IIT
<form id="logout" action="/allotter/logout/" method="post">
{% csrf_token %}
-<div class="alert">
+<div class="alert alert-error">
<p><input type="checkbox" name="check" id="check"/><label for="check">I have downloaded 2 PDF's that together consitute my application.</label>
</p>
diff --git a/aloha/template/base.html b/aloha/template/base.html
index d5b5bb6..11bf078 100644
--- a/aloha/template/base.html
+++ b/aloha/template/base.html
@@ -78,10 +78,10 @@
<div id="sidebar">
<div class="well sidebar-nav">
<ul class="nav nav-list">
- <li class="nav-header">Notices</li>
+ <li class="nav-header"><h2>Notes</h2></li>
<li><hr></li>
<li><span class="label label-important pull-right">Important</span></li>
- <li>Supported Browsers : <br />Google chrome >= 12<br /> Mozilla Firefox >= 5<br /> Microsoft Internet Explorer >= 9 <br />Opera >=11.0</li>
+ <li>Supported Browsers : <br />Google chrome &ge; 12<br /> Mozilla Firefox &ge; 3<br /> Microsoft Internet Explorer &ge; 7<br />Opera &ge; 11.0</li>
<li><hr></li>
<li><span class="label label-info pull-right">Info</span></li>
<li>JAM 2012 allotment online form filling starts from : 12-4-2012.</li>
diff --git a/aloha/template/browser-version.html b/aloha/template/browser-version.html
index e74cf39..2f6b8e4 100644
--- a/aloha/template/browser-version.html
+++ b/aloha/template/browser-version.html
@@ -8,6 +8,7 @@
<hr />
<h2>We have detected that you are using an outdated browser.</h2>
<p>JAM 2012 allotment website would not work on your browser. Please update your browser or install one of the browsers mentioned below.</p>
+<p>If you are an Internet Explorer user please see that <b>Compatibility View</b> has been turned <b>Off</b>. Click <a href="http://www.sevenforums.com/tutorials/1196-internet-explorer-compatibility-view-turn-off.html">here</a> to know how</p>
<hr />
<table>