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

$attrLabels = $model->attributeLabels();

$form = ActiveForm::begin([
			'id' => 'main-form',
			'options' => ['class' => ' f14'],
            'action' => $action,
			'fieldConfig' => [
				'options' => ['tag' => 'td'],
				'template' => "{input}{hint}{error}",
				'errorOptions' => ["class" => "error"]
			]
]);
?>
<?= \home\widgets\Alert::widget(); ?>
<div class="modal-window" >
    <table class="table task-table taskdetail-table">
        <tbody>

            <tr>
                <td width="10%" class="table-blue"><?= $model->getAttributeLabel('get_user_names') ?>:</td>
				<td colspan="3"><?= $model->send_sers ?></td>
            </tr>

            <tr>
				<td width="10%" class="table-blue"><?= $model->getAttributeLabel('content') ?>:</td>
                <td colspan="3" style="text-align:left">
                    <div style="width: 748px; height: 220px;overflow-y:scroll;" >
                        <?= !empty($model->replycontent)?$model->replycontent:'' ?>
                    </div>
                </td>
            </tr>

            <tr>
                <td width="10%" class="table-blue"><?= $model->getAttributeLabel('title') ?>:</td>
                <?= $form->field($model, 'title')->textInput(['class' => 'form-control']) ?>
            </tr>

            <tr>
                <td width="10%" class="table-blue"><?= $model->getAttributeLabel('is_reply') ?>:</td>
                <?= $form->field($model, 'is_reply')->radioList(Message::getStatusList(), ['itemOptions' => ['labelOptions' => ['class' => 'radio-inline']]]) ?>
            </tr>

            <tr>
                <td width="10%" class="table-blue">回复:</td>
                <?= Editor::widget(['model' => $model, 'form' => $form, 'attribute' => 'content','fieldConfig' => ['options' => ['colspan' => '4']], 'inputConfig' => ['class' => ''], 'width' => '100%', 'height' => 80,'editorType' => 'simple']) ?>
            </tr>

        </tbody>
    </table>
</div>

<?= Html::hiddenInput('Message[message_id]' ,$model->message_id); ?>
<?= Html::hiddenInput('Message[get_user_ids]' ,$model->get_user_ids); ?>
<?= Html::hiddenInput('id' ,$model->message_id); ?>

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