当前位置: 首页>>代码示例>>PHP>>正文


PHP Html::submitInput方法代码示例

本文整理汇总了PHP中yii\helpers\Html::submitInput方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::submitInput方法的具体用法?PHP Html::submitInput怎么用?PHP Html::submitInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\helpers\Html的用法示例。


在下文中一共展示了Html::submitInput方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     $model = $this->model;
     $input = Html::input('text', 'code', '', ['class' => 'input buy']);
     //$button = Html::submitButton('В корзину', ['class' => 'btn btn-lg ', 'name' => 'buy-button']);
     $button = Html::submitInput('В корзину', ['class' => 'btn btn-primary', 'name' => 'buy-button']);
     return Html::tag('div', $input . ' ' . $button, ['class' => 'buy-button']);
 }
开发者ID:slam-mt,项目名称:yii2-shop,代码行数:8,代码来源:Buy.php

示例2: run

 public function run()
 {
     $model = new \frontend\models\Search();
     $form = ActiveForm::begin(['action' => '/search']);
     echo $form->field($model, 'search', ['template' => '{error}{input}'])->textInput()->label(false);
     echo Html::submitInput('', ['class' => 'search_submit']);
     ActiveForm::end();
 }
开发者ID:kuzma17,项目名称:asu,代码行数:8,代码来源:Search.php

