Пример #1
0
 /**
  * Registers the needed JavaScript.
  */
 public function registerClientScript()
 {
     $options = $this->getClientOptions();
     $options = empty($options) ? '' : Json::htmlEncode($options);
     $id = $this->imageOptions['id'];
     $view = $this->getView();
     CaptchaAsset::register($view);
     $view->registerJs("jQuery('#{$id}').yiiCaptcha({$options});");
 }
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\captcha\Captcha;
use yii\captcha\CaptchaAsset;
/**
 * @var yii\web\View $this
 * @var yii\widgets\ActiveForm $form
 * @var common\models\User $model
 *
 */
$this->title = Yii::t('maddoger/user', 'Request password reset');
$this->params['breadcrumbs'][] = $this->title;
CaptchaAsset::register($this);
?>
<div class="site-request-password-reset row">
	<div class="col-md-6 col-md-offset-3">
		<h2><?php 
echo Html::encode($this->title);
?>
</h2>

		<p><?php 
echo Yii::t('maddoger/user', 'Please fill out your email. A link to reset password will be sent there.');
?>
</p>

		<div>
			<?php 
$form = ActiveForm::begin(['id' => 'request-password-reset-form']);