Пример #1
0
/**
 * Представление для выбора кастомных полей в форме редактирования продукта или каталога
 * @var array $fields
 */
if (count($fields) > 0) {
    ?>
    <table id="custom_fields_for_object" class="table table-hover" style="margin-bottom: 10px;">
        <thead>
        <tr class="top-table">
            <th>#</th>
            <th><?php 
    echo CustomFields::model()->getAttributeLabel('name');
    ?>
</th>
            <th><?php 
    echo CustomFields::model()->getAttributeLabel('field_format');
    ?>
</th>
        </tr>
        </thead>
        <tbody>
            <?php 
    foreach ($fields as $i => $field) {
        ?>
                <tr data-field-id="<?php 
        echo $field->id;
        ?>
">
                    <td><?php 
        echo CHtml::activeCheckBox($field, '[' . $i . ']attached');
        ?>