mirror of
https://github.com/janickiy/yii2-nomer
synced 2025-03-09 15:39:59 +00:00
add files to project
This commit is contained in:
commit
5cac498444
3729 changed files with 836998 additions and 0 deletions
31
views/try/check.php
Normal file
31
views/try/check.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\MaskedInput;
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
/* @var $user \app\models\User */
|
||||
|
||||
$user = \Yii::$app->getUser()->getIdentity();
|
||||
?>
|
||||
|
||||
<div class="search">
|
||||
<div class="clfix">
|
||||
<h2>Подтверждение номера</h2>
|
||||
|
||||
<p>Введите код из смс которая была отправлена на номер <?=$user->phone; ?></p><br />
|
||||
|
||||
<?=Html::beginForm(["try/check"]);?>
|
||||
|
||||
<?= MaskedInput::widget([
|
||||
'name' => 'code',
|
||||
'mask' => '9 9 9 9',
|
||||
'options' => [
|
||||
'type' => 'tel',
|
||||
'class' => 'searchPhone searchPhoneMain',
|
||||
'placeholder' => '_ _ _ _'
|
||||
]
|
||||
]); ?>
|
||||
<input type="submit" class="searchBtn inpBtn" value="Подтвердить">
|
||||
<?=Html::endForm();?>
|
||||
</div>
|
||||
</div>
|
36
views/try/index.php
Normal file
36
views/try/index.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\widgets\MaskedInput;
|
||||
|
||||
/* @var $this \yii\web\View */
|
||||
|
||||
/* @var $user \app\models\User */
|
||||
$user = \Yii::$app->getUser()->getIdentity();
|
||||
?>
|
||||
|
||||
<div class="search">
|
||||
<div class="clfix">
|
||||
<h2>Попробовать бесплатно</h2>
|
||||
|
||||
<?php if($user->is_test): ?>
|
||||
<p>К сожалению вы уже брали тестовый доступ :(</p><br />
|
||||
<?php else: ?>
|
||||
<p>На указанный ниже номер телефона придет смс с кодом подтверждения.</p><br />
|
||||
|
||||
<?=Html::beginForm(["try/index"]);?>
|
||||
|
||||
<?= MaskedInput::widget([
|
||||
'name' => 'phone',
|
||||
'mask' => '+7 ( 999 ) 999 - 99 - 99',
|
||||
'options' => [
|
||||
'type' => 'tel',
|
||||
'class' => 'searchPhone searchPhoneMain',
|
||||
'placeholder' => '+7 ( ___ ) ___ - __ - __'
|
||||
]
|
||||
]); ?>
|
||||
<input type="submit" class="searchBtn inpBtn" value="Попробовать">
|
||||
<?=Html::endForm();?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue