Esempio n. 1
0
                <td colspan="2"><?php 
echo CHtml::activeTextField($model, 'category', array('class' => 'normal', 'size' => '0', 'style' => 'width: 143px;'));
?>
</td>
        </tr>
        
        <tr>
 
                <td style="padding-top: 10px;"><?php 
echo CHtml::activeLabelEx($model, 'parent_id');
?>
</td>
                <td>
                <!--Вывод дерева категорий-->
                <input type="text" value="<?php 
echo isset($model->parent_id) ? UploadsCategories::GetName($model->parent_id) : '';
?>
" readonly="readonly" id="cat_text" style="width: 250px;">
                <a href="#" id="tree_category">Показать дерево категорий</a>
                <table id="cats" style="display: none;">
                <?php 
foreach ($cats as $key => $tree) {
    ?>
  
                     <tr class="tn-container" node="<?php 
    echo $tree->id;
    ?>
" parent="<?php 
    echo $tree->parent_id;
    ?>
" children_count="<?php 
Esempio n. 2
0
                            </div>
                          </td>


                    </tr>
                    <?php 
    }
    ?>
 
                </table>
                <p id="choosed_category<?php 
    echo $key;
    ?>
"><?php 
    if (isset($model['category__id']) && !empty($model['category__id'])) {
        echo CHtml::encode(UploadsCategories::GetName($model['category__id']));
    }
    ?>
</p>
               
                    <p class="error_text"></p>
                    <?php 
    echo CHtml::activeHiddenField($model, 'category__id', array('class' => 'needed', 'id' => 'choosed_category_id' . $key, 'name' => get_class($model) . '[' . $key . '][category__id]'));
    ?>
                    <?php 
    echo CHtml::activeHiddenField($model, 'local_name', array('name' => get_class($model) . '[' . $key . '][local_name]'));
    ?>
                
                </td>
                
        </tr>