本文整理汇总了PHP中yii\bootstrap\Html::resetButton方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::resetButton方法的具体用法?PHP Html::resetButton怎么用?PHP Html::resetButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\bootstrap\Html
的用法示例。
在下文中一共展示了Html::resetButton方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
// echo $form->field($model, 'editor')
?>
<?php
// echo $form->field($model, 'updated_time')
?>
<?php
// echo $form->field($model, 'promotion')
?>
<?php
// echo $form->field($model, 'status')
?>
<div class="form-group">
<?php
echo Html::submitButton(Yii::t(Yii::$app->controller->module->id, 'Search'), ['class' => 'btn btn-primary']);
?>
<?php
echo Html::resetButton(Yii::t(Yii::$app->controller->module->id, 'Reset'), ['class' => 'btn btn-default']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
示例2:
?>
</div>
<div class="panel-body">
<?php
$form = ActiveForm::begin(['id' => 'change-password-form']);
?>
<?php
echo $form->field($resetPasswordForm, 'password')->passwordInput();
?>
<?php
echo $form->field($resetPasswordForm, 'confirmPassword')->passwordInput();
?>
<div class="form-group">
<?php
echo Html::resetButton(Yii::t('user', 'Cancel'), ['class' => 'btn btn-default']);
?>
<?php
echo Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-success']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading no-bottom-border">
<?php
示例3: isset
$newComment->parent_id = 0;
$this->registerJsFile(Yii::$app->request->baseUrl . '/js/comment/comment.js', ['depends' => [\yii\web\JqueryAsset::className()]]);
$thisUser = User::thisUser();
?>
<div id="blockComments">
<div class="row margin-bottom">
<div class="col-md-12">
<?php
if (!Yii::$app->user->isGuest && $thisUser->reputation >= Comment::MIN_REPUTATION_COMMENT_CREATE) {
$form = ActiveForm::begin(['action' => ['comment/add'], 'id' => 'main-comment-form']);
echo $form->field($newComment, 'entity')->hiddenInput()->label(false);
echo $form->field($newComment, 'entity_id')->hiddenInput()->label(false);
echo $form->field($newComment, 'parent_id')->hiddenInput(['class' => 'comment-parent-id'])->label(false);
echo $form->field($newComment, 'description', ['inputOptions' => ['class' => 'form-control', 'placeholder' => Lang::t('main/comments', 'addCommentDescription')]])->textarea()->label(false);
echo Html::submitButton(Lang::t('main/comments', 'buttonAddComment'), ['class' => 'btn btn-primary pull-right', 'name' => 'list-add-button']);
echo Html::resetButton(Lang::t('main/comments', 'buttonCancelComment'), ['class' => 'btn btn-default pull-right btn-cancel-comment', 'style' => 'margin-right: 10px;']);
ActiveForm::end();
}
?>
</div>
</div>
<div class="row">
<?php
foreach ($comments as $comment) {
echo $this->render('view', ['comment' => $comment, 'voteItem' => isset($voteItems[$comment->id]) ? $voteItems[$comment->id] : null]);
echo "<div class='col-md-12'><div class='row comment-reply-block'>";
if (!empty($commentsParent[$comment->id])) {
foreach (array_reverse($commentsParent[$comment->id]) as $commentReply) {
echo $this->render('view', ['comment' => $commentReply, 'voteItem' => isset($voteItems[$commentReply->id]) ? $voteItems[$commentReply->id] : null]);
}
示例4:
<?php
$form = \yii\widgets\ActiveForm::begin();
?>
<?php
echo $form->field($model, 'username')->label('用户名');
?>
<?php
echo $form->field($model, 'email')->label('邮箱');
?>
<?php
echo $form->field($model, 'password')->passwordInput()->label('密码');
?>
<?php
echo $form->field($model, 'repassword')->passwordInput()->label('确认密码');
?>
<div class="form-group">
<?php
echo \yii\helpers\Html::submitButton($model->isNewRecord ? '添加' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
<?php
echo \yii\bootstrap\Html::submitButton($model->isNewRecord ? '添加' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
<?php
echo \yii\bootstrap\Html::resetButton('重置', ['class' => "btn btn-default"]);
?>
</div>
<?php
\yii\widgets\ActiveForm::end();
?>
</div>