示例3: saveStay

 /**
  * Adds a save button. When clicked the form will be submitted with the $_POST value
  * of "saveAndStay". Use [[stayAfterSave()]] to redirect appropriately in a controller.
  * 
  * This method MUST be called within a form as it renders a hidden form field. The
  * hidden field is used to save the form with a submit button outside the form. 
  *
  * @param string $text a text for the button.
  * @param string $icon name of an icon type to use
  * @param array $options additional tag options
  * @return Toolbar the current toolbar instance to support chaining.
  */
 public function saveStay($text = null, $icon = 'refresh', $options = [])
 {
     if ($text === null) {
         $text = Yii::t('cms/toolbar', 'Update');
     }
     Yii::$app->getView()->registerJs('
         $("#save-stay-button").click(function(e){
             $("#' . static::POST_VAR_SAVE_STAY . '").val("1");
         });
         $("#save-button").click(function(e){
             $("#' . static::POST_VAR_SAVE_STAY . '").val("0");
         });
     ');
     $this->items[] = Html::label($this->createText($icon, $text), 'save-stay-button', $this->createButtonOptions($options));
     echo Html::submitInput('saveStay', ['style' => 'display:none;', 'id' => 'save-stay-button']);
     echo Html::hiddenInput(static::POST_VAR_SAVE_STAY, '', ['id' => static::POST_VAR_SAVE_STAY]);
     return $this;
 }
开发者ID:bigbrush,项目名称:yii2-cmf,代码行数:30,代码来源:Toolbar.php

示例4:

<?php

use yii\widgets\ActiveForm;
use yii\helpers\Html;
$this->title = Yii::t('app', 'USER_PROFILE_UPDATE');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'USER_PROFILE_TITLE'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?php 
$form = ActiveForm::begin();
echo $form->field($model, 'email');
echo Html::submitInput(Yii::t('app', 'BTN_SAVE'), ['class' => 'btn btn-success']);
ActiveForm::end();
开发者ID:kvaxminsk,项目名称:belpharma2,代码行数:14,代码来源:update.php

示例5: testSubmitInput

 public function testSubmitInput()
 {
     $this->assertEquals('<input type="submit" value="Submit">', Html::submitInput());
     $this->assertEquals('<input type="submit" class="a" name="test" value="text">', Html::submitInput('text', ['name' => 'test', 'class' => 'a']));
 }
开发者ID:rajanishtimes,项目名称:basicyii,代码行数:5,代码来源:HtmlTest.php

示例6:

$template = <<<STD
                        <div class="form-group field-user-password required has-error">
                            <div class="col-lg-6">{input}</div>
                            <label class="col-lg-3 control-label" for="user-password">{image}</label>
                        </div>
STD;
echo $form->field($model, 'captcha')->widget(Captcha::className(), ['captchaAction' => '/admin/public/captcha', 'template' => $template, 'imageOptions' => ['style' => 'width: 80px; height: 30px;']]);
?>

                <div class="form-group">

                    <!--<input type="submit" value="登录" class="btn btn-success center-block">-->

                    <div class="col-lg-offset-3 col-lg-11">
                        <?php 
echo Html::submitInput('登录', ['class' => 'btn btn-success ']);
?>
                    </div>
                </div>
            </div>
            <?php 
\yii\widgets\ActiveForm::end();
?>
        </div>
    </div>

</div>



开发者ID:xiaohongyang,项目名称:yii_shop,代码行数:27,代码来源:login.php

示例7:

			<div class="login-head">欢迎来到名坡绿茶,我们将竭诚为你服务。</div>
			<div class="login-con">
				<?php 
$form = ActiveForm::begin(['id' => 'login-form', 'options' => ['class' => 'login-form']]);
?>
					<?php 
echo $form->field($model, 'mobile')->textInput(['class' => 'login-text', 'placeholder' => '手机号码/昵称'])->label('');
?>
					<?php 
echo $form->field($model, 'password')->passwordInput(['class' => 'login-paw', 'placeholder' => '密码'])->label('');
?>
					<?php 
echo $form->field($model, 'verifyCode')->widget(Captcha::className(), ['template' => '<div>{image}{input}</div>', 'imageOptions' => ['alt' => '验证码', 'class' => 'login-obtain'], 'captchaAction' => 'site/captcha', 'options' => ['class' => 'login-yzm', 'placeholder' => '验证码']])->label('');
?>
					<?php 
echo Html::submitInput('登录', ['class' => 'login-btn', 'name' => 'login-button']);
?>
				<?php 
ActiveForm::end();
?>
				<a href="<?php 
echo \common\widgets\FVariable::$siteForgetpsw_url;
?>
" class="login-forget">忘记密码?</a>
				<div class="login-bottom">
					还没有账号?<a href="<?php 
echo \common\widgets\FVariable::$siteRegister_url;
?>
">注册</a>
				</div>
			</div>
开发者ID:jaybril,项目名称:www.mimgpotea.com,代码行数:31,代码来源:login.php

示例8:

?>


<!--                --><?php 
//= $form->field($model, 'rememberMe',
//                    ['template' => '<div class=\"checkbox\">{input}</div>'])->checkbox()
?>
<!--                --><?php 
////= $form->field($model, 'rememberMe')->checkbox()
?>
<!--                <input id="check" type="checkbox" class = "checkbox" checked="checked">-->
<!--                <label for="check">Запомнить меня</label>-->
        <div class="checkbox">
            <input id="check" type="checkbox" class="checkbox" checked="checked">
            <label for="check">Запомнить меня</label>
        </div>
            <p class="button">
                <?php 
echo Html::submitInput(Yii::t('app', 'Login'));
?>
            </p>
                <div class="form-footer">
                    <a href="/request-password-reset">Забыли пароль?</a>
                    <span><img src="img/arrow-new.png" alt=""><a href="http://evolineplus.by">Вернуться на главную</a></span>
                </div>
        <?php 
ActiveForm::end();
?>
    </div>
</main>
<!--End Content-->
开发者ID:kvaxminsk,项目名称:evo8,代码行数:31,代码来源:login.php

示例9:

            <?php 
echo $form->field($user, 'username', ['template' => "<div class=\"field field-email text-field\">{input}<div class=\"status-box\"></div></div><div class=\"error-msg\">{error}</div>"])->textInput(['placeholder' => 'Email*']);
?>

            <?php 
echo $form->field($user, 'password', ['template' => "<div class=\"field field-pass text-field\">{input}<div class=\"status-box\"></div></div><div class=\"error-msg\">{error}</div>"])->passwordInput(['placeholder' => 'Пароль*']);
?>

            <?php 
echo $form->field($user, 'rememberMe', ['template' => "<div class=\"field field-remember checkbox-field\">{input}</div>"])->checkbox();
?>

            <div class="field field-submit field-submit-login">
                <?php 
echo Html::submitInput(Yii::t('user', 'Войти'), ['class' => '']);
?>
            </div>

            <div class="field field-link field-link-login">
                <?php 
echo Html::a(Yii::t("user", "Напомнить пароль"), ["/user/forgot"]);
?>
            </div>

            <div class="form-description">
                <span class="main-blue">*</span> - поля обязательны для заполнения
            </div>

        <?php 
ActiveForm::end();
开发者ID:alexsynytskiy,项目名称:Dynamomania,代码行数:30,代码来源:login_block.php

示例10:

    echo $form->field($user, 'newPasswordConfirm', ['template' => '<div class="field field-pass2 text-field">{input}<div class="status-box"></div></div><div class="error-msg">{error}</div>'])->passwordInput(['placeholder' => 'Повторите пароль*']);
    ?>

        <!-- <div class="preview-image"></div> -->

        <?php 
    echo $form->field($user, 'avatar', ['template' => '<div class="preview-image"></div><div class="error-msg">{error}</div>' . '<div class="field field-avatar upload-button">' . '<div class="field-label">Аватар</div>{input}</div>'])->fileInput();
    ?>
                
        <?php 
    echo $form->field($user, 'cropData')->hiddenInput(['id' => 'crop-data'])->label(false);
    ?>

        <div class="field field-submit field-submit-register">
            <?php 
    echo Html::submitInput('Зарегистрировать', ['class' => 'btn-register']);
    ?>
        </div>
        <div class="form-description">
            <span class="main-blue">*</span> - поля обязательны для заполнения
        </div>

        <?php 
    ActiveForm::end();
    ?>

    <?php 
}
?>

    </div>
