示例#1
3
 public function run()
 {
     if (is_null($this->id)) {
         if ($this->model instanceof Model) {
             $this->id = Html::getInputId($this->model, $this->attribute);
         } else {
             $this->id = $this->getId();
         }
     }
     if (is_null($this->name)) {
         if ($this->model instanceof Model) {
             $this->name = Html::getInputName($this->model, $this->attribute);
         } else {
             $this->name = $this->getId();
         }
     }
     $this->options['id'] = $this->id;
     $this->options['name'] = $this->name;
     switch ($this->type) {
         case 'checkbox':
             if ($this->model instanceof Model) {
                 $this->options['label'] = null;
                 echo Html::activeCheckbox($this->model, $this->attribute, $this->options);
             } else {
                 echo Html::checkbox($this->name, $this->checked, $this->options);
             }
             break;
         case 'radio':
             if ($this->model instanceof Model) {
                 $this->options['label'] = null;
                 echo Html::activeRadio($this->model, $this->attribute, $this->options);
             } else {
                 echo Html::radio($this->name, $this->checked, $this->options);
             }
             break;
         default:
             throw new Exception('Invalid element type');
     }
     $this->register();
 }
示例#2
2
 /**
  *
  */
 public function run()
 {
     $view = $this->getView();
     $this->registerScript($view);
     if ($this->hasModel()) {
         if ($this->label) {
             $label = $this->label;
         } else {
             $label = Html::encode($this->model->getAttributeLabel(Html::getAttributeName($this->attribute)));
         }
         $tag = ArrayHelper::remove($this->textOptions, 'tag', 'span');
         $text = Html::tag($tag, $label, $this->textOptions);
         $this->options['label'] = $text;
         $checkbox = Html::activeCheckbox($this->model, $this->attribute, $this->options);
     } else {
         $checkbox = Html::checkbox($this->name, $this->value, $this->options);
         if ($this->label) {
             $tag = ArrayHelper::remove($this->textOptions, 'tag', 'span');
             $text = Html::tag($tag, $this->label, $this->textOptions);
             $checkbox = Html::tag('label', $checkbox . ' ' . $text, $this->labelOptions);
         }
     }
     $input = Html::tag('div', $checkbox, $this->containerOptions);
     echo strtr($this->template, ['{input}' => $input]);
 }
$cfg = $uploader->illustration;
$aspect = $cfg->aspectRatio;
if (!is_numeric($aspect)) {
    $model->setAttribute($aspect, 1000 * $model->getAttribute($aspect));
}
?>

<div id="<?php 
echo $uploader->id;
?>
" class="uploader">
    <div class="cropper"></div>
    <div class="uploader-aspect">
        <?php 
if (!is_numeric($aspect) && $uploader->aspectOptions) {
    echo $uploader->radio ? Html::activeRadioList($model, $aspect, $uploader->aspectOptions, ['class' => 'uploader-select', 'separator' => '<br />', 'itemOptions' => ['disabled' => 'disabled']]) : Html::activeDropDownList($model, $aspect, $uploader->aspectOptions, ['class' => 'form-control uploader-select', 'disabled' => 'disabled']);
}
?>
        <?php 
echo $uploader->deleteOptions ? Html::activeCheckbox($model, "__{$attr}_delete__", array_merge($uploader->deleteOptions, ['disabled' => !$uploader->current, 'class' => 'del-switch'])) : '';
?>
    </div>
    <div class="uploader-control">
        <?php 
echo Html::activeFileInput($model, "__{$attr}_file__");
?>
        <?php 
echo Html::activeHiddenInput($model, "__{$attr}_crop__");
?>
    </div>
