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


PHP Html::activeTextInput方法代码示例

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


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

示例1: run

 public function run()
 {
     echo Html::beginTag('div', ['class' => 'input-group']);
     if (!isset($this->options['class'])) {
         $this->options['class'] = 'form-control';
     }
     $iconId = 'icon-' . $this->options['id'];
     if (!isset($this->options['aria-describedby'])) {
         $this->options['aria-describedby'] = $iconId;
     }
     if ($this->hasModel()) {
         $replace['{input}'] = Html::activeTextInput($this->model, $this->attribute, $this->options);
     } else {
         $replace['{input}'] = Html::textInput($this->name, $this->value, $this->options);
     }
     if ($this->icon != '') {
         $replace['{icon}'] = Html::tag('span', Icon::show($this->icon, [], Icon::FA), ['class' => 'input-group-addon', 'id' => $iconId]);
     }
     echo strtr($this->template, $replace);
     echo Html::endTag('div');
     $view = $this->getView();
     Assets::register($view);
     $idMaster = $this->hasModel() ? Html::getInputId($this->model, $this->fromField) : $this->fromField;
     $idSlave = $this->options['id'];
     $view->registerJs("\n        \$('#{$idMaster}').syncTranslit({\n            destination: '{$idSlave}',\n            type: 'url',\n            caseStyle: 'lower',\n            urlSeparator: '-'\n        });");
 }
开发者ID:sibds,项目名称:yii2-synctranslit,代码行数:26,代码来源:translitInput.php

示例2:

?>
</div>
            <?php 
echo Html::activeDropDownList($model, 'expiration_month', $months, ['class' => 'form-control', 'style' => 'width:60%;display:inline-block;padding-left:6px;']);
?>
            <?php 
echo Html::activeDropDownList($model, 'expiration_year', $years, ['class' => 'form-control', 'style' => 'width:38%;display:inline-block;padding-left:6px;']);
?>
        </div>
        <div class="col-sm-3">
            <div style="margin-bottom: 4px;"><?php 
echo Yii::t('app', 'Security Code');
?>
</div>
            <?php 
echo Html::activeTextInput($model, 'security_code', ['class' => 'form-control']);
?>
        </div>
    </div>


    <div class="row" style="margin-top: 10px;">
        <div class="col-xs-12">
            <button type="button" id="btn-add-payment-save" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span> <?php 
echo Yii::t('app', 'Save Credit Card');
?>
</button>
            <?php 