开发者ID:alexsynytskiy,项目名称:Dynamomania,代码行数:31,代码来源:register_block.php

示例11:

    echo Alert::widget(['options' => ['class' => 'alert-success'], 'body' => 'Профиль изменён.']);
}
?>
<h1 class="text-center">Изменение профиля</h1>
<div class="row">
    <div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
        <?php 
$form = ActiveForm::begin();
?>
            <?php 
echo $form->field($profileModel, 'email')->textInput(['maxlength' => 255]);
?>
            <?php 
echo $form->field($profileModel, 'name')->textInput(['maxlength' => 60]);
?>
            <?php 
echo $form->field($profileModel, 'password')->passwordInput(['maxlength' => 255])->hint('Оставьте поле пустым если не хотите его менять');
?>

            <div class="form-group">
                <?php 
echo Html::submitInput('Сохранить', ['class' => 'btn btn-success']);
?>
            </div>
        <?php 
ActiveForm::end();
?>
    </div>
</div>

开发者ID:Sywooch,项目名称:notes,代码行数:29,代码来源:profile.php

示例12:

        <?php 
    $form = ActiveForm::begin(['options' => ['class' => 'default-form complain-form']]);
    ?>
        
            <div class="user-photo">
                <a href="<?php 
    echo Url::to(['user/profile']);
    ?>
"><img src="<?php 
    echo $avatar->getFileUrl();
    ?>
"></a>
            </div>
            <div class="field textarea-field comment-field">
                <?php 
    echo $form->field($claim, 'message')->textArea(['maxlength' => 255, 'placeholder' => 'Введите ваше сообщение', 'class' => 'autosize'])->label(false);
    ?>
            </div>

            <div class="field field-submit">
                <?php 
    echo Html::submitInput('Пожаловаться');
    ?>
            </div>
        
        <?php 
    ActiveForm::end();
    ?>
    </div>
<?php 
}
开发者ID:alexsynytskiy,项目名称:Dynamomania,代码行数:31,代码来源:complain_form.php

示例13:

            <?php 
$form = ActiveForm::begin([]);
?>

                <?php 
echo $form->field($model, 'user_name')->textInput();
?>
                <?php 
echo $form->field($model, 'email')->textInput();
?>
                <?php 
echo $form->field($model, 'password')->passwordInput();
?>



            <?php 
echo Html::submitInput("立即注册", ['class' => 'btn btn-primary']);
?>

            <?php 
ActiveForm::end();
?>
        </div>

    </div>

</div>


开发者ID:xiaohongyang,项目名称:yii_shop,代码行数:28,代码来源:register.php

示例14: renderSubmit

function renderSubmit()
{
    return Html::submitInput(null, ['class' => 'btn btn-primary']);
}
开发者ID:bangkok,项目名称:member_api,代码行数:4,代码来源:index.php

示例15: ActiveDataProvider

ActiveForm::end();
?>
	</div>
	<?php 
if (!Yii::$app->user->isGuest) {
    ?>
	<div class="row">
		<div class="col-md-6">
			<?php 
    $form = ActiveForm::begin(['id' => 'commentForm']);
    ?>
			<?php 
    echo $form->field($model, 'body', ['options' => ['id' => 'commentBody']])->textarea(['id' => 'CommentForm[body]']);
    ?>
			<?php 
    echo Html::submitInput(\Yii::t('app', 'Отправить'), ['class' => 'btn btn-primary']);
    ?>
			<?php 
    ActiveForm::end();
    ?>
		</div>
	</div>
	<?php 
}
?>
	<?php 
$provider = new ActiveDataProvider(['query' => $comments, 'pagination' => ['pageSize' => 10]]);
?>
	<div id="comments" style="padding: 2%;"	>
		<?php 
foreach ($provider->getModels() as $comment) {
开发者ID:kazachka,项目名称:photo-yii-site,代码行数:31,代码来源:image.php


注:本文中的yii\helpers\Html::submitInput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。