summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParth Buch2012-04-02 16:02:06 +0530
committerroot2012-04-02 16:02:35 +0530
commiteaec4970544064a94a26e6a1137908004ccfcc58 (patch)
tree3982776b687c2d09ed656f0fd377a693f52e5a44
parentcfb3eb2459f30febb67c4ce677a7f55610fef425 (diff)
downloadaloha-eaec4970544064a94a26e6a1137908004ccfcc58.tar.gz
aloha-eaec4970544064a94a26e6a1137908004ccfcc58.tar.bz2
aloha-eaec4970544064a94a26e6a1137908004ccfcc58.zip
commit from dwaita
-rw-r--r--aloha/allotter/forms.py6
-rw-r--r--aloha/allotter/views.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py
index cfaa031..cd79b0e 100644
--- a/aloha/allotter/forms.py
+++ b/aloha/allotter/forms.py
@@ -125,15 +125,15 @@ class UserDetailsForm(forms.Form):
self.helper.form_id = 'id-detailsform'
self.helper.form_method = 'post'
self.helper.form_class = 'form-horizontal'
- self.helper.form_action = "/allotter/"+user.username+"/details/"
+ self.helper.form_action = "/allotter/details/"
self.helper.add_input(Submit('submit', 'Submit'))
super(UserDetailsForm, self).__init__(*args, **kwargs)
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")
+ 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 Category")
+ cat_check = forms.BooleanField(required=False, initial=False, label="Check this if you belong to SEBC-M Category")
def clean_phone_number(self):
pno = self.cleaned_data['phone_number']
diff --git a/aloha/allotter/views.py b/aloha/allotter/views.py
index 310d0b4..4ebf7dd 100644
--- a/aloha/allotter/views.py
+++ b/aloha/allotter/views.py
@@ -34,8 +34,8 @@ def user_login(request):
status = user.get_profile().application.submitted #Getting the submission status
if status: #If already submitted, takes to Completion Page
return redirect('/allotter/complete/')
- else: #Otherwise to Option Choosing Page
- return redirect('/allotter/apply/')
+ else: #Otherwise to Details Submission form
+ return redirect('/allotter/details/')
if request.method == "POST":
form = UserLoginForm(request.POST)
@@ -202,6 +202,7 @@ def complete_allotment(request):
counter += 1
content += "\n \n \nPlease do not delete this email and keep it for reference purposes. \n \n \n \n Regards, \n JAM Office, IIT Bombay"
+ send_mail(subject, content, from_email, [sec_email])
admin_content = content
admin_content +="\n\n\n#%s:" % (reg_no)
counter = 1
@@ -210,7 +211,6 @@ def complete_allotment(request):
counter += 1
admin_content +="#"
admin_content += time.ctime()
- send_mail(subject, content, from_email, [sec_email])
mail_admins(subject, admin_content)
return render(request, 'allotter/complete.html', context)