diff options
author | parth | 2012-04-02 12:37:53 +0530 |
---|---|---|
committer | parth | 2012-04-02 12:37:53 +0530 |
commit | facdb2e2005f2913ec2d959b976387472dfff100 (patch) | |
tree | 25ebe6dd3457bc898578b68d8d7829dbfc3f470c | |
parent | 8a8ab8bb9beda167f2484beea40312cabf73961a (diff) | |
download | aloha-facdb2e2005f2913ec2d959b976387472dfff100.tar.gz aloha-facdb2e2005f2913ec2d959b976387472dfff100.tar.bz2 aloha-facdb2e2005f2913ec2d959b976387472dfff100.zip |
hiding SEBC checkbox for all other categories except OBC
-rw-r--r-- | aloha/allotter/forms.py | 7 | ||||
-rw-r--r-- | aloha/template/allotter/details.html | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py index ef3184f..626698f 100644 --- a/aloha/allotter/forms.py +++ b/aloha/allotter/forms.py @@ -153,13 +153,10 @@ class UserDetailsForm(forms.Form): if email and phone_number: user_profile.secondary_email = email 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 - else: - raise forms.ValidationError("Make sure that you have entered all the details.") user_profile.save() - - diff --git a/aloha/template/allotter/details.html b/aloha/template/allotter/details.html index b71f0c1..4cfe1a2 100644 --- a/aloha/template/allotter/details.html +++ b/aloha/template/allotter/details.html @@ -1,7 +1,15 @@ {% 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"> |