</div>
示例#4
1
 /**
  * @inheritdoc
  */
 public function run()
 {
     $this->registerPlugin('iCheck');
     if ($this->label) {
         $this->options['label'] = $this->label;
     }
     if ($this->items) {
         if (!($this->items = array_filter($this->items))) {
             throw new InvalidValueException('Empty items list.');
         }
     }
     if ($this->hasModel()) {
         if ($this->items) {
             $method = $this->type === static::TYPE_CHECKBOX ? 'activeCheckboxList' : 'activeRadioList';
             $input = Html::$method($this->model, $this->attribute, $this->items, $this->options);
         } else {
             $input = Html::activeCheckbox($this->model, $this->attribute, $this->options);
         }
     } elseif ($this->items) {
         $method = $this->type === static::TYPE_CHECKBOX ? 'checkboxList' : 'radioList';
         $input = Html::$method($this->name, (bool) $this->value, $this->items, $this->options);
     } else {
         $input = Html::checkbox($this->name, (bool) $this->value, $this->options);
     }
     return $input;
 }
 public function run()
 {
     $this->view->registerAssetBundle(MultiSelectAsset::className());
     $options = $this->options;
     if (isset($options['id'])) {
         $id = $options['id'];
     } else {
         $id = BaseHtml::getInputId($this->model, $this->attribute);
     }
     if (isset($options['name'])) {
         $name = $options['name'];
     } elseif ($this->hasModel()) {
         $name = BaseHtml::getInputName($this->model, $this->attribute);
     } else {
         $name = $this->name;
     }
     //        if (isset($options['value'])) {
     //            $value = $options['value'];
     //        } elseif ($this->hasModel()) {
     //            $value = BaseHtml::getAttributeValue($this->model, $this->attribute);
     //        } else {
     //            $value = $this->value;
     //        }
     $len = strlen($this->attribute);
     $widget = Html::beginTag('div', ['id' => $id, 'name' => $name]);
     foreach ($this->model as $k => $v) {
         if (substr($k, 0, $len + 1) == $this->attribute . '_') {
             $widget .= Html::activeCheckbox($this->model, $k, ['labelOptions' => ['class' => 'checkbox-inline']]);
         }
     }
     $widget .= Html::endTag('div');
     echo $widget;
 }
 private function renderCheckboxInput()
 {
     if ($this->hasModel()) {
         $input = Html::activeCheckbox($this->model, $this->attribute, $this->options);
     } else {
         $input = Html::checkbox($this->name, $this->checked, $this->options);
     }
     print $this->inlineLabel ? $input : Html::tag('div', $input);
 }
 /**
  * Runs the widget
  *
  * @return string
  */
 public function run()
 {
     $this->registerAssets();
     if ($this->hasModel()) {
         echo Html::activeCheckbox($this->model, $this->attribute, $this->options);
     } else {
         $checked = ArrayHelper::remove($this->options, 'checked', false);
         echo Html::checkbox($this->name, $checked, $this->options);
     }
 }
示例#8
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     if ($this->hasModel()) {
         $input = Html::activeCheckbox($this->model, $this->attribute, $this->options);
     } else {
         $input = Html::checkbox($this->name, $this->checked, $this->options);
     }
     echo $this->inlineLabel ? $input : Html::tag('div', $input);
     $this->selector = "#{$this->options['id']}";
     $this->registerClientScript();
 }
示例#9
0
 /**
  * @inheritdoc
  */
 protected function renderDataCellContent($model, $key, $index)
 {
     /** @var $model ActiveRecord */
     if ($this->format == 'boolean') {
         return Html::activeCheckbox($model, $this->attribute, ['label' => false, 'class' => 'ajax-checkbox', 'data' => ['id' => $key, 'modelName' => $model->className(), 'attribute' => $this->attribute]]);
     }
     if ($this->content === null) {
         return $this->grid->formatter->format($this->getDataCellValue($model, $key, $index), $this->format);
     } else {
         return parent::renderDataCellContent($model, $key, $index);
     }
 }
示例#10
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     $option = array_merge(['label' => false, 'class' => 'make-switch'], $this->options);
     if ($this->hasModel()) {
         $input = Html::activeCheckbox($this->model, $this->attribute, $option);
     } else {
         $input = Html::checkbox($this->name, $this->checked, $option);
     }
     echo $this->inlineLabel ? $input : Html::tag('div', $input);
     $this->selector = "#{$option['id']}";
     $this->registerClientScript();
 }
