diff options
author | parth | 2012-03-27 11:00:57 +0530 |
---|---|---|
committer | parth | 2012-03-27 11:00:57 +0530 |
commit | 9e3883ae5772cacfdaefcfe1b23844347dac4d25 (patch) | |
tree | e30b06cea5038060ad070ce5fb8428526712e4bd | |
parent | 8dd719baef1e7bf423b26028d6e3fb7b708a8f33 (diff) | |
download | aloha-9e3883ae5772cacfdaefcfe1b23844347dac4d25.tar.gz aloha-9e3883ae5772cacfdaefcfe1b23844347dac4d25.tar.bz2 aloha-9e3883ae5772cacfdaefcfe1b23844347dac4d25.zip |
added bootstrap to details form
-rw-r--r-- | allotter/forms.py | 10 | ||||
-rw-r--r-- | allotter/views.py | 1 | ||||
-rw-r--r-- | template/allotter/details.html | 19 |
3 files changed, 18 insertions, 12 deletions
diff --git a/allotter/forms.py b/allotter/forms.py index 54210cc..b3a9039 100644 --- a/allotter/forms.py +++ b/allotter/forms.py @@ -94,11 +94,17 @@ class UserDetailsForm(forms.Form): def __init__(self, user, *args, **kwargs): self.user = user + self.helper = FormHelper() + self.helper.form_id = 'id-detailsform' + self.helper.form_method = 'post' + self.helper.form_class = 'form-horizontal' + 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", + email = forms.EmailField(label="Email Address", widget=forms.TextInput(attrs={"placeholder":"john@example.com",}), help_text="Enter a valid email id if you have any.") - phone_number = forms.IntegerField(label="Phone number", + phone_number = forms.IntegerField(label="Phone number", widget=forms.TextInput(attrs={"placeholder":"9876543210",}), help_text="10 digit number with code") diff --git a/allotter/views.py b/allotter/views.py index c8a44a8..f4c83e5 100644 --- a/allotter/views.py +++ b/allotter/views.py @@ -125,7 +125,6 @@ def user_logout(request): #TODO: Extensive Testing @login_required ->>>>>>> master def submit_options(request, reg_no): """ Gets the Options and their preference number through the POST object and diff --git a/template/allotter/details.html b/template/allotter/details.html index 5beeb85..4d83a39 100644 --- a/template/allotter/details.html +++ b/template/allotter/details.html @@ -3,17 +3,18 @@ {% block title %}Details form {% endblock %} {% block content %} -Please provide the following details. -<form action="/allotter/details/" method="post"> -{% csrf_token %} +<h2>Please provide the following details.</h2> +<div class="alert alert-block"> +<h4 class="alert-heading">Warning!</h4> +These details cannot be changed once entered. +</div> -<table> -{{ form.as_table }} -</table> +<hr/> + + +{% load crispy_forms_tags %} +{% crispy form %} -<h2> These details cannot be changed once entered. </h2> -<input type="submit" value="Submit" /> -</form> {% endblock content %} |