/** * Инициализация кнопки * @param \frontend\models\Market $market * @return string|void */ public function initBuy(\frontend\models\Market $market = null) { if ($market && isset($market->settings)) { $settings = json_decode($market->settings, true); } else { $settings = array(); } $xml_structure = $this->getStructure(); $html = \yii\bootstrap\Html::beginForm('?r=payqr/button/create' . (isset($market->id) ? "&market_id=" . $market->id : ""), 'post', []); $html .= \yii\bootstrap\Html::csrfMetaTags(); //инициализируем общие настройки кнопки foreach ($xml_structure as $row) { if (isset($row['field'][0]['@attributes']['value']) && !$this->buttonStructure($row)) { $html .= $this->generateHtml($row, $settings); } } //инициализиурем параметры кнопки в соответствии с местом отображения foreach ($this->ShowInPlace as $place => $placeTranslate) { foreach ($this->buttonXmlStructure as $xmlrow) { $html .= $this->generateHtml($xmlrow, $settings, array(0 => $place, 1 => $placeTranslate)); } } $html .= \yii\bootstrap\Html::submitButton('Сохранить'); $html .= \yii\bootstrap\Html::endForm(); return $html; }
public function submitButton($label, $options = []) { $buttonStr = Html::submitButton($label, array_merge($options, ['class' => 'btn btn-primary'])); if ($this->layout == 'horizontal') { return "<div class=\"form-group\"><div class=\"col-sm-offset-3 col-sm-6\">{$buttonStr}</div></div>"; } else { return "<div class=\"form-group\">{$buttonStr}</div>"; } }
public function run() { $formId = $this->formOptions['id']; $this->getView()->registerCss("#{$formId} button {-webkit-box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);}"); $form = ActiveForm::begin(array_merge($this->defaultFormOptions, $this->formOptions)); print Html::beginTag('div', ['class' => 'row']); print Html::beginTag('div', ['class' => 'col-xs-12']); print Html::beginTag('div', ['class' => 'input-group']); if ($this->inputWidget) { print $form->field($this->model, $this->attribute, ['template' => '{input}'])->widget($this->inputWidget, $this->inputOptions); } else { print $form->field($this->model, $this->attribute, ['template' => '{input}'])->input($this->inputType, array_merge(['placeholder' => $this->model->getAttributeLabel($this->attribute), 'class' => 'form-control'], $this->inputOptions)); } print Html::beginTag('span', ['class' => 'input-group-btn']); print Html::submitButton(Yii::t('hipanel', 'Search'), ['class' => 'btn btn-flat ' . $this->buttonColor]); print Html::endTag('span'); print Html::endTag('div'); print Html::endTag('div'); print Html::endTag('div'); ActiveForm::end(); }
public function run() { parent::run(); $content = Html::submitButton($this->model->isNewRecord ? self::t('messages', 'Create') : self::t('messages', 'Update'), ['class' => $this->model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); $jsCreateClose = <<<JS var action = \$(this).parents('form').attr('action'); var submitButton = \$(this).parent().find('button[type=submit]'); \$(this).parents('form').attr('action', action + '&close=true'); submitButton.click(); return false; JS; $content .= ' ' . Html::a($this->model->isNewRecord ? self::t('messages', 'Create and close') : self::t('messages', 'Update and close'), '#', ['class' => 'btn btn-default btn-sm', 'onclick' => $jsCreateClose]); $returnUrl = null; if (\Yii::$app->controller->defaultAction === null) { $returnUrl = \Yii::$app->user->returnUrl; } else { $returnUrl = [\Yii::$app->controller->defaultAction]; } $content .= ' ' . Html::a(self::t('messages', 'Close'), $returnUrl, ['class' => 'btn btn-default btn-sm']); $content = Html::tag('div', $content, ['class' => 'col-sm-8']) . Html::tag('div', $this->getInfoRecord(), ['class' => 'col-sm-4 text-right']); return Html::tag('div', $content, ['class' => 'form-group well row']); }
?> <div style="margin-top: 50px;"> <?php echo !empty($passwordInfo) ? Html::tag('div', $passwordInfo, ['class' => 'alert alert-success']) : ''; ?> <h4><?php echo Yii::t('app', 'Change Your Password'); ?> </h4> <?php echo !empty($passwordError) ? Html::tag('div', $passwordError, ['class' => 'alert alert-danger']) : ''; ?> <div class="row"> <div class="col-xs-6"> <?php echo Html::passwordInput('password', '', ['class' => 'form-control', 'placeholder' => Yii::t('app', 'Enter new password')]); ?> </div> <div class="col-xs-6"> <?php echo Html::submitButton(Yii::t('app', 'Update Password'), ['class' => 'btn btn-primary']); ?> </div> </div> </div> <?php ActiveForm::end(); ?> </div> </div>
<div class="tag-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'slug')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'comment')->textarea(); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? Yii::t('backend', 'Create') : Yii::t('backend', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
<?php if ($model->isAttributeSafe('currentPassword')) { ?> <?php echo $form->field($model, 'currentPassword')->passwordInput(['maxlength' => 45]); ?> <hr> <?php } ?> <?php echo $form->field($model, 'newPassword')->passwordInput(['maxlength' => 45]); ?> <?php echo $form->field($model, 'newPasswordConfirm')->passwordInput(['maxlength' => 45]); ?> <hr> <?php echo Html::submitButton(Yii::t('UserModule.views_account_changePassword', 'Save'), array('class' => 'btn btn-primary', 'data-ui-loader' => '')); ?> <?php echo \humhub\widgets\DataSaved::widget(); ?> <?php ActiveForm::end(); $this->endContent();
?> </span> <span class="input-group-addon" id="basic-addon1"> Название </span> <?php echo Html::textInput('newWorkName', null, ['class' => 'form-control']); ?> <span class="input-group-addon" id="basic-addon1"> Руководитель </span> <?php echo Html::dropDownList('newWorkTeacher', null, $teachersArr, ['class' => 'form-control']); ?> </div> </div> <div class="form-group"> <div class="col-lg-12"> <?php echo Html::submitButton('Сохранить', ['class' => 'btn btn-primary']); ?> </div> </div> <?php ActiveForm::end(); Pjax::end(); ?> </div>
</div> <div class="panel-body"> <p><?php echo Yii::t('InstallerModule.views_config_sample-data', 'To avoid a blank dashboard after your initial login, HumHub can install example contents for you. Those will give you a nice general view of how HumHub works. You can always delete the individual contents.'); ?> </p> <br> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'sampleData')->checkbox(); ?> <hr> <?php echo Html::submitButton(Yii::t('base', 'Next'), array('class' => 'btn btn-primary', 'data-ui-loader' => '')); ?> <?php ActiveForm::end(); ?> </div> </div>
</div> <?php if (!Yii::$app->user->isGuest && Yii::$app->user->identity->isadmin) { ?> <div class="row"> <?php $form = \kartik\form\ActiveForm::begin(['type' => 'inline']); echo $form->field($model, 'airline')->textInput(['style' => 'width: 100px;']); echo $form->field($model, 'flightnumber')->textInput(['style' => 'width: 100px;']); echo $form->field($model, 'gate')->textInput(['style' => 'width: 100px;']); echo $form->field($model, 'aircraft')->textInput(['style' => 'width: 100px;']); echo $form->field($model, 'icaofrom')->textInput(['style' => 'width: 100px;', 'readonly' => !$model->isarrival]); echo $form->field($model, 'icaoto')->textInput(['style' => 'width: 100px;', 'readonly' => $model->isarrival == 1]); echo $form->field($model, 'timefrom')->widget(\kartik\widgets\TimePicker::className(), ['pluginOptions' => ['showMeridian' => false], 'options' => ['style' => 'width: 100px;']]); echo $form->field($model, 'timeto')->widget(\kartik\widgets\TimePicker::className(), ['pluginOptions' => ['showMeridian' => false], 'options' => ['style' => 'width: 100px;']]); echo \yii\bootstrap\Html::submitButton('<i class="fa fa-check"></i>Add', ['class' => 'btn btn-success btn-sm']); \kartik\form\ActiveForm::end(); ?> <hr /> <form method="post" class="form-horizontal" enctype="multipart/form-data"> <div class="form-group field-batch-loading"> <input id="form-token" type="hidden" name="<?php echo Yii::$app->request->csrfParam; ?> " value="<?php echo Yii::$app->request->csrfToken; ?> "/> <label class="control-label" for="batch-loading">Batch loading(<?php echo \yii\helpers\Html::a("XLSX", \yii\helpers\Url::to(['/booking/export-' . strtolower($act), 'id' => $model->airport_id]));
<?php foreach ($modules as $module) { ?> <label> <?php echo Html::checkbox('enableModules[' . $module['id'] . ']', true); echo $module['name']; ?> </label> <p class="help-block" style="margin: 0 0 10px 23px;"><?php echo $module['description']; ?> </p> <hr> <?php } ?> <?php echo Html::submitButton(Yii::t('base', 'Next'), array('class' => 'btn btn-primary', 'data-loader' => "modal", 'data-message' => Yii::t('InstallerModule.base', 'Downloading & Installing Modules...'))); ?> <?php echo Html::endForm(); ?> </div> </div>
use yii\bootstrap\Html; use yii\easyii\modules\catalog\models\StaticUrl; /** * @var StaticUrl $model */ ?> <?php echo $this->render('/items/_menu', ['category' => $model->category]); ?> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'url')->input('text', ['readonly' => 'readonly']); echo $form->field($model, 'page_description')->textarea(); echo $form->field($model, 'h2'); ?> <?php echo $model->getSeoBehavior()->renderForm($this, $form); ?> <?php echo Html::submitButton(Yii::t('easyii', 'Save'), ['class' => 'btn btn-primary']); ?> <?php $form->end();
<div class="login-box-body"> <?php $form = ActiveForm::begin(['id' => 'login-form']); ?> <div class="body"> <?php echo $form->field($model, 'identity'); ?> <?php echo $form->field($model, 'password')->passwordInput(); ?> <?php echo $form->field($model, 'rememberMe')->checkbox(['class' => 'simple']); ?> </div> <div class="footer"> <?php echo Html::submitButton('Sign me in', ['class' => 'btn btn-primary btn-flat btn-block']); ?> </div> <?php ActiveForm::end(); ?> </div> </div>
/** @var $this \yii\web\View */ /** @var $model \app\modules\guest\models\forms\ResetPasswordRequestForm */ use yii\bootstrap\Html; use yii\bootstrap\ActiveForm; use yii\captcha\Captcha; use yii\helpers\Url; $this->title = Yii::t('guest', 'Reset password'); ?> <div class="form-page"> <h2><?php echo Html::encode($this->title); ?> </h2> <?php $form = ActiveForm::begin(['id' => 'reset-password-request-form', 'enableAjaxValidation' => true, 'fieldConfig' => ['inputOptions' => ['autocomplete' => 'off'], 'errorOptions' => ['encode' => false]]]); ?> <?php echo $form->field($model, 'email')->textInput(['autofocus' => true]); ?> <?php echo $form->field($model, 'captcha')->widget(Captcha::className(), ['captchaAction' => Url::toRoute('/common/common/captcha'), 'options' => ['class' => 'form-control', 'autocomplete' => 'off'], 'template' => '{image} <a href="#" class="captcha-refresh-link" title="' . Yii::t('guest', 'Refresh digits') . '"><span class="glyphicon glyphicon-refresh"></span></a> {input}']); ?> <?php echo Html::submitButton(Yii::t('guest', 'Reset'), ['class' => 'btn btn-primary']); ?> <?php ActiveForm::end(); ?> </div>
} ?> <div class="row"> <div class="col-md-3 col-sm-12"> <div class="box box-solid"> <div class="box-body"> <?php $form = ActiveForm::begin(['id' => 'whois-lookup', 'action' => Url::toRoute('whois/index'), 'method' => 'get', 'options' => ['data-pjax' => false], 'fieldConfig' => ['template' => "{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}"]]); ?> <?php echo $form->field($model, 'domain')->textInput(['placeholder' => Yii::t('hipanel:domain', 'Domain name'), 'class' => 'form-control', 'name' => 'domain', 'value' => $model->getDomainAsUtf8()]); ?> <?php echo Html::submitButton('<i class="fa fa-search"></i> ' . Yii::t('hipanel:domain', 'Search'), ['class' => 'btn btn-info btn-flat btn-block xs-mb-10']); ?> <?php ActiveForm::end(); ?> <div class="bg-warning md-mt-10 xs-mb-10" style="padding: 5px 7px"> <span class="text-bold"><?php echo Yii::t('hipanel:domain', 'Available zones'); ?> :</span><br> <?php echo ArraySpoiler::widget(['data' => $availableZones, 'visibleCount' => count($availableZones)]); ?> </div> <p class="md-mt-20 text-justify"> <?php
?> <div> <?php $model = new \app\modules\account\models\User(); $model->scenario = 'login'; $form = ActiveForm::begin(['action' => ['/job/account/login']]); ?> <?php echo $form->field($model, 'email')->textInput(); ?> <?php echo $form->field($model, 'password')->passwordInput(); ?> <div class="form-group"> <?php echo Html::submitButton(Yii::t('account', 'Sign in'), ['class' => 'button button-primary']); ?> </div> <div class="form-group"> <p><?php echo Html::a(Yii::t('account', 'Sign up'), ['/job/account/register']); ?> </p> <p><?php echo Html::a(Yii::t('account', 'Forgot your password?'), ['/account/recovery/request']); ?> </p> </div> <?php ActiveForm::end(); ?>
</div> <div class="col-md-5"> <?php echo $form->field($model, 'publishTime')->widget(DateTimePicker::classname()); ?> <?php echo $form->field($model, 'image')->widget(FileInput::className()); ?> <?php echo $form->field($model, 'isPublished')->checkbox(); ?> </div> </div> <?php echo $form->field($model, 'previewText')->widget(CKEditor::className()); ?> <?php echo $form->field($model, 'text')->widget(CKEditor::className()); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? \Yii::t('app', 'Добавить') : \Yii::t('app', 'Сохранить'), ['class' => 'btn btn-primary']); ?> </div> <?php AppActiveForm::end(); ?> <?php
<?php echo $form->field($model, 'event_date')->widget(DatePicker::class, ['dateFormat' => 'dd-MM-yyyy']); ?> </div> </div> <?php echo $form->field($model, 'baseTags')->listBox(ArrayHelper::map($baseTags, 'id', 'code'), ['id' => 'base_tags_ids', 'multiple' => true]); ?> <?php if (!$asNestedForm) { ?> <div class="form-group"> <?php echo Html::submitButton(HLib::t('labels', 'Save'), ['class' => 'btn btn-success', 'name' => 'action', 'value' => 'save']); ?> <?php echo Html::a(HLib::t('labels', 'Cancel'), Url::to(['/cms/web-news/index']), ['class' => 'btn btn-warning', 'name' => 'action', 'value' => 'cancel']); ?> </div> <?php } ?> <?php if (!$asNestedForm) { ActiveForm::end(); } ?>
?> <?php echo $form->field($model, 'count_completeness')->dropdownList(Visits::getCountCompletenessOptions()); ?> <?php echo $form->field($model, 'blur')->dropDownList(Projects::getBlurOptions()); ?> <?php echo $form->field($model, 'embargo')->widget(DatePicker::className(), ['type' => 1, 'options' => ['placeholder' => Yii::t('app', 'Selecteer datum')], 'pluginOptions' => ['format' => 'dd-mm-yyyy', 'todayHighlight' => true, 'autoclose' => true, 'weekStart' => 1]]); ?> <?php echo $form->field($model, 'remarks')->widget(\yii\redactor\widgets\Redactor::className(), ['clientOptions' => ['buttons' => ['formatting', 'bold', 'italic', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'link', 'alignment', 'horizontalrule']]]); ?> <div class="form-group"> <?php echo Html::submitButton(Yii::t('app', 'Opslaan'), ['class' => 'btn btn-primary pull-right']); ?> </div> <?php ActiveForm::end(); ?> <?php View::beginJs(); ?> <script> /* If visits-checked-all equals FALSE then fetch boxes */ if($('input[name="Visits[checked_all]"]:checked').val() == 0) fetchBoxList(); $(document).on('change', 'input[name="Visits[checked_all]"]', function() { if($('input[name="Visits[checked_all]"]:checked').val() == 0)
<?php echo $form->field($filterModel, 'workTypes')->checkboxlist(VacancyFilter::getWorkTypesList()); ?> <?php echo $form->field($filterModel, 'courses')->checkboxlist(VacancyFilter::getCoursesList()); ?> <?php echo $form->field($filterModel, 'max_hours')->widget(Slider::className(), ['name' => 'max_hours', 'value' => 7, 'sliderColor' => Slider::TYPE_GREY, 'handleColor' => Slider::TYPE_DANGER, 'pluginOptions' => ['handle' => 'triangle', 'tooltip' => 'always', 'min' => 2, 'max' => 20, 'step' => 1]]); ?> <?php echo Html::submitButton('Search', ['class' => 'btn btn-primary']); ?> <style> div.slider.slider-horizontal{ #width:150px; display:block; } </style> </div> <?php RoleBasedActiveForm::end();
<?php /* @var $model \app\models\country\CountryRecord */ use app\models\hotel\HotelRecord; use app\models\country\CountryRecord; use yii\bootstrap\ActiveForm; $form = ActiveForm::begin(['layout' => 'horizontal']); echo $form->field($model, 'name'); echo $form->field($model, 'description')->textarea(['cols' => 2, 'rows' => 3]); echo $form->field($model, 'type')->dropDownList(HotelRecord::types()); echo $form->field($model, 'stars')->dropDownList(HotelRecord::stars()); echo $form->field($model, 'country_id')->dropDownList(CountryRecord::getCountries()); ?> <div class="clearfix form-actions"> <div class="col-md-offset-3 col-md-9"> <?php echo \yii\bootstrap\Html::submitButton('Применить', ['class' => 'btn btn-success']); ?> </div> </div> <?php ActiveForm::end();
</div> </div> <br> <legend>Tour dates</legend> <div class="row"> <?php echo ListView::widget(['dataProvider' => $dataProvider, 'showOnEmpty' => false, 'emptyText' => '<div class="col-sm-12">No availabe tour dates found</div>', 'itemView' => '_tour_dates', 'layout' => '{items}']); ?> </div> <div class="row"> <div class="col-sm-12 text-right"> <?php $form = ActiveForm::begin(['options' => ['class' => 'form-inline'], 'fieldConfig' => ['template' => "{input}"]]); ?> <?php echo $form->field($tourDateForm, ToursDatesForm::FIELD_TOUR_ID)->hiddenInput(['value' => $model->tour_id]); ?> <?php echo $form->field($tourDateForm, ToursDatesForm::FIELD_DATE)->input('date'); ?> <?php echo Html::submitButton('Add New Date', ['class' => 'btn btn-success']); ?> <?php ActiveForm::end(); ?> </div> </div>
/** * @param null $code * * @return array */ public static function getItems($code = null) { /**@var $parentSettings self[] */ $items = []; if ($code == null) { $parentSettings = Setting::find()->where(['parent_id' => 0, 'type' => self::TYPE_GROUP])->orderBy(['sort_order' => SORT_ASC])->all(); } else { $currentSetting = self::findOne(['code' => $code]); if ($currentSetting !== null) { $parentSettings = Setting::find()->where(['parent_id' => $currentSetting->id, 'type' => self::TYPE_GROUP])->orderBy(['sort_order' => SORT_ASC])->all(); } else { $parentSettings = Setting::find()->where(['parent_id' => 0, 'type' => self::TYPE_GROUP])->orderBy(['sort_order' => SORT_ASC])->all(); } } foreach ($parentSettings as $parentSetting) { $content = Html::beginForm('', 'POST', ['class' => 'form-horizontal', 'id' => 'nava-setting-form', 'enctype' => 'multipart/form-data']); $content .= $parentSetting->getContent(); $content .= Html::beginTag('div', ['class' => 'form-group']); $content .= Html::beginTag('div', ['class' => 'col-sm-9 col-sm-offset-3']); $content .= Html::submitButton(Yii::t('setting', 'Save'), ['class' => 'btn btn-success']); $content .= Html::endTag('div'); $content .= Html::endTag('div'); $content .= Html::endForm(); $items[] = ['label' => ($parentSetting->icon != '' ? '<span class="glyphicon ' . $parentSetting->icon . '"></span> ' : '') . $parentSetting->getName(), 'content' => $content]; } return $items; }
<div class="panel panel-default"> <div class="panel-body"> <ul class="list-unstyled" style="margin:0;"> <li>Комисия гаранта — <span id="sale-backer"><?php echo Yii::$app->params['saleBacker']; ?> </span>% от суммы стоимости на сайте.</li> <li>Моё вознаграждение — <span id="reward"><?php echo $model->price - $model->price * Yii::$app->params['saleBacker'] / 100; ?> </span> <i class="fa fa-rub"></i></li> </ul> </div> </div> <div class="form-group"> <div class="col-sm-offset-4 col-sm-8"><?php echo Html::submitButton('<span class="glyphicon glyphicon-plus"></span> Добавить лот на продажу', ['class' => 'btn btn-default', 'name' => 'ad-button']); ?> </div> </div> <?php ActiveForm::end(); ?> </div> </div> </div> </div>
<li class="list-group-item"><?php echo Yii::t('update', 'Finished'); ?> </li> </ul> </div> <div class="col-sm-8 form-wrapper"> <?php echo Html::tag('h4', Yii::t('update', 'Choose language'), ['class' => 'step-title']); ?> <?php echo Html::beginForm('', 'post', ['class' => 'form-vertical']); ?> <div class="form-group"> <?php // Html::label(Yii::t('update', 'Choose language'), 'language', ['class' => 'form-label']) ?> <?php echo Html::dropDownList('language', Yii::$app->language, $languages, ['class' => 'form-control']); ?> </div> <div class="form-action"> <?php echo Html::submitButton(Yii::t('update', 'Save and continue'), ['class' => 'btn btn-primary']); ?> </div> <?php echo Html::endForm(); ?> </div> </div>
</div> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-5"> <?php echo $form->field($model, 'university_id')->dropDownList($universities, ['prompt' => Yii::t('lbl', 'University')])->label(false); ?> </div> <div class="col-xs-12 col-sm-6 col-md-5"> <?php echo $form->field($model, 'tag_id')->dropDownList($tags, ['prompt' => Yii::t('lbl', 'Interests')])->label(false); ?> </div> <div class="col-xs-12 col-sm-6 col-md-2"> <div class="form-group"> <?php echo Html::submitButton('Szukaj ' . Html::icon('search'), ['class' => 'btn btn-fullwidth btn-orange']); ?> </div> </div> </div> </article> <?php ActiveForm::end(); ?> <div class="search-results"> <?php if (is_array($results)) { if (empty($results)) { echo '<article>' . Yii::t('msg', 'No results') . '</article>'; } else {
<div class="panel-heading"> <i class="glyphicon glyphicon-list"></i> Добавить клиента </div> <div class="panel-body"> <div class="row"> <div class="col-md-12"> <?php $form = ActiveForm::begin(['method' => 'post']); ?> <?php echo $form->field($model, 'name')->label('Имя'); ?> <?php echo $form->field($model, 'email')->label('Email'); ?> <?php echo $form->field($model, 'phone')->label('Номер телефона'); ?> <?php echo Html::submitButton('Добавить', ['class' => 'btn btn-primary']); ?> <?php $form->end(); ?> </div> </div> </div> </div> </div> </div>
echo $form->field($model, 'username', $fieldOptions1)->label(false)->textInput(['placeholder' => $model->getAttributeLabel('username')]); ?> <?php echo $form->field($model, 'password', $fieldOptions2)->label(false)->passwordInput(['placeholder' => $model->getAttributeLabel('password')]); ?> <div class="row"> <div class="col-xs-8"> <?php echo $form->field($model, 'rememberMe')->checkbox(); ?> </div> <div class="col-xs-4"> <?php echo Html::submitButton('Login', ['class' => 'btn btn-primary btn-block btn-flat', 'name' => 'login-button']); ?> </div> </div> <?php ActiveForm::end(); ?> <div class="social-auth-links text-center"> <p>- OR -</p> <a href="#" class="btn btn-block btn-social btn-facebook btn-flat"> <i class="fa fa-facebook"></i> Login using Facebook </a> <a href="#" class="btn btn-block btn-social btn-google-plus btn-flat"> <i class="fa fa-google-plus"></i> Login using Google+
?> <?php echo $form->field($model, 'tablePrefix')->hint(Yii::t('setup', "If more than one application will be sharing this database, a unique table prefix - such as 'ef_' - will prevent collisions.")); ?> </div> </div> <div class="form-action"> <?php echo Html::submitButton(Yii::t('setup', 'Test connection'), ['class' => 'btn btn-default pull-left', 'name' => 'test']); ?> <?php if ($connectionOk) { ?> <?php echo Html::submitButton(Yii::t('setup', 'Save and continue'), ['class' => 'btn btn-primary pull-right', 'name' => 'save']); ?> <?php } ?> </div> <?php ActiveForm::end(); ?> </div> </div> <?php $advancedOptions = Yii::t('setup', 'Advanced options'); $js = <<<JS
<?php use user\models\Role as RoleForm; use yii\bootstrap\Html; use yii\helpers\ArrayHelper; use yii\web\View; use yii\widgets\ActiveForm; /* @var $this View */ /* @var $model RoleForm */ /* @var $form ActiveForm */ $form = ActiveForm::begin(['enableAjaxValidation' => true, 'enableClientValidation' => true]); print $form->field($model, 'name')->textInput(['maxlength' => true, 'readonly' => !$model->getIsNewRecord()]); print $form->field($model, 'description')->textInput(['maxlength' => true]); print $form->field($model, 'permissions', ['template' => '{label}{hint}{input}{error}'])->checkboxList(ArrayHelper::map($model->getAllPermissions(), 'name', 'description'), ['itemOptions' => ['labelOptions' => ['style' => 'display:block']]]); if ($model->getIsNewRecord()) { print Html::submitButton(Yii::t('user', 'Create'), ['class' => 'btn btn-primary']); } else { print Html::submitButton(Yii::t('user', 'Update'), ['class' => 'btn btn-primary']); } print ' '; print Html::a(Yii::t('user', 'Cancel'), ['index'], ['class' => 'btn btn-default']); ActiveForm::end();