} </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')))))));
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)')); ?>