summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparth2012-04-11 13:49:45 +0530
committerparth2012-04-11 13:49:45 +0530
commit61bceffde19f74668ada89cc04616e76e7ec40f1 (patch)
treecf37395f29fdb781194891313746e5b9d6f2ad87
parentc568b73aa5031df83eeb98cb784d6c3dee4fc8c0 (diff)
parent960922adf99d855c7eba0013ad4420d8d5f61502 (diff)
downloadaloha-61bceffde19f74668ada89cc04616e76e7ec40f1.tar.gz
aloha-61bceffde19f74668ada89cc04616e76e7ec40f1.tar.bz2
aloha-61bceffde19f74668ada89cc04616e76e7ec40f1.zip
Merge http://github.com/FOSSEE/aloha
-rw-r--r--aloha/allotter/forms.py30
-rw-r--r--aloha/allotter/models.py8
-rw-r--r--aloha/allotter/views.py7
-rw-r--r--aloha/template/allotter/apply.html11
-rw-r--r--aloha/template/allotter/complete.html23
-rw-r--r--aloha/template/allotter/details.html9
6 files changed, 55 insertions, 33 deletions
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py
index 3c4cb5c..5639325 100644
--- a/aloha/allotter/forms.py
+++ b/aloha/allotter/forms.py
@@ -1,6 +1,7 @@
from django import forms
from allotter.models import Profile
from django.forms.extras.widgets import SelectDateWidget
+from django.forms.widgets import RadioSelect
from django.utils.encoding import *
@@ -14,6 +15,9 @@ import settings
BIRTH_YEAR_CHOICES = tuple(range(1960, 1994, 1))
DD_YEAR_CHOICES = (2012,)
+CATEGORY_CHOICES = [('GEN','General'), ('OBC-NCL', 'OBC-NCL'), ('OBC-NCL-M', 'OBC-NCL(Minorities)'),
+ ('SC', 'SC'), ('ST', 'ST')]
+PD_CHOICES = [('Y', 'Yes'), ('N', 'No')]
class UserLoginForm(forms.Form):
@@ -133,9 +137,18 @@ class UserDetailsForm(forms.Form):
email = forms.EmailField(label="Email Address", widget=forms.TextInput(attrs={"placeholder":"john@example.com",}),
help_text="Enter a valid email id where you will able to receive correspondence from JAM 2012.")
- phone_number = forms.CharField(label="Phone number", max_length=15, widget=forms.TextInput(attrs={"placeholder":"9876543210",}), help_text="Phone number with code. For example 02225722545 (with neither spaces nor dashes)")
- cat_check = forms.BooleanField(required=False, initial=False, label="Check this if you belong to SEBC-M Category")
+ phone_number = forms.CharField(label="Phone number", max_length=15,
+ widget=forms.TextInput(attrs={"placeholder":"9876543210",}),
+ help_text="Phone number with code. For example 02225722545 (with neither spaces nor dashes)")
+
+ category = forms.ChoiceField(widget=forms.Select(attrs={'class':'selector'}),
+ label="Category", choices=CATEGORY_CHOICES,
+ help_text="The category you select is normally the one you have specified at the time of applying for the JAM 2012 examination. The category verification is only after submitting the relevantdocuments and scrutiny by the JAM 2012 committee and the institute for which you are applying. Candidates applying under the new category OBC-M should have specified OBC at the time of applying for the JAM 2012 and would now have to supply the additional relevant documents for this category.")
+
+ pd = forms.ChoiceField(label="Physical Disability", widget=RadioSelect, choices=PD_CHOICES)
+
+
def clean_phone_number(self):
pno = self.cleaned_data['phone_number']
@@ -149,15 +162,18 @@ class UserDetailsForm(forms.Form):
email = self.cleaned_data['email']
phone_number = self.cleaned_data['phone_number']
- cat_check = self.cleaned_data['cat_check']
+ category = self.cleaned_data['category']
+ pd_status = self.cleaned_data['pd']
if email and phone_number:
user_profile.secondary_email = email
- user_profile.phone_number = phone_number
+ user_profile.phone_number = phone_number
else:
raise forms.ValidationError("Make sure that you have entered all the details.")
- if cat_check:
- user_profile.cat_status = True
-
+
+ user_application = user_profile.application
+ user_application.cgy = category
+ user_application.pd_status = pd_status
+ user_application.save()
user_profile.save()
diff --git a/aloha/allotter/models.py b/aloha/allotter/models.py
index 3be370f..4d3ac3e 100644
--- a/aloha/allotter/models.py
+++ b/aloha/allotter/models.py
@@ -102,7 +102,9 @@ class Application(models.Model):
cent = models.IntegerField(max_length=10, verbose_name="Center Code")
cgy = models.CharField(max_length=10, verbose_name="Category")
-
+
+ pd_status = models.CharField(max_length=1, verbose_name="Physical Disability",
+ help_text="Y for Yes, N for No", blank=True, default="N")
submitted = models.BooleanField(verbose_name="Submission Status", default=False)
@@ -125,9 +127,7 @@ class Profile(models.Model):
help_text=u"Phone number read from user after authentication")
dd_no = models.CharField(max_length=15, verbose_name="Demand Draft Number", blank=True, null=True)
-
- cat_status = models.BooleanField(help_text="Whether belongs to Category SBOBC", default=False)
-
+
#Application for the Profile
application = models.ForeignKey(Application)
diff --git a/aloha/allotter/views.py b/aloha/allotter/views.py
index a91b5e5..344669f 100644
--- a/aloha/allotter/views.py
+++ b/aloha/allotter/views.py
@@ -61,10 +61,7 @@ def submit_details(request):
Get the secondary email address, phone number and save it to the Profile.
"""
user = request.user
- category = user.get_profile().application.cgy #Getting the Category information
- #Flag set based on OBC Check
- if category == "B": cat_flag = True
- else: cat_flag = False
+
if request.method == "POST":
form = UserDetailsForm(user, request.POST)
if form.is_valid():
@@ -76,7 +73,7 @@ def submit_details(request):
else:
form = UserDetailsForm(request.user)
- context = {"form": form, "cat_flag": cat_flag}
+ context = {"form": form}
return render(request, 'allotter/details.html', context)
def get_details(user, error_message = ""):
diff --git a/aloha/template/allotter/apply.html b/aloha/template/allotter/apply.html
index c204c50..39d1411 100644
--- a/aloha/template/allotter/apply.html
+++ b/aloha/template/allotter/apply.html
@@ -73,7 +73,9 @@ and <b>{{second_paper}} ({{second_paper_code}})</b>
qualified in JAM 2012. If you have qualified in more than one paper you are eligible
for programmes covered by both papers. Mention the order of preference (1, 2, 3, etc)
in the last column. In the 'Order of Preference' column, mark <b>None</b> against the programmes
-that you are NOT interested in. <br/> <b>Please note:</b> The order of Preference plays an important role in
+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>
@@ -82,6 +84,13 @@ under both the papers, the order of preferences should be combined. For example:
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>
+
+<p>
+<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>
diff --git a/aloha/template/allotter/complete.html b/aloha/template/allotter/complete.html
index 19aa102..fc205a7 100644
--- a/aloha/template/allotter/complete.html
+++ b/aloha/template/allotter/complete.html
@@ -17,9 +17,10 @@ $(document).ready(function(){
{% block content %}
-<h2> The following options have been saved. Please verify them before logging out.</h2>
-
-<h3> Please keep in mind that, the next time you login you will be redirected to this page straightaway.</h3>
+<h3>Please ensure that the choices listed below are those that you
+intend to submit finally and only then go ahead to the rest of the
+procedure. If there is an error, please use the edit button to go back
+and re-do your choices</h3>
{% if options_chosen %}
<table class="table table-bordered table-striped">
@@ -50,8 +51,8 @@ An email with the list of options has been sent to {{ email }} for reference.
{% else %}
-<h3> No Options were chosen, click <b>Edit Options</b> to go back and select
-options otherwise click <b>Quit Allotment</b> to exit the allotment process </h3>
+<p><h4> No Options were chosen, click <b>Edit Options</b> to go back and select
+options otherwise click <b>Quit Allotment</b> to exit the allotment process </h4></p>
{% endif %}
@@ -64,7 +65,12 @@ will be deleted.</i></p>
<input type="submit" name="apply" value="Edit Options" class="btn" />
</form>
-<p>Click on the button <b>Download Application PDF</b> to download a PDF of the application form.</p>
+<p>Click on the button <b>Download Application PDF</b> to download
+a PDF of the application form. <br/> <br/>
+Candidates are advised
+to read the JAM 2012 brochure and JAM 2012 website carefully
+regarding Minimum Educational Qualification and Aggregate Marks
+requirements and other details before sending in their application</p>
<a href="http://www.iitb.ac.in/~pge/2k12/jam/adm_form.pdf" class="btn" >Download Application PDF</a>
@@ -84,7 +90,10 @@ your completed application form to the Organizing chairman </p>
<p><input type="checkbox" name="check" id="check"/><label for="check">I have downloaded 2 PDF's that together consitute my application.</label>
</p>
-<input type="submit" name="logout" value="Log out" class="btn" id="checkButton" disabled="disabled" />
+<input type="submit" name="logout" value="Quit Admission Application" class="btn" id="checkButton" disabled="disabled" />
+<p>This will finish the application procedure and the choices
+you have given will be taken as final after that.</p>
+
</div>
</form>
diff --git a/aloha/template/allotter/details.html b/aloha/template/allotter/details.html
index 4cfe1a2..bedcf90 100644
--- a/aloha/template/allotter/details.html
+++ b/aloha/template/allotter/details.html
@@ -1,15 +1,6 @@
{% extends "base.html" %}
{% block title %}Details form {% endblock %}
-{% block scripts %}
-<script>
-$(document).ready(function(){
- if("{{ cat_flag}}" =="False"){
- $("#div_id_cat_check").hide()
- }
-});
-</script>
-{% endblock scripts %}
{% block content %}
<h2>Please provide the following details.</h2>
<div class="alert alert-block">