<?php
use yii\helpers\Url;
use qcbase\models\Config;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\widgets\Uploader;

/* @var $this yii\web\View */
?>

<div class="nav">
    <!--<div class="return"><a href="">返回上一级</a></div>-->
    <ul class="cc">
        <li class="current"><a href="<?= Url::to(['config/basic']) ?>">基本配置</a></li>
        <li ><a href="<?= Url::to(['config/system']) ?>">系统配置</a></li>
        <li ><a href="<?= Url::to(['config/reimbursement']) ?>">报销配置</a></li>
        <li ><a href="<?= Url::to(['config/application']) ?>">申请单配置</a></li>
    </ul>
</div>
<?php $form = ActiveForm::begin([
    'id' => 'main-form',
    'action' => ['config/update'],
    'fieldConfig' => [
        'options' => ['tag' => 'tr'],
        'template' => "<th width='120'>{label}</th><td>{input}{error}</td><td>{hint}</td>",
        'hintOptions' => ['class' => 'fun_tips'],
    ]
]); ?>

<div class="h_a">温馨提示</div>
<div class="prompt_text">
    <p>请在修改完配置后，<a href="javascript:parent.iframeJudge({elem:this, id:'cache', title:'更新缓存', href:'<?= Url::to(['/site/cache']) ?>' });">更新缓存</a>，否则数据将不会同步更新 !</p>
</div>

<div class="h_a">基本属性</div>

<div class="table_full">
    <table width="100%">
        <col class="th" />
        <col width="500" />
        <col />

        <?= $form->field($model, 'web_name')->textInput(['class' => 'input length_5'])->hint('$web_name') ?>

        <?= $form->field($model, 'web_url')->textInput(['class' => 'input length_5'])->hint('$web_url') ?>

        <tr class="field-config-web_logo required">
            <th ><label for="config-web_logo" class="control-label">网站LOGO</label></th>
            <td>
                <?= Uploader::widget(['model' => $model, 'form' => $form, 'attribute' => 'web_logo', 'type' => 'image', 'attachIndexRoute' => Yii::getAlias('@web'). '/index.php?r=attachment/index']) ?>
            </td>
            <td><div class="fun_tips">$web_logo</div></td>
        </tr>

        <tr class="field-config-wap_logo required">
            <th ><label for="config-wap_logo" class="control-label">手机端LOGO</label></th>
            <td>
                <?= Uploader::widget(['model' => $model, 'form' => $form, 'attribute' => 'wap_logo', 'type' => 'image', 'attachIndexRoute' => Yii::getAlias('@web'). '/index.php?r=attachment/index']) ?>
            </td>
            <td><div class="fun_tips">$wap_logo</div></td>
        </tr>

        <?= $form->field($model, 'web_keywords')->textInput(['class' => 'input length_5'])->hint('$web_keywords') ?>

        <?= $form->field($model, 'web_description')->textInput(['class' => 'input length_5'])->hint('$web_description') ?>

        <?= $form->field($model, 'web_description')->textInput(['class' => 'input length_5'])->hint('$web_description') ?>
        
        <?= $form->field($model, 'web_info')->textInput(['class' => 'input length_5'])->hint('$web_info') ?>
        
        <?= $form->field($model, 'web_record')->textInput(['class' => 'input length_5'])->hint('$web_record') ?>
        
    </table>
</div>

<input name="config_name" type="hidden" value="basic" />

<div class="btn_wrap">
    <div class="btn_wrap_pd">
        <button class="btn btn_submit mr10" type="submit">提交</button>
    </div>
</div>

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