Subversion Repositories SmartDukaan

Rev

Rev 14533 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<div class="container">
        <div class="row">
                <div class="col-lg-3">
                        <?php echo $this->Element('adminactions');?>
                </div>
                <div class="col-lg-9">
                        <?php echo $this->Form->create('FeaturedDeal'); ?>
                                <fieldset>
                                        <legend><?php echo __('Add Featured Deal'); ?></legend>
                                <?php
                                        echo $this->Form->input('sku',array('type'=>'number'));
                                        echo $this->Form->input('FeaturedDeal.rankDetails.0',array('type'=>'number','label'=>'Default Rank'));
                                        echo $this->Form->input('FeaturedDeal.rankDetails.3',array('type'=>'number','label'=>'Mobiles Rank','class' => 'categoryRank'));
                                        echo $this->Form->input('FeaturedDeal.rankDetails.5',array('type'=>'number','label'=>'Tablets Rank','class'=>'categoryRank'));
                                        echo $this->Form->input('startDate',array('type'=>'datetime','timeFormat'=>24));
                                        echo $this->Form->input('endDate',array('type'=>'datetime','timeFormat'=>24));
                                        echo $this->Form->input('thresholdPrice',array('type'=>'number'));
                                ?>
                                </fieldset>
                        <?php echo $this->Form->end(__('Submit')); ?>
                        </div>
                </div>
        </div>
</div>
<script type="text/javascript">
$(function(){
        $(document).on('click','.categoryRank',function(){
                var that = $(this);
                $(this).prop('readonly',false);
                $('.categoryRank').each(function(){
                        if($(this).prop('id') != $(that).prop('id')){
                                $(this).val('').prop('readonly',true);
                        }
                });
        })
})
</script>