Example #1
0
?>
                        </section>
                        <section class="col-sm-3 lease-terms" style="display: none;">
                            <?php 
echo $form->dropDownListGroup($SpecialTechniqueForm, 'cost_rent_term', ['widgetOptions' => ['data' => Cost::enumTerm()]]);
?>
                        </section>
                        <section class="col-sm-4">
                            <?php 
echo $form->dropDownListGroup($SpecialTechniqueForm, 'cost_nds_include', ['widgetOptions' => ['data' => Cost::enumNds()]]);
?>
                        
                        </section>
                        <section class="col-sm-4">
                            <?php 
echo $form->dropDownListGroup($SpecialTechniqueForm, 'cost_cash', ['widgetOptions' => ['data' => Cost::enumCash()]]);
?>
                        </section>
                        <script>
                            $(function() {
                                $("#SpecialTechniqueForm_cost_cash").change(function() {
                                    value = $(this).find('option:selected').val();
                                    if(value=='1') {
                                        $("#SpecialTechniqueForm_cost_nds_include").attr('disabled', true);
                                        $("#SpecialTechniqueForm_cost_nds_include").parents('div.checkbox').hide();
                                    } else {
                                        $("#SpecialTechniqueForm_cost_nds_include").attr('disabled', false);
                                        $("#SpecialTechniqueForm_cost_nds_include").parents('div.checkbox').show();
                                    }
                                });
                            });