--- a/project/templates/registration/submit-registration.html Mon Nov 08 00:47:57 2010 +0530
+++ b/project/templates/registration/submit-registration.html Mon Nov 08 00:47:39 2010 +0530
@@ -2,6 +2,29 @@
{% block title %}Submit Registration{% endblock %}
+{% block addscripts %}
+ <script type="text/javascript">
+
+ $(document).ready(function(){
+ if (!$('#id_accommodation_required').is(':checked')) {
+ $('#id_accommodation_days').attr('disabled', 'disabled');
+ $('#id_sex').attr('disabled', 'disabled');
+ }
+ $('#id_accommodation_required').change(function() {
+ if (!$('#id_accommodation_required').is(':checked')) {
+ $('#id_accommodation_days').attr('disabled', 'disabled');
+ $('#id_sex').attr('disabled', 'disabled');
+ } else {
+ $('#id_accommodation_days').removeAttr('disabled');
+ $('#id_sex').removeAttr('disabled');
+ }
+ });
+ });
+
+
+ </script>
+{% endblock addscripts %}
+
{% block content %}
{% block formheading %}
<h1>Submit Registration</h1>