<?php

use yii\bootstrap\ActiveForm;
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model common\models\CarouselItem */
/* @var $form yii\bootstrap\ActiveForm */
?>


<?php $form = ActiveForm::begin(); ?>
<div class="row">
    <div class="col-md-6">
        <?php echo $form->errorSummary($model) ?>

        <?php echo $form->field($model, 'image')->widget(\common\modules\attachment\widgets\SingleWidget::className(), ['onlyUrl' => true]) ?>

    </div>
    <div class="col-md-6">

        <?php echo $form->field($model, 'url')->textarea(['maxlength' => 1024]) ?>

        <?php echo $form->field($model, 'caption')->textarea() ?>
        <?php echo $form->field($model, 'subtitle')->textarea() ?>

        <?php echo $form->field($model, 'height')->hint('单位：px')->textInput() ?>
        <?php echo $form->field($model, 'sort')->textInput() ?>

        <?php echo $form->field($model, 'status')->checkbox() ?>

        <div class="form-group form-submit">
            <?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
        </div>
    </div>
</div>
<?php ActiveForm::end(); ?>
