<?php
use yii\helpers\Url;
use home\assets\LinkAsset;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use home\models\Message;
use common\widgets\Editor;

LinkAsset::register($this);
$this->title = '发送通知公告';

$attrLabels = $model->attributeLabels();

$form = ActiveForm::begin([
    'id' => 'main-form',
    'options' => ['class' => 'informationform f14'],
    'action' => $action,
    'fieldConfig' => [
        'options' => ['tag' => 'td'],
        'template' => "{input}{hint}{error}",
        'errorOptions' => ["class" => "error"]
    ]
]);
?>

<div class="modal-window" >
	<?= \home\widgets\Alert::widget(); ?>


    <table cellpadding="0" cellspacing="10" width="100%">
        <tbody>

        <tr>
            <td align="right" width="80"><?= $model->getAttributeLabel('title') ?>：</td>
            <?= $form->field($model, 'title')->textInput(['class' => 'form-control']) ?>
            <td><span class="redstar">*</span></td>
        </tr>

        <tr>
            <td align="right" width="80"><?= $model->getAttributeLabel('get_user_names') ?>：</td>
            <?= $form->field($model, 'get_user_names')->textInput(['class' => 'form-control select-multi-user', 'placeholder' => '点击选择', 'data-hidden-id' => 'user-ids', 'data-url' => Url::to(['/link/multi-user']), 'data-title' => '选择收件人']) ?>
            <?= $form->field($model, 'get_user_ids', ['options' => ['tag'=>'div']])->hiddenInput(['id' => 'user-ids']) ?>
            <td><span class="redstar">*</span></td>
        </tr>

        <tr>
            <td align="right">内容：</td>
            <?= Editor::widget(['model' => $model, 'form' => $form, 'attribute' => 'content','fieldConfig' => ['options' => ['colspan' => '4']], 'inputConfig' => ['class' => ''], 'width' => '100%', 'height' => 250,'editorType' => 'simple']) ?>
            <td><span class="redstar"></span></td>
        </tr>

        </tbody>
    </table>

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


</div>
