<?php

use common\modules\attachment\widgets\SingleWidget;
use yii\helpers\Html;
use yii\widgets\ActiveForm;

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

<div class="box box-success">
    <div class="box-body">
        <?php $form = ActiveForm::begin(); ?>

        <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
        <?= $form->field($model, 'slug')->textInput(['maxlength' => true]) ?>
        <?= $form->field($model, 'icon')->hint('规格：80px * 80px，<a target="blank" href="https://www.iconfont.cn/">下载图标库</a>')->widget(SingleWidget::className()) ?>
        <?= $form->field($model, 'cover')->hint('规格：500px * 500px，<a target="blank" href="https://storyset.com/">下载封面图</a>')->widget(SingleWidget::className()) ?>
        <?= $form->field($model, 'card')->hint('规格：500px * 500px，<a target="blank" href="https://storyset.com/">下载封面图</a>')->widget(SingleWidget::className()) ?>
        <?= $form->field($model, 'description')->textarea(['maxlength' => true]) ?>
<!--        --><?//= $form->field($model, 'is_hot')->hint('强制推荐')->checkbox() ?>
        <?= $form->field($model, 'sort')->textInput(['type' => 'number']) ?>

        <div class="form-group">
            <?= Html::submitButton($model->isNewRecord ? Yii::t('common', 'Create') : Yii::t('common', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success btn-flat' : 'btn btn-primary btn-flat']) ?>
        </div>

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