if (!empty($payments)) {
    ?>
                <button type="button" id="btn-add-payment-cancel" class="btn btn-defaul"><?php 
开发者ID:rcjusto,项目名称:simplestore,代码行数:31,代码来源:_sc_payment.php

示例3:

        <div class="col-sm-4">
            <div style="margin-bottom: 4px;"><?php 
echo Yii::t('app', 'Email Address');
?>
</div>
            <?php 
echo Html::activeTextInput($model, 'shipping_email', ['class' => 'form-control']);
?>
        </div>
        <div class="col-sm-4">
            <div style="margin-bottom: 4px;"><?php 
echo Yii::t('app', 'Phone Number');
?>
</div>
            <?php 
echo Html::activeTextInput($model, 'shipping_phone', ['class' => 'form-control']);
?>
        </div>

    </div>

    <div class="row" style="margin-top: 10px;">
        <div class="col-xs-12">
            <?php 
if (!empty($model->id)) {
    ?>
                <a href="<?php 
    echo Url::to(['shopcart/destination-delete', 'id' => $model->id]);
    ?>
" id="btn-destination-delete" class="btn btn-default" style="float: right" ><span class="glyphicon glyphicon-remove"></span> <?php 
    echo Yii::t('app', 'Delete');
开发者ID:rcjusto,项目名称:simplestore,代码行数:31,代码来源:_sc_destination.php

示例4:

use yii\bootstrap\Html;
$model = new \app\models\LoginForm();
?>
<div class="container">
    <div class="row">
        <div class="col-lg-2 hidden-md hidden-sm hidden-xs" style="text-align: right;line-height: 46px;"><span class="ya-registrado"><?php 
echo Yii::t('app', 'Registered?');
?>
</span></div>
        <?php 
$form = ActiveForm::begin(['action' => \yii\helpers\Url::to(['site/login']), 'method' => 'post', 'id' => 'formLogin']);
?>
        <div class="col-lg-3 has-field">
            <div style="height: 8px;"></div>
            <?php 
echo Html::activeTextInput($model, 'username', ['class' => 'input-username form-control input-sm', 'placeholder' => Yii::t('app', 'Email address')]);
?>
        </div>
        <div class="col-lg-2 has-field">
            <div style="height: 8px;"></div>
            <?php 
echo Html::activePasswordInput($model, 'password', ['class' => 'input-password form-control input-sm', 'placeholder' => Yii::t('app', 'Password')]);
?>
        </div>
        <div class="col-lg-1 has-field">
            <div style="height: 8px;"></div>
            <input type="submit" value="<?php 
echo Yii::t('app', 'Submit');
?>
" class="btn btn-primary btn-sm input-sm form-control">
            <div style="height: 8px;"></div>
开发者ID:rcjusto,项目名称:simplestore,代码行数:31,代码来源:_top_user_login.php

示例5:

                    <div class="input-group extra">
                        <?php 
echo $form->field($model, 'places')->listBox($model->placesTypes, ['class' => 'chosen', 'multiple' => true]);
?>
                        <?php 
echo Html::activeTextInput($model, 'otherPlaces', ['placeholder' => 'Другой вариант (указать)', 'class' => 'form-control']);
?>
                    </div>
                    <div class="input-group">
                        <a class="clear-btn" href="#">Сбросить</a>
                    </div>
                </div>
                <div class="col-sm-3 custom">
                    <div class="input-group">
                        <label>контактная информация</label>
                        <?php 
echo Html::activeTextInput($model, 'name', ['placeholder' => 'имя', 'class' => 'form-control']);
?>
                        <?php 
echo Html::activeTextInput($model, 'phone', ['placeholder' => 'телефон', 'class' => 'form-control']);
?>
                        <?php 
echo Html::activeTextInput($model, 'email', ['placeholder' => 'e-mail', 'class' => 'form-control']);
?>
                        <input type="submit" class="y-btn" value="отправить заказ"/>
                    </div>
                </div>
            </div>
        </div>
    </form>
</section>
开发者ID:egor-pisarev,项目名称:altodis,代码行数:31,代码来源:order-form.php

示例6:

            <hr>
            <br>
            <div class="row">
                <div class="col-md-8"> <?php 
echo $form->field($model, 'name')->textInput(['id' => 'space-name', 'placeholder' => Yii::t('SpaceModule.views_create_create', 'space name'), 'maxlength' => 45]);
?>
</div>
                <div class="col-md-4">            <strong><?php 
echo Yii::t('SpaceModule.views_create_create', 'Color');
?>
</strong>

                    <div class="input-group space-color-chooser" style="margin-top: 5px;">

                        <?php 
echo Html::activeTextInput($model, 'color', ['class' => 'form-control', 'id' => 'space-color-picker', 'value' => '#000000']);
?>
                        <span class="input-group-addon"><i></i></span>
                    </div>
                    <br></div>
            </div>

            <?php 
echo $form->field($model, 'description')->textarea(['placeholder' => Yii::t('SpaceModule.views_create_create', 'space description'), 'rows' => '3']);
?>

            <a data-toggle="collapse" id="access-settings-link" href="#collapse-access-settings"
               style="font-size: 11px;"><i
                    class="fa fa-caret-right"></i> <?php 
echo Yii::t('SpaceModule.views_create_create', 'Advanced access settings');
?>
开发者ID:gautamkrishnar,项目名称:humhub-openshift-quickstart,代码行数:31,代码来源:create.php

示例7:

echo Yii::t('app', 'Welcome');
?>
</h2>
    <p><?php 
echo Yii::t('app', 'Enter your credentials to access your orders.');
?>
</p>
    <?php 
echo !empty($loginError) ? Html::tag('div', $loginError, ['class' => 'alert alert-danger']) : '';
?>
    <label for="inputEmail" class="sr-only"><?php 
echo Yii::t('app', 'Email address');
?>
</label>
    <?php 
echo Html::activeTextInput($model, 'username', ['id' => 'inputEmail', 'class' => 'form-control', 'placeholder' => Yii::t('app', 'Email address'), 'required' => '', 'autofocus' => '']);
?>
    <label for="inputPassword" class="sr-only"><?php 
echo Yii::t('app', 'Password');
?>
</label>
    <?php 
echo Html::activePasswordInput($model, 'password', ['id' => 'inputPassword', 'class' => 'form-control', 'placeholder' => Yii::t('app', 'Password'), 'required' => '']);
?>
    <button class="btn btn-lg btn-primary btn-block" type="submit"><?php 
echo Yii::t('app', 'Sign In');
?>
</button>
    <div style="margin: 10px;">
        <a href="#" onclick="$('#form-password').show();$('#form-login').hide();return false"><?php 
echo Yii::t('app', 'Forgot My Password');
开发者ID:rcjusto,项目名称:simplestore,代码行数:31,代码来源:login.php

示例8: reset

            <?php 
echo Yii::t('hipanel:domain', 'IP addresses can be assigned to child name servers only.');
?>
            <?php 
echo Yii::t('hipanel:domain', 'Child name servers are created or changed automatically according to specified data.');
?>
        </p>
    </div>

    <div class="row" style="margin-top: 15pt;">
        <div class="col-md-10 inline-form-selector">
            <?php 
if (!is_array($model)) {
    ?>
                <?php 
    echo Html::activeTextInput($model, 'nsips', ['class' => 'form-control', 'placeholder' => $model->getAttributeLabel('nameservers'), 'autocomplete' => 'off']);
    ?>
            <?php 
} else {
    ?>
                <?php 
    echo Html::textInput('nsips', '', ['class' => 'form-control', 'placeholder' => reset($model)->getAttributeLabel('nameservers'), 'autocomplete' => 'off']);
    ?>
            <?php 
}
?>
        </div>
        <div class="col-md-2 text-right">
            <?php 
echo Html::submitButton(Yii::t('hipanel', 'Save'), ['class' => 'btn btn-success', 'id' => 'nss-save-button', 'data-loading-text' => '<i class="fa fa-circle-o-notch fa-spin"></i> ' . Yii::t('hipanel', 'saving')]);
?>
开发者ID:hiqdev,项目名称:hipanel-module-domain,代码行数:31,代码来源:ns.php


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