示例#11
0
 /**
  * Renders the checkbox input
  */
 public function renderCheckbox()
 {
     if ($this->inline == true) {
         Html::addCssClass($this->_internalOptions, 'checkbox-custom checkbox-inline');
         echo Html::beginTag('label', $this->_internalOptions) . "\n";
     } else {
         echo Html::beginTag('label', ['class' => 'checkbox-custom']) . "\n";
     }
     if ($this->hasModel()) {
         echo Html::activeCheckbox($this->model, $this->attribute, $this->options) . "\n";
     } else {
         echo Html::checkbox($this->name, $this->value, $this->options) . "\n";
     }
     echo $this->label . "\n";
     echo Html::endTag('label') . "\n";
 }
示例#12
0
 /**
  * @param array $options
  * @param bool|TRUE $enclosedByLabel
  *
  * @return $this
  */
 public function checkbox($options = [], $enclosedByLabel = TRUE)
 {
     if ($enclosedByLabel) {
         $this->parts['{input}'] = Html::activeCheckbox($this->model, $this->attribute, $options);
         $this->parts['{label}'] = '';
     } else {
         if (isset($options['label']) && !isset($this->parts['{label}'])) {
             $this->parts['{label}'] = $options['label'];
             if (!empty($options['labelOptions'])) {
                 $this->labelOptions = $options['labelOptions'];
             }
         }
         unset($options['labelOptions']);
         $options['label'] = NULL;
         $this->parts['{input}'] = Html::activeCheckbox($this->model, $this->attribute, $options);
     }
     $this->adjustLabelFor($options);
     return $this;
 }
示例#13
0
$fieldExtra = '';
if (!empty($model->errors['phone'])) {
    $fieldExtra = 'has-feedback has-error';
}
echo Html::beginTag('div', ['class' => 'col-sm-6 form-group ' . $fieldExtra]);
echo Html::activeLabel($model, 'phone');
echo Html::activeTextInput($model, 'phone', ['class' => 'form-control']);
echo Html::error($model, 'phone', ['class' => 'help-inline text-danger']);
echo Html::endTag('div');
echo Html::endTag('div');
echo Html::beginTag('div', ['class' => 'row']);
$fieldExtra = '';
if (!empty($model->errors['note'])) {
    $fieldExtra = 'has-feedback has-error';
}
echo Html::beginTag('div', ['class' => 'col-sm-6 form-group ' . $fieldExtra]);
echo Html::activeLabel($model, 'note');
echo Html::activeTextArea($model, 'note', ['class' => 'form-control']);
echo Html::error($model, 'note', ['class' => 'help-inline text-danger']);
echo Html::endTag('div');
echo Html::beginTag('div', ['class' => 'col-sm-6']);
echo Html::beginTag('div', ['class' => 'form-group ']);
echo Html::activeCheckbox($model, 'is_technical', []);
echo Html::endTag('div');
echo Html::beginTag('div', ['class' => 'form-group ']);
echo Html::activeCheckbox($model, 'is_billing', []);
echo Html::endTag('div');
echo Html::endTag('div');
echo Html::endTag('div');
echo Html::endTag('div');
echo Html::endForm();
示例#14
0
 " id="signin">
            <?php 
$form = ActiveForm::begin(['id' => 'login-form', 'options' => ['class' => 'form-signin'], 'fieldConfig' => ['template' => "{input}\n{error}"]]);
?>

            <?php 
echo $form->field($login, 'username')->textInput(['placeholder' => "Username"]);
?>

            <?php 
echo $form->field($login, 'password')->passwordInput(['placeholder' => 'Password']);
?>

            <div class="form-group text-center">
                <?php 
echo Html::activeCheckbox($login, 'rememberMe');
?>
            </div>

            <div class="form-group">
                <div class="col-lg-offset-1 col-lg-10">
                    <?php 
echo Html::submitButton('Sign In', ['class' => 'btn btn-primary btn-block', 'name' => 'login-button']);
?>
                </div>
            </div>

            <?php 
