Example #1
0
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 20]);
?>

    <?php 
echo Show::activeDropDownList($model, 'center_id', $attributeLabels, $centers, ['class' => 'form-select'], $errors);
?>

    <?php 
echo Show::activeDropDownList($model, 'area_id', $attributeLabels, $areas, ['class' => 'form-select'], $errors);
?>

    <?php 
echo Show::activeDropDownList($model, 'type', $attributeLabels, $types, ['class' => 'form-select'], $errors);
?>

    <?php 
echo Show::multiSelect('equipments', $equipmentIds, $equipments, 'id', 'name', $attributeLabels, ['style' => 'height: 150px;']);
?>

    <?php 
echo Show::multiSelect('power_equipments', $powerEquipmentIds, $powerEquipments, 'id', 'name', $attributeLabels);
?>

    <?php 
echo Show::multiSelect('dc_equipments', $dcEquipmentIds, $dcEquipments, 'id', 'name', $attributeLabels);
?>

    <?php 
Example #2
0
    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo Show::activeDropDownList($model, 'sensor_id', $attributeLabels, $sensors);
?>

    <?php 
echo $form->field($model, 'message_0')->textInput(['maxlength' => 255]);
?>

    <?php 
echo $form->field($model, 'message_1')->textInput(['maxlength' => 255]);
?>

    <?php 
echo Show::activeDropDownList($model, 'active', $attributeLabels, $model->_statusData);
?>

    <?php 
echo Show::submitButton($model);
?>

    <?php 
ActiveForm::end();
?>

</div>
Example #3
0
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\StationType */
/* @var $form yii\widgets\ActiveForm */
$attributeLabels = $model->attributeLabels();
?>

<div class="station-type-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 255]);
?>

    <?php 
echo Show::activeDropDownList($model, 'active', $attributeLabels, $model->optionsActive());
?>

    <?php 
echo Show::submitButton($model);
?>

    <?php 
ActiveForm::end();
?>

</div>
Example #4
0
echo $form->field($model, 'fullname')->textInput(['maxlength' => 255]);
?>

    <?php 
echo $form->field($model, 'password')->passwordInput();
?>

    <?php 
echo $form->field($model, 'email')->textInput(['maxlength' => 255]);
?>

    <?php 
echo $form->field($model, 'mobile')->textInput(['maxlength' => 20]);
?>

    <?php 
echo Show::activeDropDownList($model, 'type', $labels, $types, [], $errors);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($action == 'create' ? 'Thêm mới' : 'Cập nhật', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>