当前位置: 首页>>代码示例>>PHP>>正文


PHP FormField::itemAlias方法代码示例

本文整理汇总了PHP中FormField::itemAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP FormField::itemAlias方法的具体用法?PHP FormField::itemAlias怎么用?PHP FormField::itemAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormField的用法示例。


在下文中一共展示了FormField::itemAlias方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

        }
    </style>
</html>
<?php 
/* @var $this FieldsController */
/* @var $model FormField */
$this->breadcrumbs = array('Form Fields' => array('index'), 'Manage');
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#form-field-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<?php 
$formRow = Form::model()->findByAttributes(array('FORM_ID' => $form_id));
?>
<h1>Manage Fields of <span style="color:#B40431"><?php 
echo $formRow['FORM_NAME'];
?>
</span></h1>
<?php 
echo CHtml::link('Add Field', array('fields/new', 'form' => $form_id), array('class' => 'btn-inverse btn buttonDesign'));
echo CHtml::link('Add Entry', array('entry/new', 'form' => $form_id), array('class' => 'btn-inverse btn buttonDesign'));
echo CHtml::link($formRow['FORM_NAME'] . ' Details', array('forms/view', 'form' => $form_id), array('class' => 'btn-inverse btn buttonDesign'));
echo CHtml::link('Manage Dynamic Forms', array('forms/index'), array('class' => 'btn-inverse btn buttonDesign'));
echo CHtml::link('Manage Form Entries', array('entry/index', 'form' => $form_id), array('class' => 'btn-inverse btn buttonDesign'));
?>


<br/><br/>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'form-field-grid', 'dataProvider' => $model->search($form_id), 'filter' => $model, 'columns' => array(array('name' => 'TITLE', 'value' => '$data->TITLE'), array('name' => 'FIELD_TYPE', 'value' => '$data->FIELD_TYPE', 'filter' => FormField::itemAlias("field_type")), 'FIELD_SIZE', 'FIELD_SIZE_MIN', array('name' => 'REQUIRED', 'value' => 'FormField::itemAlias("required",$data->REQUIRED)', 'filter' => FormField::itemAlias("required")), array('name' => 'VISIBLE', 'value' => 'FormField::itemAlias("visible",$data->VISIBLE)', 'filter' => FormField::itemAlias("visible")), array('class' => 'CButtonColumn', 'buttons' => array('view' => array('url' => '$this->grid->controller->createUrl("view", array("field"=>$data->primaryKey,"form"=>$data["FORM_ID"]))', 'options' => array('title' => 'View')), 'update' => array('url' => '$this->grid->controller->createUrl("edit", array("field"=>$data->primaryKey,"form"=>$data["FORM_ID"]))', 'options' => array('title' => 'Edit')), 'delete' => array('url' => '$this->grid->controller->createUrl("delete", array("field"=>$data->primaryKey,"form"=>$data["FORM_ID"]))', 'options' => array('title' => 'Delete')))))));
开发者ID:anjanababu,项目名称:Asset-Management,代码行数:30,代码来源:all.php

示例2: array

echo $form->textField($model, 'POSITION');
?>
</div>
                    <span class='label label-info'>Display order of fields.</span>
                </div>
            </div>
        </tr>
        <tr>
            <div class="row">
                <div class="col-md-3 col-sm-6">
                    <div class="span2"><?php 
echo $form->labelEx($model, 'VISIBLE');
?>
</div>
                    <div class="span3"><?php 
echo $form->dropDownList($model, 'VISIBLE', FormField::itemAlias('visible'));
?>
</div>
                    <span class='label label-info'>Display field as hidden or for all.</span>
                </div>
            </div>
        </tr>
        </table>
        
        <div style="text-align: center;">
        <?php 
echo TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'size' => TbHtml::BUTTON_SIZE_DEFAULT));
?>
        <?php 
echo TbHtml::button('Cancel', array('color' => TbHtml::BUTTON_COLOR_DANGER, 'size' => TbHtml::BUTTON_SIZE_DEFAULT, 'onclick' => 'history.go(-1)'));
?>
开发者ID:anjanababu,项目名称:Asset-Management,代码行数:31,代码来源:_form.php


注:本文中的FormField::itemAlias方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。