/** * Returns this button. * @return string the rendering result. */ public function render() { $attributes = $this->attributes; $attributes['name'] = $this->name; if (isset(self::$coreTypes[$this->type])) { $type = self::$coreTypes[$this->type]; return TbHtml::btn($type, $this->label, $attributes); } else { return $this->getParent()->getOwner()->widget($this->type, $attributes, true); } }
<div class="row"> <div class="span6 offset3 well"> <h3 class="text-center"><?php echo Yii::t('app', 'Recovery user password'); ?> </h3> <?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'recovery-password-form', 'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL)); ?> <p class="muted text-center"> <?php echo Yii::t('app', 'Please input your email address below, you will be sent a link to reset your password.'); ?> <?php echo $form->errorSummary($model); ?> <?php echo $form->textFieldControlGroup($model, 'email', array('class' => 'span4', 'placeholder' => Yii::t('app', 'email'))); ?> <?php echo TbHtml::formActions(array(TbHtml::submitButton(Yii::t('user', 'Recovery password'), array('color' => TbHtml::BUTTON_COLOR_SUCCESS)), TbHtml::btn(TbHtml::BUTTON_TYPE_LINK, Yii::t('user', 'Remember password?'), array('color' => TbHtml::BUTTON_COLOR_LINK, 'url' => '/user/login')))); ?> <?php $this->endWidget(); ?> </div> </div><!-- form -->
<?php echo $form->errorSummary($model); ?> <?php echo $form->textFieldControlGroup($model, 'username', array('placeholder' => Yii::t('app', 'username'))); ?> <?php echo $form->textFieldControlGroup($model, 'email', array('placeholder' => Yii::t('app', 'email'))); ?> <?php echo $form->passwordFieldControlGroup($model, 'password', array('placeholder' => Yii::t('app', 'password'))); ?> <?php echo TbHtml::formActions(array(TbHtml::submitButton(Yii::t('user', 'Sign Up!'), array('color' => TbHtml::BUTTON_COLOR_SUCCESS)))); ?> <?php $this->endWidget(); ?> <div class="well"> <div class="span3 offset1"> <?php echo TbHtml::btn(TbHtml::BUTTON_TYPE_LINK, Yii::t('user', 'Already registered?'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'url' => '/user/login')); ?> </div> </div> </div> </div>
/** * Returns this button. * @return string the rendering result. */ public function render() { return TbHtml::btn($this->type, $this->label, $this->attributes); }
//echo $form->errorSummary($model); ?> <?php echo $form->textFieldControlGroup($model, 'username', array('class' => 'span3', 'placeholder' => Yii::t('user', 'username or email'))); ?> <?php echo $form->passwordFieldControlGroup($model, 'password', array('class' => 'span3', 'placeholder' => Yii::t('user', 'password'))); ?> <?php echo TbHtml::formActions(array(TbHtml::submitButton(Yii::t('user', 'Log In'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY)), TbHtml::btn(TbHtml::BUTTON_TYPE_LINK, Yii::t('user', 'Forgot password?'), array('color' => TbHtml::BUTTON_COLOR_LINK, 'url' => '/user/passrecovery')))); ?> <?php $this->endWidget(); ?> <div class='well'> <div class="span2"><?php echo Yii::t('user', 'New user?'); ?> </div> <div class="span2"> <?php echo TbHtml::btn(TbHtml::BUTTON_TYPE_LINK, Yii::t('user', 'Sign Up!'), array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'url' => '/user/registration')); ?> </div> </div> </div> </div>