Ejemplo n.º 1
0
$model1 = new XUploadForm();
$this->widget('ext.xupload.XUploadWidget', array('url' => Yii::app()->createUrl("pages/upload"), 'model' => $model1, 'attribute' => 'file', 'options' => array('onComplete' => 'js:function (event, files, index, xhr, handler, callBack) {
                        GetReload();
                        }')));
?>
</td></tr>
    <?php 
/** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.BootActiveForm', array('id' => 'pages-create-form', 'htmlOptions' => array('class' => 'well')));
?>
<tr><td><?php 
echo $form->textFieldRow($model, 'company_name', array('class' => 'span3'));
?>
</td></tr>
<tr><td><?php 
echo $form->dropDownList($model, 'type', CHtml::listData(PagesTypes::model()->findAll(), 'id', 'type'), array('empty' => 'Select Type'));
?>
</td></tr>
<tr><td><?php 
echo $form->textFieldRow($model, 'address', array('class' => 'span3'));
?>
</td></tr>

<tr><td><?php 
$this->widget('application.extensions.redactor.redactorjs.Redactor', array('lang' => 'de', 'toolbar' => 'default', 'model' => $model, 'attribute' => 'description'));
//echo $form->textAreaRow($model, 'description', array('class'=>'span3'));
?>
</td></tr><br/>
<tr><td><?php 
$this->widget('bootstrap.widgets.BootButton', array('buttonType' => 'submit', 'icon' => 'ok', 'label' => 'Create Page'));
?>
Ejemplo n.º 2
0
                <td id="usererror" style="display:none;width:100%;">
                    <?php 
Yii::app()->user->setFlash('error', $form->error($model, 'domain'));
$this->widget('bootstrap.widgets.BootAlert');
?>
                </td>
        </tr>
        
        
            <tr><div class="row">
                    <td><?php 
echo $form->labelEx($model, 'type');
?>
</td>
                    <td><?php 
echo $form->dropdownList($model, 'type', CHtml::listData(PagesTypes::model()->findAll(), 'id', 'type'), array('prompt' => 'Select Type', 'class' => 'span3'));
?>
</td>
                    
            </div></tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td id="typeerror" style="display:none;width:100%;">
                    <?php 
Yii::app()->user->setFlash('error', $form->error($model, 'user_type'));
$this->widget('bootstrap.widgets.BootAlert');
?>
                </td>
        </tr>