示例#1
0
    <p class="note"><?php 
Yii::t('common', 'Fields with <span class="required">*</span> are required.');
?>
</p>

    <?php 
echo $form->errorSummary(array($model, $translate));
if ($model->type != FormDesigner::TYPE_DEFAULT) {
    if ($model->isNewRecord) {
        echo $form->dropDownListRow($model, 'type', FormDesigner::getTypesList());
        ?>

            <div id="selReferenceBox" style="display: none;">
                <?php 
        $references = HFormEditor::getReferencesList();
        if ($references) {
            echo $form->dropDownListRow($model, 'reference_id', $references);
        } else {
            echo CHtml::link(tt('Please add the new category to the form editor', 'formeditor'), Yii::app()->createUrl('/referencecategories/backend/main/admin'));
        }
        ?>
            </div>
        <?php 
    } else {
        echo '<br/>';
        echo '<b>' . tt('The name of a field in a table', 'formeditor') . '</b>: ' . $model->field . '';
        echo '<br/>';
        echo '<b>' . $model->getAttributeLabel('type') . '</b>: ' . $model->getTypeName() . '';
        echo '<br/>';
    }