本文整理汇总了PHP中TbHtml::btn方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::btn方法的具体用法?PHP TbHtml::btn怎么用?PHP TbHtml::btn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml
的用法示例。
在下文中一共展示了TbHtml::btn方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* 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);
}
}
示例2: array
<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 -->
示例3: array
<?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>
示例4: render
/**
* Returns this button.
* @return string the rendering result.
*/
public function render()
{
return TbHtml::btn($this->type, $this->label, $this->attributes);
}
示例5: array
//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>