47 lines
1.3 KiB
PHP
Executable File
47 lines
1.3 KiB
PHP
Executable File
<?php
|
|
|
|
|
|
/* @var $this \yii\web\View */
|
|
|
|
use himiklab\yii2\recaptcha\ReCaptcha;
|
|
use yii\captcha\Captcha;
|
|
use yii\helpers\Html;
|
|
use yii\widgets\ActiveForm;
|
|
|
|
$this->title = 'ตั้งกระทู้';
|
|
$this->params['breadcrumbs'][] = ['url' => ['index', 'id' => $forum->id], 'label' => $forum->name];
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
?>
|
|
|
|
<div class="container">
|
|
<div class="card shadow">
|
|
<div class="card-body">
|
|
|
|
<?php $form = ActiveForm::begin() ?>
|
|
|
|
<?= $form->field($model, 'name') ?>
|
|
|
|
<?= $form->field($model, 'description')->textarea(['rows' => 15]) ?>
|
|
|
|
<?= $form->field($model, 'thread_by') ?>
|
|
|
|
<?= $form->field($model, 'thread_tel') ?>
|
|
|
|
<?= $form->field($model, 'thread_email') ?>
|
|
|
|
<?= $form->field($model, 'thread_contact')->textarea(['rows' => 4]) ?>
|
|
|
|
<!-- hCaptcha widget -->
|
|
<div class="h-captcha" data-sitekey="<?= Yii::$app->params['hcaptcha_site_key'] ?>"></div>
|
|
|
|
|
|
<?= Html::submitButton('ตั้งกระทู้', ['class' => 'btn btn-success']) ?>
|
|
|
|
<?php ActiveForm::end() ?>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- โหลด hCaptcha JS -->
|
|
<script src="https://hcaptcha.com/1/api.js" async defer></script>
|