<?php

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

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

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

        <?= $form->field($model, 'area')->label('区域')->widget(CityWidget::className(), [
            'provinceAttribute' => 'province',
            'cityAttribute' => 'city',
            'areaAttribute' => 'area'
        ]) ?>

        <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'icon')->hint('规格：80px * 80px，<a target="blank" href="https://www.iconfont.cn/">下载图标库</a>')->widget(SingleWidget::className()) ?>



        <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>