ActiveForm::end();
?>
        </div>
示例#15
0
<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
$form = ActiveForm::begin(['id' => 'login-form', 'options' => ['class' => 'login-form']]);
?>
<h3 class="form-title">Sign In</h3>
<?php 
echo $form->field($model, 'username')->textInput(['placeholder' => 'Username'])->label(false);
echo $form->field($model, 'password')->passwordInput(['placeholder' => 'Password'])->label(false);
?>
<div class="form-actions">
    <?php 
echo Html::submitButton('Login', ['class' => 'btn btn-success uppercase', 'name' => 'login-button']);
?>
    <?php 
echo Html::activeCheckbox($model, 'rememberMe', ['labelOptions' => ['class' => 'rememberme check']]);
?>
</div>
<?php 
ActiveForm::end();
示例#16
0
?>
<div class="estimate-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
	
	<div style="float: right">
		<h3>Valor dólar: <?php 
echo Currency::format(Currency::getUsToArs(), Currency::CURRENCY_ARS);
?>
</h3>
	</div>

    <p>
		<?php 
echo Html::a('Crear presupuesto', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
	
	<?php 
echo GridView::widget(['pjax' => true, 'pjaxSettings' => ['options' => ['id' => 'estimates-gridview']], 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model, $index, $widget, $grid) {
    return ['style' => "background-color:{$model->statusColor};"];
}, 'columns' => [['attribute' => 'id', 'label' => 'Número', 'options' => ['style' => 'width: 100px;']], ['label' => 'Cliente', 'value' => 'client.name', 'filter' => Html::activeTextInput($searchModel, 'clientName', ['class' => 'form-control'])], 'title', ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'status', 'label' => 'Estado', 'value' => 'statusLabel', 'filter' => Html::activeDropDownList($searchModel, 'status', Estimate::statusLabels(), ['class' => 'form-control', 'prompt' => 'Estado']), 'editableOptions' => ['inputType' => Editable::INPUT_DROPDOWN_LIST, 'data' => Estimate::statusLabels()], 'refreshGrid' => true, 'options' => ['style' => 'width: 160px;']], ['attribute' => 'request_date', 'format' => 'date', 'filter' => false, 'options' => ['style' => 'width: 125px;']], ['attribute' => 'sent_date', 'format' => 'date', 'filter' => false, 'options' => ['style' => 'width: 125px;']], ['label' => 'Muestra', 'filter' => Html::activeCheckbox($searchModel, 'sampleDelivered', ['label' => '']), 'value' => function ($model, $key, $index, $column) {
    return $model->entriesWithSampleDeliveredCount > 0 ? 'Si' : 'No';
}, 'options' => ['style' => 'width: 70px;']], ['class' => 'yii\\grid\\ActionColumn', 'options' => ['style' => 'width: 60px;']]]]);
?>

</div>
示例#17
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
$form = ActiveForm::begin(['id' => 'login-form', 'action' => ['/user/login'], 'method' => 'post']);
echo $form->field($model, 'username')->textInput(['placeholder' => 'Isi username di sini']);
echo $form->field($model, 'password')->passwordInput(['placeholder' => 'Isi password di sini']);
?>
<div class="form-group pull-left">
    <?php 
echo Html::activeCheckbox($model, 'rememberMe', ['class' => 'euis euis-checkbox-2']);
?>
    <?php 
echo Html::label(' ' . Html::encode($model->getAttributeLabel('rememberMe')), 'loginform-rememberme', ['class' => 'lbl']);
?>
</div>
<div class="form-group pull-right">
    <?php 
