project/templates/registration/submit-registration.html
changeset 315 566e5f783e75
parent 264 f80e1c78dcc0
child 316 88ff5f6b43f4
equal deleted inserted replaced
314:d49cd84fb9c0 315:566e5f783e75
     5 {% block addscripts %}
     5 {% block addscripts %}
     6   <script type="text/javascript">
     6   <script type="text/javascript">
     7 
     7 
     8   $(document).ready(function(){
     8   $(document).ready(function(){
     9     if (!$('#id_accommodation_required').is(':checked')) {
     9     if (!$('#id_accommodation_required').is(':checked')) {
    10       $('#id_accommodation_days').attr('disabled', 'disabled');
       
    11       $('#id_sex').attr('disabled', 'disabled');
    10       $('#id_sex').attr('disabled', 'disabled');
       
    11       $('#id_accomodation_on_1st').attr('disabled', 'disabled');
       
    12       $('#id_accomodation_on_2nd').attr('disabled', 'disabled');
       
    13       $('#id_accomodation_on_3rd').attr('disabled', 'disabled');
       
    14       $('#id_accomodation_on_4th').attr('disabled', 'disabled');
       
    15       $('#id_accomodation_on_5th').attr('disabled', 'disabled');
       
    16       $('#id_accomodation_on_6th').attr('disabled', 'disabled');
    12     }
    17     }
    13     $('#id_accommodation_required').change(function() {
    18     $('#id_accommodation_required').change(function() {
    14       if (!$('#id_accommodation_required').is(':checked')) {
    19       if (!$('#id_accommodation_required').is(':checked')) {
    15         $('#id_accommodation_days').attr('disabled', 'disabled');
       
    16         $('#id_sex').attr('disabled', 'disabled');
    20         $('#id_sex').attr('disabled', 'disabled');
       
    21         $('#id_accomodation_on_1st').attr('disabled', 'disabled');
       
    22         $('#id_accomodation_on_2nd').attr('disabled', 'disabled');
       
    23         $('#id_accomodation_on_3rd').attr('disabled', 'disabled');
       
    24         $('#id_accomodation_on_4th').attr('disabled', 'disabled');
       
    25         $('#id_accomodation_on_5th').attr('disabled', 'disabled');
       
    26         $('#id_accomodation_on_6th').attr('disabled', 'disabled');
    17       } else {
    27       } else {
    18         $('#id_accommodation_days').removeAttr('disabled');
    28       $('#id_accommodation_days').removeAttr('disabled');
    19         $('#id_sex').removeAttr('disabled');
    29       $('#id_sex').removeAttr('disabled');
       
    30       $('#id_accomodation_on_1st').removeAttr('disabled', 'disabled');
       
    31       $('#id_accomodation_on_2nd').removeAttr('disabled', 'disabled');
       
    32       $('#id_accomodation_on_3rd').removeAttr('disabled', 'disabled');
       
    33       $('#id_accomodation_on_4th').removeAttr('disabled', 'disabled');
       
    34       $('#id_accomodation_on_5th').removeAttr('disabled', 'disabled');
       
    35       $('#id_accomodation_on_6th').removeAttr('disabled', 'disabled');
    20       }
    36       }
    21     });
    37     });
    22 
    38 
    23     if (!$('#id_paid').is(':checked')) {
    39     if (!$('#id_paid').is(':checked')) {
    24         $('#id_type').attr('disabled', 'disabled');
    40         $('#id_type').attr('disabled', 'disabled');