/** * Ham tao giao dien cho column * @param string $keyColumn ten truong cua column * @param array $column mang setting cua column * @param array $gallery mang gia tri cua image * @param string $id id cua 1 anh * @param string $tdOptions Html Attribute of td column * @return string */ private function generateColumnByType($keyColumn, $column, $gallery, $id, $tdOptions = [], $module, $attribute) { $typeImage = ArrayHelper::getValue($column, 'displayType', 'text'); $items = ArrayHelper::getValue($column, 'items', []); $options = ArrayHelper::getValue($column, 'options', ['class' => 'form-control']); $column_name = $module . '[' . $attribute . '][' . $id . '][' . $keyColumn . ']'; switch ($typeImage) { case self::SYA_TYPE_COLUMN_DROPDOWN: $template = Html::dropDownList($column_name, ArrayHelper::getValue($gallery, $keyColumn), $items, $options); break; case self::SYA_TYPE_COLUMN_TEXTAREA: $template = Html::textarea($column_name, ArrayHelper::getValue($gallery, $keyColumn), $options); break; case self::SYA_TYPE_COLUMN_RADIO: $template = Html::radio($column_name, ArrayHelper::getValue($gallery, $keyColumn), $options); break; case self::SYA_TYPE_COLUMN_RADIOLIST: $template = Html::radioList($column_name, ArrayHelper::getValue($gallery, $keyColumn), $items, $options); break; case self::SYA_TYPE_COLUMN_CHECKBOX: $template = Html::checkbox($column_name, ArrayHelper::getValue($gallery, $keyColumn), $options); break; case self::SYA_TYPE_COLUMN_CHECKBOXLIST: $template = Html::checkboxList($column_name, ArrayHelper::getValue($gallery, $keyColumn), $items, $options); break; case self::SYA_TYPE_COLUMN_HIDDEN: $tdOptions = ArrayHelper::merge($tdOptions, ['style' => 'display: none;']); $template = Html::hiddenInput($column_name, ArrayHelper::getValue($gallery, $keyColumn), $options); break; default: $template = Html::textInput($column_name, ArrayHelper::getValue($gallery, $keyColumn), $options); break; } $templateGallery = Html::beginTag('td', $tdOptions); $templateGallery .= $template; $templateGallery .= Html::endTag('td'); return $templateGallery; }
private function renderDropdown() { if ($this->hasModel()) { echo Html::activeDropDownList($this->model, $this->attribute, $this->getItems(), $this->options); } else { echo Html::dropDownList($this->name, $this->value, $this->getItems(), $this->options); } }
/** * @return string render input */ protected function renderInput() { $input = Html::dropDownList($this->name, $this->selected, $this->items, $this->options); // If use form model then $input use active input if ($this->hasModel()) { $input = Html::activeDropDownList($this->model, $this->attribute . '[status]', $this->items, $this->options); } $input .= Html::beginTag('div', ['id' => 'status_payment', 'style' => 'margin-top: 20px;']); foreach ($this->columns as $status => $item) { $input .= Html::beginTag('div', ['class' => 'status_payment', 'id' => 'status_payment_' . $status, 'style' => 'display: none']); foreach ($item as $name => $info) { $placeholder = isset($info['placeholder']) ? $info['placeholder'] : null; $value = isset($info['value']) ? $info['value'] : null; $input .= Html::activeInput('text', $this->model, $this->attribute . '[infomation][' . $name . ']', ['placeholder' => $placeholder, 'class' => $this->options['columnClass'], 'readonly' => '', 'value' => $value, 'style' => 'margin-top: 20px;']); } $input .= Html::endTag('div'); } $input .= Html::endTag('div'); return $input; }
echo Html::dropDownList('oldWorkName', null, $oldList, ['class' => 'form-control']); ?> </div> </div> <div class="form-group"> <?php echo Html::label('Выбрать из списка преподавателя'); ?> <div class="input-group "> <span class="input-group-addon"> <?php echo Html::radio('source', false, ['value' => 'list']); ?> </span> <?php echo Html::dropDownList('listWorkName', null, $workList, ['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>
echo Html::submitButton(Yii::t('backend', 'Flush'), ['class' => 'btn btn-danger']); ?> <?php ActiveForm::end(); ?> </div> <div class="col-xs-6"> <h4><?php echo Yii::t('backend', 'Invalidate tag'); ?> </h4> <?php ActiveForm::begin(['action' => Url::to('flush-cache-tag'), 'method' => 'get', 'layout' => 'inline']); ?> <?php echo Html::dropDownList('id', null, ArrayHelper::map($dataProvider->allModels, 'name', 'name'), ['class' => 'form-control', 'prompt' => Yii::t('backend', 'Select cache')]); ?> <?php echo Html::input('string', 'tag', null, ['class' => 'form-control', 'placeholder' => Yii::t('backend', 'Tag')]); ?> <?php echo Html::submitButton(Yii::t('backend', 'Flush'), ['class' => 'btn btn-danger']); ?> <?php ActiveForm::end(); ?> </div> </div> </div>
public static function renderField($group, $fieldName, $fieldParams) { $id = $fieldParams['id']; $type = $fieldParams['type']; $value = $fieldParams['value']; $description = $fieldParams['description']; $options = $fieldParams['options']; $fld = $group . '[' . $fieldName . ']'; $html = ''; switch ($type) { case 'text': $html .= self::labelInput($fieldName, $fld, Html::textInput($fld, $value, ['class' => 'form-control'])); $html .= self::hint($description); break; case 'textarea': $html .= self::labelInput($fieldName, $fld, Html::textarea($fld, $value, ['rows' => 5, 'class' => 'form-control', 'hint' => $description])); $html .= ConfigurationUtils::hint($description); break; case 'checkbox': $html .= self::labelInput($fieldName, $fld, Html::checkbox($fld, $value, ['value' => $value == '1' ? '1' : '0', 'class' => 'form-control autoval'])); break; case 'dropdown': $data = explode(",", $options); $data = array_reverse($data); $data[''] = Yii::t('app', 'Select an option...'); $data = array_reverse($data); $data = array_combine($data, $data); $html .= self::labelInput($fieldName, $fld, Html::dropDownList($fld, $value, $data, ['class' => 'form-control'])); break; } return $html; }
"><span class="glyphicon glyphicon-remove"></span> <?php echo Yii::t('app', 'Remove from cart'); ?> </a> </div> </td> <td style="font-size: 12pt;text-align: right;vertical-align: middle;padding-right: 30px;color:#AA0000">$<?php echo number_format($it->price, 2, '.', ''); ?> </td> <td style="vertical-align: middle"> <?php ActiveForm::begin(['action' => \yii\helpers\Url::to(['shopcart/update-item', 'index' => $index])]); ?> <?php echo \yii\bootstrap\Html::dropDownList('quantity', $it->quantity, [1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9], ['class' => 'form-control update-cart-item']); ?> <?php ActiveForm::end(); ?> </td> <td style="font-size: 12pt;text-align: right;vertical-align: middle;color:#AA0000">$<?php echo number_format($it->getSubtotal(), 2, '.', ''); ?> </td> </tr> <?php } ?> </tbody> <tfoot>
<?php use yii\widgets\LinkPager; $this->title = 'Каталог товаров на сайте'; $form = \yii\widgets\ActiveForm::begin(['method' => 'get', 'action' => ['goods/index'], 'options' => ['id' => 'filter-form-goods']]); ?> <div class="well well-lg"> <div class="col-lg-3 filter"> <?php echo \yii\bootstrap\Html::dropDownList('category', $active_category, $categories, ['class' => 'form-control drop-filter filter-submit', 'prompt' => 'Выберите категорию...', 'id' => 'cat-id']); ?> </div> <div class="col-lg-3 filter"> <?php echo \yii\bootstrap\Html::dropDownList('rubric', $active_rubric, $rubrics, ['class' => 'form-control drop-filter filter-submit', 'prompt' => 'Выберите рубрику...', 'id' => 'rubric-id']); ?> </div> <div class="col-lg-6 filter"> <div class="col-lg-5"> <div class="input-group"> <span class="input-group-addon">От</span> <input type="text" class="form-control input-blur" onkeyup='this.value=parseInt(this.value) | 0' name="price_before" value="<?php echo $price_before; ?> "> </div> </div> <div class="col-lg-5"> <div class="input-group">
" <?php } ?> > </div> </td> <td class="selectize"> <?php echo \yii\bootstrap\Html::dropDownList("Product[{$number}][category]", isset($receiptProduct) ? $receiptProduct->product->category_id : '', \common\models\Category::getReceiptCategories(), ['class' => 'selectize']); ?> </td> <td class="selectize"> <div class="input-group" style="width: 100%"> <?php echo \yii\bootstrap\Html::dropDownList("Product[{$number}][unit]", isset($receiptProduct) ? $receiptProduct->product->product_unit_id : '', \common\models\ProductUnit::getAll(), ['prompt' => \Yii::t('wallet', 'Select unit'), 'class' => 'selectize']); ?> </div> </td> <td> <div class="spinner"> <div class="input-group"> <input type="text" id="product-count-<?php echo $number; ?> " name="Product[<?php echo $number; ?>
<?php /** * @var \yii\web\View $this * @var \yii\bootstrap\ActiveForm $form * @var \app\modules\shop\models\PaymentType[] $paymentTypes * @var integer $totalPayment */ $currency = \app\modules\shop\models\Currency::getMainCurrency(); ?> <div class="col-md-6 col-md-offset-3"> <div class="row"> <div>К оплате: <?php echo $currency->format($totalPayment); ?> </div> <?php echo \yii\bootstrap\Html::dropDownList('PaymentType', null, array_reduce($paymentTypes, function ($result, $item) { /** @var \app\modules\shop\models\PaymentType $item */ $result[$item->id] = $item->name; return $result; }, []), ['class' => 'form-control']); ?> </div> </div>
<option>Buy</option> <option>Rent</option> <option>Sale</option> </select> </div> <div class="col-lg-7"> <?php echo Html::dropDownList('price', '', ['150000-200000' => '$150,000 - $200,000', '200000-250000' => '$200,000 - $250,000', '250000-300000' => '$250,000 - $300,000', '300000' => '$300,000 - above'], ['class' => 'form-control', 'prompt' => 'Price']); ?> </div> </div> <div class="row"> <div class="col-lg-12"> <?php echo Html::dropDownList('apartment', '', ['Apartment' => 'Apartment', 'Building' => 'Building', 'Office Space' => 'Office Space'], ['class' => 'form-control', 'prompt' => 'Property']); ?> </div> </div> <?php echo Html::submitButton('Find Now', ['class' => 'btn btn-primary']); ?> <?php echo Html::endForm(); ?> </div> <?php echo HotWidget::widget();
</div> </div> <div class="form-group"> <?php echo Html::label('Выбрать из списка преподавателя'); ?> <div class="input-group "> <span class="input-group-addon"> <?php echo Html::radio('source', false, ['value' => 'list']); ?> </span> <?php echo Html::dropDownList('workList', null, $workListArr, ['class' => 'form-control', 'options' => $disabledWorks]); ?> </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 class=""> <div class="input-group drp-container"> <?php echo DateRangePicker::widget(['name' => 'date_range', 'value' => Yii::$app->request->post('date_range') ? Yii::$app->request->post('date_range') : Yii::$app->formatter->asDate('now', 'php:d-M-y') . ' to ' . Yii::$app->formatter->asDate('now', 'php:d-M-y'), 'convertFormat' => true, 'pluginOptions' => ['format' => 'd-M-y', 'separator' => ' to ']]); ?> </div> </div> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label for="inputEmail3" class="control-label">Select User</label> <div class=""> <?php echo Html::dropDownList('player_select', null, [0 => 'All'] + ArrayHelper::map(UserAccounts::find()->all(), 'id', 'name'), ['class' => 'form-control']); ?> </div> </div> </div> <div class="clearfix"></div> <div class="col-sm-12"> <?php echo Html::submitButton('Generate Reports', ['class' => 'btn btn-success ']); ?> </div> <div class="clearfix"></div> </div> </div>
?> "><?php echo $model->getName(Yii::$app->language); ?> </a> </div> <div class="product-price"> $<?php echo number_format($model->price_custom, 2, '.', ''); ?> </div> <div class="product-buttons"> <?php $form = ActiveForm::begin(['action' => \yii\helpers\Url::to(['shopcart/add-product', 'id' => $model->id]), 'options' => ['class' => 'add-to-cart']]); ?> <div class="input-group"> <?php echo \yii\bootstrap\Html::dropDownList('quantity', 1, [1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9], ['class' => 'form-control']); ?> <span class="input-group-btn"> <button class="add-to-cart btn btn-default" type="button"><span class=" glyphicon glyphicon-shopping-cart"></span> <?php echo Yii::t('app', 'Buy'); ?> </button> </span> </div> <?php ActiveForm::end(); ?> </div> </div>
/** * @param $xmlRow * @param $settings * @param bool $place * @return string */ private function generateHtml($xmlRow, $settings, $place = false) { $html = ""; $button_option = $xmlRow['field']; //Проверка "отображать" или нет элемент if (isset($button_option[6]['@attributes']['value']) && $button_option[6]['@attributes']['value'] == "0") { return $html; } $html .= \yii\bootstrap\Html::beginTag("div", ['class' => 'row form-group']); $html .= \yii\bootstrap\Html::beginTag("div", ['class' => 'col-xs-6']); $html .= isset($place[1]) ? str_replace("#place#", $place[1], $button_option[4]['@attributes']['value']) : $button_option[4]['@attributes']['value']; $html .= \yii\bootstrap\Html::endTag("div"); $html .= \yii\bootstrap\Html::beginTag("div", ['class' => 'col-xs-6']); $fieldName = isset($place[0]) ? $place[0] . $button_option[0]['@attributes']['value'] : $button_option[0]['@attributes']['value']; $elProperty = array(); //Проверка "разрешить" редактирование или нет if ($button_option[5]['@attributes']['value'] == "0") { $elProperty["disabled"] = "disabled"; } //Проверка "отображать" или нет элемент if (isset($button_option[6]['@attributes']['value']) && $button_option[6]['@attributes']['value'] == "0") { $elProperty["style"] = "display:none"; } //Дополнительные атрибуты if ($button_option[1]['@attributes']['value'] == "text") { $elProperty["size"] = 50; } switch ($button_option[1]['@attributes']['value']) { case 'text': $match = array(); preg_match("/#(.*)#/i", $button_option[2]['@attributes']['value'], $match); $value = isset($match[1]) && !empty($match[1]) ? eval($match[1]) : $button_option[2]['@attributes']['value']; $html .= \yii\bootstrap\Html::textInput($fieldName, isset($settings[$fieldName]) ? $settings[$fieldName] : $value, $elProperty); break; case 'select': $select = json_decode($button_option[3]['@attributes']['value'], true); $html .= \yii\bootstrap\Html::dropDownList($fieldName, isset($settings[$fieldName]) ? $settings[$fieldName] : $button_option[2]['@attributes']['value'], $select, $elProperty); break; } $html .= \yii\bootstrap\Html::endTag("div"); $html .= \yii\bootstrap\Html::endTag("div"); return $html; }
/** * Ham tao giao dien cho column * @param string $keyColumn ten truong cua column * @param array $column mang setting cua column * @param array $gallery mang gia tri cua image * @param string $module ten module dang su dung * @param string $id id cua 1 anh * @return string */ private static function generateColumnByType($keyColumn, $column, $gallery, $module, $id) { $typeImage = ArrayHelper::getValue($column, 'displayType', 'text'); $items = ArrayHelper::getValue($column, 'items', []); $options = ArrayHelper::getValue($column, 'options', ['class' => 'form-control']); $template = null; switch ($typeImage) { case 'dropdown': $template = Html::dropDownList($module . '[gallery][' . $id . '][' . $keyColumn . ']', ArrayHelper::getValue($gallery, $keyColumn), $items, $options); break; default: $template = Html::textInput($module . '[gallery][' . $id . '][' . $keyColumn . ']', ArrayHelper::getValue($gallery, $keyColumn), $options); break; } return $template; }
<h4>Managers</h4> <?php use yii\bootstrap\Html; ?> <?php echo Html::beginForm('managers'); ?> These are the managers for the group <p> </p> <?php echo Html::dropDownList('managers', array_keys(\yii::$app->CollectionComponent->managerList($collectionModel->id)), \yii::$app->CollectionComponent->managerList($collectionModel->id), ['multiple' => 'multiple', 'id' => 'manager-select', 'style' => 'width:80%']); ?> <?php echo \yii\helpers\Html::endForm(); ?>
<span class="input-group-addon"> <?php echo Html::checkbox('newWorkCheckbox'); ?> </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(); ?>
<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>
return Html::a('<span class="glyphicon glyphicon-trash"></span>', 'javascript:void(0)', $options); }]]]]); ?> <?php Pjax::end(); ?> </div> <div class="col-md-4"> <form onsubmit="return assign();"> <div class="form-group"> <label><?php echo Yii::t('app', 'Add Role'); ?> </label> <?php echo Html::dropDownList('name', null, ArrayHelper::map(Yii::$app->authManager->getRoles(), 'name', 'name'), ['id' => 'item-name', 'class' => 'form-control']); ?> </div> <div class="form-group"> <?php echo Html::submitButton(Yii::t('app', 'Assign'), ['class' => 'btn btn-default']); ?> </div> </form> </div> </div> <script> var uid = <?php echo $uid; ?>
?> </div> <h3>Authorize.net</h3> <div> <label>Access Key</label> <?php echo Html::textInput('properties[authorize_key]', Property::getPropertyValue('authorize_key', ''), ['class' => 'form-control']); ?> <label>Access Login</label> <?php echo Html::textInput('properties[authorize_login]', Property::getPropertyValue('authorize_login', ''), ['class' => 'form-control']); ?> <label>Status</label> <?php echo Html::dropDownList('properties[authorize_live]', Property::getPropertyValue('authorize_live', ''), ['no' => 'Test Mode', 'yes' => 'Live Mode'], ['class' => 'form-control']); ?> </div> <h3>Social Sites</h3> <div> <label>Facebook</label> <?php echo Html::textInput('properties[facebook_link]', Property::getPropertyValue('facebook_link', ''), ['class' => 'form-control']); ?> <label>Twitter</label> <?php echo Html::textInput('properties[twitter_link]', Property::getPropertyValue('twitter_link', ''), ['class' => 'form-control']); ?> </div>
/** * Ham get html cho input theo type * @param string $type input co the la text, textarea, editor, date, datetime, daterange, dropdown, checkbox, radio * @param string $templateSetting giao dien input theo type * @param string $keySetting ten cua key setting * @param string $value gia tri cua key setting * @param array $items Mang cac gia tri cua setting neu setting co type la dropdown, checkbox, radio * @return string */ private static function getInputByType($type = 'text', $templateSetting = null, $keySetting = null, $value = null, $items = []) { switch ($type) { case 'textarea': $templateSetting = Html::textarea($keySetting, $value, ['class' => 'form-control', 'title' => $keySetting]); break; case 'date': $templateSetting = DateControl::widget(['name' => $keySetting, 'value' => $value, 'type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true], 'options' => ['title' => $keySetting]], 'displayFormat' => 'dd-MM-yyyy', 'saveFormat' => 'yyyy-MM-dd']); break; case 'datetime': $templateSetting = DateControl::widget(['name' => $keySetting, 'value' => $value, 'type' => DateControl::FORMAT_DATETIME, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true], 'options' => ['title' => $keySetting]], 'saveFormat' => 'yyyy-MM-dd']); break; case 'daterange': $templateSetting = DateRangePicker::widget(['name' => $keySetting, 'value' => $value, 'presetDropdown' => true, 'hideInput' => true, 'options' => ['title' => $keySetting]]); break; case 'dropdown': $templateSetting = Html::dropDownList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]); break; case 'checkbox': $templateSetting = Html::checkboxList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]); break; case 'radio': $templateSetting = Html::radioList($keySetting, $value, $items, ['class' => 'form-control', 'title' => $keySetting]); break; default: $templateSetting = Html::textInput($keySetting, $value, ['class' => 'form-control', 'title' => $keySetting]); break; } return $templateSetting; }
<?php use yii\bootstrap\Html; use yii\helpers\ArrayHelper; use sya\ecommerce\Module; ?> <!-- Begin view status --> <div id="statusOrder"> <?php if (!$model->getIsNewRecord()) { ?> <?php if (Module::STATUS_COMPLETE != $model->status and Module::STATUS_CLOSE != $model->status and Module::STATUS_CANCEL != $model->status) { ?> <?php echo Html::dropDownList('statusOrder', '', Module::getListStatus($model->status), ['class' => 'form-control', 'onchange' => 'changeStatusOrder(this);']); ?> <?php } else { ?> <?php echo ArrayHelper::getValue(Module::$status, $model->status); ?> <?php } } else { ?> <?php echo ArrayHelper::getValue(Module::$status, Module::STATUS_NEW); } ?>
</div> <div class="ibox-content"> <?php $form = ActiveForm::begin(['id' => 'formDefault', 'layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data'], 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-2', 'wrapper' => 'col-sm-10', 'error' => 'help-block m-b-none', 'hint' => '']]]); foreach ($models as $model) { echo Html::beginTag('div', ['class' => 'form-group']); echo Html::beginTag('label', ['class' => 'col-sm-2 control-label']); echo ucfirst(Yii::t($model->module, $model->key)); echo Html::a('', ['setting/update', 'id' => $model->_id], ['class' => 'glyphicon glyphicon-cog m-l-xs']); echo Html::endTag('label'); echo Html::beginTag('div', ['class' => 'col-sm-10']); if ($model->type === 'text') { echo Html::textInput('setting[' . (string) $model->_id . ']', $model->value, ['class' => 'form-control']); } else { if ($model->type === 'dropdown') { echo Html::dropDownList('setting[' . (string) $model->_id . ']', $model->value, $model->items, ['class' => 'form-control']); } else { if ($model->type === 'checkbox') { echo Html::checkboxList('setting[' . (string) $model->_id . ']', $model->value, $model->items, ['class' => 'i-checks', 'separator' => '<br />']); } else { if ($model->type === 'radio') { echo Html::radioList('setting[' . (string) $model->_id . ']', $model->value, $model->items, ['class' => 'i-checks', 'separator' => '<br />']); } } } } echo Html::endTag('div'); echo Html::endTag('div'); echo Html::beginTag('div', ['class' => 'hr-line-dashed']); echo Html::endTag('div'); }
<div class="col-sm-6"> <div class="form-group"> <label for="category_select" class="control-label">Select Category</label> <div class=""> <?php echo Html::dropDownList('category_select', isset($posted_data['category_select']) ? $posted_data['category_select'] : null, ['0' => 'All'] + ArrayHelper::map(ProductCategories::find()->all(), 'id', 'name'), ['class' => 'form-control', 'id' => 'category_select']); ?> </div> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label for="warehouse_select" class="control-label">Select Warehouse</label> <div class=""> <?php echo Html::dropDownList('warehouse_select', isset($posted_data['warehouse_select']) ? $posted_data['warehouse_select'] : null, ['0' => 'All'] + ArrayHelper::map(Warehouse::find()->all(), 'id', 'name'), ['class' => 'form-control', 'id' => 'warehouse_select']); ?> </div> </div> </div> <div class="clearfix"></div> <div class="col-sm-6"> <div class="form-group"> <label for="products_select" class="control-label">Select Products</label> <div class=""> <?php echo Select2::widget(['name' => 'products_select', 'value' => isset($posted_data['products_select']) ? $posted_data['products_select'] : 0, 'data' => ['0' => 'All'] + ArrayHelper::map(Products::find()->all(), 'id', 'name'), 'options' => ['placeholder' => 'Select Products ...', 'class' => 'form-control', 'id' => 'products_select']]); ?> </div> </div>
<li role="presentation"><a href="<?php echo Url::to(['/account/rbac/actionlist']); ?> "><?php echo Yii::t('account', 'Action list'); ?> </a></li> </ul> <div class="row m-b-sm"> <div class="col-lg-12"> <div id="msg" style="display: none;" class="alert alert-dismissable"></div> <?php if (!empty($role)) { echo Html::buttonInput(Yii::t('common', 'Save'), ['class' => 'btn btn-primary m-r-md', 'onclick' => 'addPermissionFromRole();']); } echo Html::dropDownList('choseRole', $role, ArrayHelper::map($auth->getRoles(), 'name', 'description'), ['prompt' => Yii::t('account', 'Select a role'), 'class' => 'chosen-select', 'id' => 'role', 'onchange' => 'changeUrlPermission()']); ?> </div> </div> <div id="message"></div> <?php if (!empty($role)) { echo Html::hiddenInput('allPermission', implode(',', \app\helpers\ArrayHelper::map($dataProvider->getModels(), '_id', 'name')), ['id' => 'allPermission']); echo GridView::widget(['panel' => ['heading' => Yii::t(Yii::$app->controller->module->id, 'Account'), 'tableOptions' => ['id' => 'listDefault']], 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'app\\modules\\account\\components\\SelectPermissionForRoleColumn'], 'name', 'description', 'rule_name'], 'responsive' => true, 'hover' => true]); } ?> </div> <script type="text/javascript">
echo Html::label('Валюта', 'from_billing'); ?> <?php echo DepDrop::widget(['name' => 'from_currency', 'options' => ['id' => 'from_currency', 'placeholder' => 'Выберите валюту...'], 'pluginEvents' => ['change' => 'getRate'], 'pluginOptions' => ['depends' => ['from_billing'], 'placeholder' => 'Выберите валюту...', 'url' => Url::to(['/site/currency']), 'loadingText' => 'Загрузка ...']]); ?> </div> </div> <div class="col-lg-6"> <h2 class="text-center">В</h2> <div class="form-group"> <?php echo Html::label('Платежная система', 'from_billing'); ?> <?php echo Html::dropDownList('to_billing', null, $billings, ['id' => 'to_billing', 'class' => 'form-control', 'prompt' => 'Выберите платежную систему...']); ?> </div> <div class="form-group"> <?php echo Html::label('Валюта', 'to_billing'); ?> <?php echo DepDrop::widget(['name' => 'to_currency', 'options' => ['id' => 'to_currency', 'placeholder' => 'Выберите валюту...'], 'pluginEvents' => ['change' => 'getRate'], 'pluginOptions' => ['depends' => ['to_billing'], 'placeholder' => 'Выберите валюту...', 'url' => Url::to(['/site/currency']), 'loadingText' => 'Загрузка ...']]); ?> </div> </div> </div> <div class="row">
/** * @return string */ public function renderField() { switch ($this->type) { case 'textInput': return Html::textInput($this->param_name, $this->param_value, ['class' => 'form-control']); break; case 'textarea': return Html::textarea($this->param_name, $this->param_value, ['class' => 'form-control']); break; case 'checkbox': return Html::hiddenInput($this->param_name, 0) . \oakcms\bootstrapswitch\Switcher::widget(['name' => $this->param_name, 'checked' => $this->param_value]); break; case 'language': return Html::dropDownList($this->param_name, $this->param_value, ArrayHelper::map(Language::getLanguages(), 'language_id', 'name'), ['class' => 'form-control']); break; case 'getTheme': $files = scandir(Yii::getAlias('@app') . '/templates/frontend'); $items = []; foreach ($files as $file) { //if(!is_file($file) AND $file != '.' AND $file != '..') { if ($file != '.' and $file != '..') { $items[$file] = $file; } } return Html::dropDownList($this->param_name, $this->param_value, $items, ['class' => 'form-control']); break; } }