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_sex').attr('disabled', 'disabled'); |
10 $('#id_sex').attr('disabled', 'disabled'); |
11 $('#id_accomodation_on_1st').attr('disabled', 'disabled'); |
11 $('#id_accommodation_on_1st').attr('disabled', 'disabled'); |
12 $('#id_accomodation_on_2nd').attr('disabled', 'disabled'); |
12 $('#id_accommodation_on_2nd').attr('disabled', 'disabled'); |
13 $('#id_accomodation_on_3rd').attr('disabled', 'disabled'); |
13 $('#id_accommodation_on_3rd').attr('disabled', 'disabled'); |
14 $('#id_accomodation_on_4th').attr('disabled', 'disabled'); |
14 $('#id_accommodation_on_4th').attr('disabled', 'disabled'); |
15 $('#id_accomodation_on_5th').attr('disabled', 'disabled'); |
15 $('#id_accommodation_on_5th').attr('disabled', 'disabled'); |
16 $('#id_accomodation_on_6th').attr('disabled', 'disabled'); |
16 $('#id_accommodation_on_6th').attr('disabled', 'disabled'); |
17 } |
17 } |
18 $('#id_accommodation_required').change(function() { |
18 $('#id_accommodation_required').change(function() { |
19 if (!$('#id_accommodation_required').is(':checked')) { |
19 if (!$('#id_accommodation_required').is(':checked')) { |
20 $('#id_sex').attr('disabled', 'disabled'); |
20 $('#id_sex').attr('disabled', 'disabled'); |
21 $('#id_accomodation_on_1st').attr('disabled', 'disabled'); |
21 $('#id_accommodation_on_1st').attr('disabled', 'disabled'); |
22 $('#id_accomodation_on_2nd').attr('disabled', 'disabled'); |
22 $('#id_accommodation_on_2nd').attr('disabled', 'disabled'); |
23 $('#id_accomodation_on_3rd').attr('disabled', 'disabled'); |
23 $('#id_accommodation_on_3rd').attr('disabled', 'disabled'); |
24 $('#id_accomodation_on_4th').attr('disabled', 'disabled'); |
24 $('#id_accommodation_on_4th').attr('disabled', 'disabled'); |
25 $('#id_accomodation_on_5th').attr('disabled', 'disabled'); |
25 $('#id_accommodation_on_5th').attr('disabled', 'disabled'); |
26 $('#id_accomodation_on_6th').attr('disabled', 'disabled'); |
26 $('#id_accommodation_on_6th').attr('disabled', 'disabled'); |
27 } else { |
27 } else { |
28 $('#id_accommodation_days').removeAttr('disabled'); |
28 $('#id_accommodation_days').removeAttr('disabled'); |
29 $('#id_sex').removeAttr('disabled'); |
29 $('#id_sex').removeAttr('disabled'); |
30 $('#id_accomodation_on_1st').removeAttr('disabled', 'disabled'); |
30 $('#id_accommodation_on_1st').removeAttr('disabled', 'disabled'); |
31 $('#id_accomodation_on_2nd').removeAttr('disabled', 'disabled'); |
31 $('#id_accommodation_on_2nd').removeAttr('disabled', 'disabled'); |
32 $('#id_accomodation_on_3rd').removeAttr('disabled', 'disabled'); |
32 $('#id_accommodation_on_3rd').removeAttr('disabled', 'disabled'); |
33 $('#id_accomodation_on_4th').removeAttr('disabled', 'disabled'); |
33 $('#id_accommodation_on_4th').removeAttr('disabled', 'disabled'); |
34 $('#id_accomodation_on_5th').removeAttr('disabled', 'disabled'); |
34 $('#id_accommodation_on_5th').removeAttr('disabled', 'disabled'); |
35 $('#id_accomodation_on_6th').removeAttr('disabled', 'disabled'); |
35 $('#id_accommodation_on_6th').removeAttr('disabled', 'disabled'); |
36 } |
36 } |
37 }); |
37 }); |
38 |
38 |
39 if (!$('#id_paid').is(':checked')) { |
39 if (!$('#id_paid').is(':checked')) { |
40 $('#id_type').attr('disabled', 'disabled'); |
40 $('#id_type').attr('disabled', 'disabled'); |