1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the Cjt Terabyte LLC [yii2-extension]. |
5
|
|
|
* |
6
|
|
|
* (c) Cjt Terabyte LLC [yii2-extension] <http://github.com/cjtterabytesoft>. |
7
|
|
|
* For the full copyright and license information, please view the LICENSE.md. |
8
|
|
|
* file that was distributed with this source code. |
9
|
|
|
* |
10
|
|
|
* @link http://www.cjtterabyte.com. |
11
|
|
|
* @author Wilmer Arámbula <[email protected]>. |
12
|
|
|
* @copyright (c) 2015 Cjt Terabyte LLC. |
13
|
|
|
* @Extension: [yii2-adminlte-advanced]. |
14
|
|
|
* @Themes: AdminLTE - Views [Frontend - site/contact]. |
15
|
|
|
* @since 1.0 |
16
|
|
|
*/ |
17
|
|
|
|
18
|
|
|
use yii\helpers\Html; |
19
|
|
|
use yii\bootstrap\ActiveForm; |
20
|
|
|
use yii\captcha\Captcha; |
21
|
|
|
|
22
|
|
|
/* @var $this yii\web\View */ |
23
|
|
|
/* @var $form yii\bootstrap\ActiveForm */ |
24
|
|
|
/* @var $model \frontend\models\ContactForm */ |
25
|
|
|
|
26
|
|
|
$this->title = 'Contact'; |
27
|
|
|
$this->params['breadcrumbs'][] = Yii::t('adminlte',$this->title); |
28
|
|
|
|
29
|
|
|
?> |
30
|
|
|
|
31
|
|
|
<?= Html::beginTag('div', ['class' => 'form-box', 'id' => 'site-contact', 'style' => 'min-width: 280px; width: 45%']) ?> |
32
|
|
|
<?= Html::beginTag('div', ['class' => 'header']) ?> |
33
|
|
|
<?= Html::tag('h3', Html::encode(Yii::t('adminlte',$this->title)), ['class' => 'panel-title-custom']) ?> |
34
|
|
|
<?= Html::endTag('div') ?> |
35
|
|
|
<?= Html::beginTag('div', ['class' => 'body']) ?> |
36
|
|
|
<?= Html::tag('p', Yii::t('adminlte', 'If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.'), ['style' => ' text-align: justify;']) ?> |
37
|
|
|
<?php $form = ActiveForm::begin([ |
38
|
|
|
'id' => 'contact-form', |
39
|
|
|
]) ?> |
40
|
|
|
|
41
|
|
|
<?= $form->field($model, 'name')->label(Yii::t('adminlte', 'Username')) ?> |
42
|
|
|
|
43
|
|
|
<?= $form->field($model, 'email')->label(Yii::t('adminlte', 'Email')) ?> |
44
|
|
|
|
45
|
|
|
<?= $form->field($model, 'subject')->label(Yii::t('adminlte', 'Subject')) ?> |
46
|
|
|
|
47
|
|
|
<?= $form->field($model, 'body')->textArea(['rows' => 6])->label(Yii::t('adminlte', 'Body')) ?> |
48
|
|
|
|
49
|
|
|
<?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [ |
50
|
|
|
'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>', |
51
|
|
|
])->label(Yii::t('adminlte', 'Verification Code')) ?> |
52
|
|
|
|
53
|
|
|
<?= Html::beginTag('div', ['class' => 'footer']) ?> |
54
|
|
|
<?= Html::submitButton(Yii::t('adminlte', 'Submit'), ['class' => 'btn bg-black btn-block', 'name' => 'contact-button']) ?> |
55
|
|
|
<?= Html::endTag('div') ?> |
56
|
|
|
<?php ActiveForm::end(); ?> |
57
|
|
|
<?= Html::endTag('div') ?> |
58
|
|
|
<?= Html::endTag('div') ?> |
|
|
|
|
59
|
|
|
|
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.