echo Html::submitButton('Login', ['class' => 'btn btn-warning btn-sm', 'name' => 'login-button']);
?>
</div>
<?php 
ActiveForm::end();
示例#18
0
 /**
  * Renders a checkbox.
  * This method will generate the "checked" tag attribute according to the model attribute value.
  * @param array $options the tag options in terms of name-value pairs. The following options are specially handled:
  *
  * - uncheck: string, the value associated with the uncheck state of the radio button. If not set,
  *   it will take the default value '0'. This method will render a hidden input so that if the radio button
  *   is not checked and is submitted, the value of this attribute will still be submitted to the server
  *   via the hidden input.
  * - label: string, a label displayed next to the checkbox.  It will NOT be HTML-encoded. Therefore you can pass
  *   in HTML code such as an image tag. If this is is coming from end users, you should [[Html::encode()]] it to prevent XSS attacks.
  *   When this option is specified, the checkbox will be enclosed by a label tag.
  * - labelOptions: array, the HTML attributes for the label tag. This is only used when the "label" option is specified.
  *
  * The rest of the options will be rendered as the attributes of the resulting tag. The values will
  * be HTML-encoded using [[Html::encode()]]. If a value is null, the corresponding attribute will not be rendered.
  * @param boolean $enclosedByLabel whether to enclose the checkbox within the label.
  * If true, the method will still use [[template]] to layout the checkbox and the error message
  * except that the checkbox is enclosed by the label tag.
  * @return static the field object itself
  */
 public function checkbox($options = [], $enclosedByLabel = true)
 {
     if ($enclosedByLabel) {
         if (!isset($options['label'])) {
             $attribute = Html::getAttributeName($this->attribute);
             $options['label'] = Html::encode($this->model->getAttributeLabel($attribute));
         }
         $this->parts['{input}'] = Html::activeCheckbox($this->model, $this->attribute, $options);
         $this->parts['{label}'] = '';
     } else {
         $this->parts['{input}'] = Html::activeCheckbox($this->model, $this->attribute, $options);
     }
     $this->adjustLabelFor($options);
     return $this;
 }
示例#19
0
?>
</td>
            </tr>
            <tr>
                <td><?php 
echo Html::activeLabel($model, 'password');
?>
</td>
                <td>:</td>
                <td><?php 
echo Html::activePasswordInput($model, 'password');
?>
</td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td><?php 
echo Html::activeCheckbox($model, 'rememberMe');
?>
</td>
            </tr>
            <tr>
                <td colspan="3">
                    <a id="login-forgot-btn" href="javascript:void(0);">Forgot Password</a>, or 
                    <a id="login-signup-btn" href="javascript:void(0);">SignUp</a></td>
            </tr>
        </tbody>
    </table>
<?php 
echo Html::endForm();
示例#20
0
                <h4 class="modal-title"><i class="glyphicon glyphicon-user"></i> Add new language</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <?php 
echo $createLangForm->field($createLanguageForm, 'name', ['inputOptions' => ['class' => 'form-control']])->label('Name');
?>
                </div>
                <div class="form-group">
                    <?php 
echo $createLangForm->field($createLanguageForm, 'lang_id', ['inputOptions' => ['class' => 'form-control']])->label('Code');
?>
                </div>
                <?php 
echo Html::activeCheckbox($createLanguageForm, 'active');
?>
                <?php 
echo Html::activeCheckbox($createLanguageForm, 'show');
?>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <input type="submit" class="btn btn-primary pull-right" value="Add">
            </div>
            <?php 
ActiveForm::end();
?>
        </div>
    </div>
</div>
示例#21
0
?>

    <?php 
// use checkbox for banned_at
?>
    <?php 
// convert `banned_at` to int so that the checkbox gets set properly
?>
    <?php 
$user->banned_at = $user->banned_at ? 1 : 0;
?>
    <?php 
echo Html::activeLabel($user, 'banned_at', ['label' => Yii::t('user', 'Banned')]);
?>
    <?php 
echo Html::activeCheckbox($user, 'banned_at');
?>
    <?php 
echo Html::error($user, 'banned_at');
?>

    <?php 
echo $form->field($user, 'banned_reason');
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($user->isNewRecord ? Yii::t('user', 'Create') : Yii::t('user', 'Update'), ['class' => $user->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
示例#22
0
 /**
  * @inheritdoc
  */
 public function renderInput($value, $attribute = null)
 {
     return Html::activeCheckbox($this->model, $attribute ? $attribute : $this->attribute, ['style' => 'float: left; margin-right: 4px;', 'checked' => $value, 'label' => null]);
 }
示例#23
0
">Город</a></b>
			</td>
			<td>
				<b>Всего обьв-ий</b>
			</td>
			<td>
				<b>Активных обьв-ий</b>
			</td>
		</tr>
		<?php 
foreach ($users as $user) {
    ?>
			<tr>
				<td>
					<?php 
    echo Html::activeCheckbox($functionsForm, 'id_user[]', ['class' => 'check', 'label' => false, 'value' => $user->id]);
    ?>
				</td>
				<td>
					<?php 
    echo $user->id;
    ?>
				</td>
				<td>
					<?php 
    echo $user->surname;
    ?>
 <?php 
    echo $user->name;
    ?>
				</td>
示例#24
0
文件: _form.php 项目: jorry2008/turen
        <h3 class="mark_"><?php 
echo Yii::t('catalog', 'Product Promotion');
?>
</h3>
        <div class="form-group field-product-is_hot">
            <div class="checkbox">
                <?php 
echo Html::activeCheckbox($model, 'is_hot');
echo '&nbsp;&nbsp;&nbsp;&nbsp;';
echo Html::activeCheckbox($model, 'is_new');
echo '&nbsp;&nbsp;&nbsp;&nbsp;';
echo Html::activeCheckbox($model, 'is_best');
echo '&nbsp;&nbsp;&nbsp;&nbsp;';
echo Html::activeCheckbox($model, 'is_free_shipping');
echo '&nbsp;&nbsp;&nbsp;&nbsp;';
echo Html::activeCheckbox($model, 'is_promote');
?>
            </div>
        </div>
        <?php 
echo $form->field($model, 'promote_price')->input('number');
?>
        <?php 
echo $form->field($model, 'promote_start_date')->textInput(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'promote_end_date')->textInput(['maxlength' => true]);
?>
        <?php 
echo $form->field($model, 'points')->input('number');
?>
示例#25
0
 public function renderInput()
 {
     $this->inputOptions['label'] = null;
     return $this->hasModel() ? Html::activeCheckbox($this->model, $this->attribute, $this->inputOptions) : Html::checkbox($this->name, $this->checked, $this->inputOptions);
 }
示例#26
0
文件: _form.php 项目: filsh/yii2-user
		<?php 
echo $form->field($user, 'role_id')->dropDownList($role::dropdown());
?>

		<?php 
echo $form->field($user, 'status')->dropDownList($user::statusDropdown());
?>

        <?php 
// use checkbox for ban_time
?>
        <?php 
echo Html::activeLabel($user, 'ban_time', ['label' => 'Banned']);
?>
        <?php 
echo Html::activeCheckbox($user, 'ban_time');
?>
        <?php 
echo Html::error($user, 'ban_time');
?>

		<?php 
echo $form->field($user, 'ban_reason');
?>

		<div class="form-group">
			<?php 
echo Html::submitButton($user->isNewRecord ? 'Create' : 'Update', ['class' => $user->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
		</div>
示例#27
0
?>

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

	</div>

	

	<?php 
$form = ActiveForm::begin(['action' => Url::current(), 'method' => 'get', 'options' => ['class' => 'uk-margin-top', 'data-pjax' => true]]);
?>

    <?php 
echo Html::activeCheckbox($searchModel, 'withoutCategory', ['labelOptions' => ['class' => 'uk-button uk-float-right', 'style' => 'margin-top:-45px;']]);
?>

    <?php 
if (count($search_params)) {
    ?>
    	<div class="filter-list">
		<?php 
    foreach ($search_params as $key => $value) {
        ?>
			<?php 
        if (isset($searchModel->elements[$key])) {
            ?>
				<?php 
            if (is_array($value)) {
                ?>
示例#28
0
            </div>
            <div class="panel-body">
                <?php $form = ActiveForm::begin([
                    'id' => 'login-form',
                    'fieldClass' => 'auction\widgets\ActiveField',
                    'successCssClass' => false,
                    'options'=> ['role' => 'form']]); ?>
                <fieldset>

                <?= $form->field($model, 'username')->textInput(['placeholder' => 'Email/Mobile Number']) ?>

                <?= $form->field($model, 'password')->passwordInput(['placeholder' => 'Password']) ?>


                    <div class="checkbox login-checks">
                        <label style="padding-left: 0px;">
                            <?= Html::activeCheckbox($model,'rememberMe')?>
                        </label>
                        <?= Html::a('Forgot Password?',['site/reset-password'],['class'=>'fg-psw'])?>
                    </div>

                    <?= Html::submitButton('Login',['class' => 'btn btn-lg btn-info btn-block'])?>

                </fieldset>
                <?php ActiveForm::end(); ?>
                <?= Html::a('<i class="fa fa-pinterest"></i>Register as Dealer',['dealer/registration'], ['class' => 'btn btn-block btn-social btn-pinterest']); ?>
                <?= Html::a('<i class="fa fa-bitbucket"></i>Register as Company',['company/registration'], ['class' => 'btn btn-block btn-social btn-dropbox']); ?>
            </div>
        </div>
    </div>
</div>
 /**
  * Renders filter inputs based on the `filterType`
  *
  * @return string
  */
 protected function renderFilterCellContent()
 {
     $content = parent::renderFilterCellContent();
     $chkType = !empty($this->filterType) && $this->filterType !== GridView::FILTER_CHECKBOX && $this->filterType !== GridView::FILTER_RADIO && !class_exists($this->filterType);
     if ($this->filter === false || empty($this->filterType) || $content === $this->grid->emptyCell || $chkType) {
         return $content;
     }
     $widgetClass = $this->filterType;
     $options = ['model' => $this->grid->filterModel, 'attribute' => $this->attribute, 'options' => $this->filterInputOptions];
     if (is_array($this->filter)) {
         if ($this->filterType === GridView::FILTER_SELECT2 || $this->filterType === GridView::FILTER_TYPEAHEAD) {
             $options['data'] = $this->filter;
         }
         if ($this->filterType === GridView::FILTER_RADIO) {
             return Html::activeRadioList($this->grid->filterModel, $this->attribute, $this->filter, $this->filterInputOptions);
         }
     }
     if ($this->filterType === GridView::FILTER_CHECKBOX) {
         return Html::activeCheckbox($this->grid->filterModel, $this->attribute, $this->filterInputOptions);
     }
     $options = ArrayHelper::merge($this->filterWidgetOptions, $options);
     /** @var \kartik\base\Widget $widgetClass */
     return $widgetClass::widget($options);
 }
示例#30
0
                <div>
                    <?php 
//echo $form->labelEx($model,'avatar');
?>
                    <?php 
//echo Html::img((isset($model->avatar))?(\Yii::$app->request->baseUrl . $this->module->avatarStorage . '/'. $model->avatar):$assets->baseUrl.'/images/empty.jpeg', 'avatar', array('align' => 'left','style' => 'margin:0 10px 10px 0;'));
?>
                    <?php 
//echo $form->labelEx($model,'remove_avatar');
?>
                    <?php 
echo Html::img(!$model->getAttribute('avatar') ? $assets->baseUrl . '/images/empty.jpeg' : $assets->baseUrl . '/avatars/' . $model->getAttribute('avatar'), ['alt' => 'avatar', 'class' => 'img-responsive img-circle', 'title' => 'avatar']);
?>
                    <?php 
echo Html::activeCheckbox($model, 'remove_avatar');
?>
                    <?php 
//echo $form->labelEx($model, 'image');
?>
                    <?php 
echo $form->field($model, 'image')->fileInput(['class' => 'form-control', 'size' => 90]);
?>
                    <?php 
echo Yii::t('BbiiModule.bbii', 'Large images will be resized to fit a size of 90 pixels by 90 pixels.');
?>
                    <?php 
//echo $form->error($model, 'image');
?>
                </div>
                <br />