<?php echo CHtml::activeListBox($model, 'addfilesperms', $roles, array('size' => 20, 'multiple' => 'multiple', 'class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'addfilesperms', array('class' => 'input-notification errorshow png_bg')); ?> <?php echo CHtml::activeLabel($model, 'autoaddperms'); ?> <small><?php echo Yii::t('extensions', 'User roles that can add blog this category without the need of manual approval (Defaults to nobody)'); ?> </small><br /> <?php echo CHtml::activeListBox($model, 'autoaddperms', $roles, array('size' => 20, 'multiple' => 'multiple', 'class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'autoaddperms', array('class' => 'input-notification errorshow png_bg')); ?> <br /> <p> <?php echo CHtml::submitButton(Yii::t('adminglobal', 'Submit'), array('class' => 'button', 'name' => 'submit')); ?> </p> <?php echo CHtml::endForm();
<?php echo CHtml::activeTextArea($model, 'metakeys', array('class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'metakeys', array('class' => 'input-notification errorshow png_bg')); ?> <?php echo CHtml::label(Yii::t('admincustompages', 'Page Visibility'), ''); ?> <small><?php echo Yii::t('admincustompages', 'User roles that can access this page (Defaults to everyone)'); ?> </small><br /> <?php echo CHtml::activeListBox($model, 'visible', $roles, array('size' => 20, 'prompt' => Yii::t('admincustompages', '-- ALL --'), 'multiple' => 'multiple', 'class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'visible', array('class' => 'input-notification errorshow png_bg')); ?> <?php echo CHtml::label(Yii::t('admincustompages', 'Page Status'), ''); ?> <?php echo CHtml::activeDropDownList($model, 'status', array(0 => Yii::t('admincustompages', 'Hidden (Draft)'), 1 => Yii::t('admincustompages', 'Open (Published)')), array('class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'status', array('class' => 'input-notification errorshow png_bg')); ?>
echo $form->error($model, 'alias'); ?> </div> </div> </div> <div class="row form-group"> <div class="col-3 form-collabel"> <?php echo Yii::t('app', 'Поместить в'); ?> </div> <div class="col-9"> <?/*=$form->dropDownList($model,'parent_id', ShopCategories::model()->getAssocList(), array('class'=>'form-input')); */?> <?php echo CHtml::activeListBox($model, 'category_id', ShopCategories::getAssocList()->list, array('options' => ShopCategories::getAssocList()->listOptions, 'class' => 'form-input', 'size' => 0)); ?> </div> </div> <div class="row form-group"> <div class="col-3 form-collabel"> <?php echo Yii::t('app', 'Цена'); ?> <span class="required">*</span> </div> <div class="col-9"> <?php echo $form->textField($model, 'price', array('class' => 'form-input')); ?>
/** * Renders a list box for a model attribute. * This method is a wrapper of {@link CHtml::activeListBox}. * Please check {@link CHtml::activeListBox} for detailed information * about the parameters for this method. * @param CModel $model the data model * @param string $attribute the attribute * @param array $data data for generating the list options (value=>display) * @param array $htmlOptions additional HTML attributes. * @return string the generated list box */ public function listBox($model, $attribute, $data, $htmlOptions = array()) { return CHtml::activeListBox($model, $attribute, $data, $htmlOptions); }
?> <div class="form-group"> <?php echo CHtml::activeLabel($model, 'show_type', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <div class="input-icon input-large right"> <i class="fa fa-exclamation tooltips font-red" style="display:none;" data-original-title="<?php echo $model->getError('show_type'); ?> " data-container="body"></i> <?php echo CHtml::activeListBox($model, 'show_type', Faq::getShowTypesList(), array('class' => 'form-control', 'size' => (int) TRUE)); ?> </div> <p class="help-block text-danger" style="color: #a94442;"><?php echo $model->getError('show_type'); ?> </p> </div> </div> </div> <div class="form-actions"> <?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('app', 'Добавить') : Yii::t('app', 'Сохранить'), array('class' => 'btn green', 'name' => 'btn_save')); ?>
<div class="col-md-9"> <?php echo CkeditorHelper::init(array('name' => 'ReviewsLang[text]', 'type' => 'form-control input-large', 'ckfinder' => true, 'value' => $model_lang->text)); ?> <?php echo CHtml::error($model_lang, 'text', array('style' => 'color: red;')); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'sort_no', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <?php echo CHtml::activeListBox($model, 'sort_no', $list, array('size' => 0, 'class' => 'form-control input-large')); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'sort_no', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <?php echo CHtml::activeDropDownList($model, 'is_active', array('0' => Yii::t('app', 'Не активен'), '1' => Yii::t('app', 'Активен')), array('class' => 'form-control input-large')); ?> </div> </div> <div class="form-group"> <label class="col-md-3 control-label"><?php
<?php echo CHtml::label(Yii::t('adminroles', 'Auth Item Parent'), ''); ?> <?php echo CHtml::activeDropDownList($model, 'parent', $roles, array('prompt' => Yii::t('global', '-- Choose Value --'), 'class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'parent', array('class' => 'input-notification errorshow png_bg')); ?> <?php echo CHtml::label(Yii::t('adminroles', 'Auth Item Child'), ''); ?> <?php echo CHtml::activeListBox($model, 'child', $roles, array('size' => 20, 'multiple' => 'multiple', 'prompt' => Yii::t('global', '-- Choose Value --'), 'class' => 'text-input medium-input')); ?> <?php echo CHtml::error($model, 'child', array('class' => 'input-notification errorshow png_bg')); ?> <p><?php echo CHtml::submitButton(Yii::t('adminglobal', 'Submit'), array('class' => 'button')); ?> </p> <?php echo CHtml::endForm(); ?> </div> <!-- End .content-box-content -->
<?php } elseif ($field->param->show_type == UsersRegisterFieldsParams::SHOW_TYPE_DYNAMIC) { ?> <?php echo Yii::t('app', 'Динамически изменяемое поле'); ?> <?php } ?> </div> <div id="fieldParamDyn_<?php echo $field->id; ?> " style="display: none;"> <?php echo CHtml::activeListBox($field->param, 'show_type', array(UsersRegisterFieldsParams::SHOW_TYPE_PASSWORD => 'Отображать текстовым полем со скрытым вводом', UsersRegisterFieldsParams::SHOW_TYPE_TEXT => 'Отображать текстовым полем', UsersRegisterFieldsParams::SHOW_TYPE_DYNAMIC => 'Динамически изменяемое поле'), array('size' => 1, 'id' => 'fieldParamText_' . $field->param->id)); ?> <div style="float: right; width: 60px; margin-top: 5px;"> <?php echo CHtml::link('<span class="apply" title="Сохранить параметр"> </span>', 'javascript: void(0)', array('onClick' => 'saveFieldParam(' . $field->param->id . ', ' . $field->id . ')')); ?> <?php echo CHtml::link('<span class="cancel" title="Отмена"> </span>', 'javascript: void(0)', array('onClick' => 'hideFieldParam(' . $field->id . ')')); ?> </div> </div> <?php } elseif ($field->field == 'sex') { ?> <?php
<div class="portlet-body form form-horizontal"> <div class="form-body"> <div class="mt20"></div> <div class="form-group <?php if (count($newtypes) == 1) { ?> hidden<?php } ?> "> <?php echo CHtml::activeLabelEx($model, 'news_types__id', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <?php echo CHtml::activeListBox($model, 'news_types__id', $newtypes, array('class' => 'form-control input-large', 'size' => '0')); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model_lang, 'title', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <div class="input-icon right"> <i class="fa fa-exclamation tooltips" style="color:#f3565d; display:none;" data-original-title="<?php echo $model_lang->getError('title'); ?> " data-container="body"></i> <div style="width: 322px !important;" class="<?php if ($model_lang->hasErrors('title')) {
</div> <div class="col-9"> </div> </div> <div class="row form-group"> <div class="col-3 form-collabel"> <?php echo Yii::t('app', 'Поместить в'); ?> </div> <div class="col-9"> <?/*=$form->dropDownList($model,'parent_id', ShopCategories::model()->getAssocList(), array('class'=>'form-input')); */?> <?php echo CHtml::activeListBox($model, 'parent_id', $possibleParents->list, array('options' => $possibleParents->listOptions, 'class' => 'form-input', 'size' => 0)); ?> </div> </div> <div class="row form-group"> <div class="col-3 form-collabel"> <?php echo Yii::t('app', 'Отобразить при выборе категории'); ?> </div> <div class="col-9 form-collabel"> <?php echo $form->radioButtonList($model, 'is_content_page', $model->getMappingList(), array('separator' => ' ')); ?> </div>
<?php echo $form->labelEx($model, 'relatedA'); ?> <?php echo CHtml::activeListBox($model, 'relatedA', CHtml::listData(Product::model()->findAll(), 'id', function ($data) { return $data->getName(); }), array('multiple' => 'multiple')); ?> <?php echo $form->error($model, 'relatedA'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'stores'); ?> <?php echo CHtml::activeListBox($model, 'stores', CHtml::listData(Store::model()->findAll(), 'id', 'name'), array('multiple' => 'multiple')); ?> <?php echo $form->error($model, 'stores'); ?> </div> <?php $this->endWidget(); ?> </div>
public static function activeListBox($model, $attribute, $data, $htmlOptions = array()) { self::getJValidateInstance()->activeListBox($model, $attribute, $data, $htmlOptions); return parent::activeListBox($model, $attribute, $data, $htmlOptions); }
echo $form->errorSummary($model); ?> <div class="row"> <?php echo $form->textField($model, 'name', array('maxlength' => 50)); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'branches'); ?> <?php echo CHtml::activeListBox($model, 'branches', CHtml::listData(Branch::model()->findAll(), 'id', 'branchCode'), array('multiple' => 'multiple')); ?> <?php echo $form->error($model, 'branches'); ?> </div> <div class="row buttons"> <?php echo TbHtml::submitButton($model->isNewRecord ? Yii::t('main', 'Create') : Yii::t('main', 'Save'), array('color' => TbHtml::BUTTON_COLOR_SUCCESS)); ?> <?php echo TbHtml::linkButton(Yii::t('main', 'Cancel'), array('color' => TbHtml::BUTTON_COLOR_DANGER, 'url' => array('index'))); ?> </div>
<?php switch ($type) { case 'single': echo CHtml::activeTextField($row, $column->name, array_merge((array) $htmlOptions, array('maxlength' => $column->size, 'class' => 'text'))); break; case 'number': echo CHtml::activeTextField($row, $column->name, array_merge((array) $htmlOptions, array('maxlength' => $column->precision))); break; case 'select': echo CHtml::activeDropDownList($row, $column->name, $this->getEnumValues(), $htmlOptions); break; case 'select-multiple': echo CHtml::activeListBox($row, $column->name, $this->getEnumValues(), array_merge((array) $htmlOptions, array('multiple' => 'multiple'))); break; case 'text': echo CHtml::activeTextArea($row, $column->name, array_merge((array) $htmlOptions, array('style' => 'min-width: 500px; min-height: 100px;'))); break; case 'file': echo '<script type="text/javascript"> $(document).ready(function() { $("#<?php echo CHtml::$idPrefix; ?>").submit(function() { alert("ok1"); }); }); </script>'; echo CHtml::activeFileField($row, $column->name, $htmlOptions); break; case 'checkbox': echo CHtml::activeCheckBox($row, $column->name, $htmlOptions);
<?php } ?> <span class="help-block text-danger"><?php echo $form->error($model, 'parent_id'); ?> </span> </div> </div> <div class="form-group" style="margin-top: 20px;"> <?php echo $form->labelEx($model, 'sort_no', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <?php echo CHtml::activeListBox($model, 'sort_no', $neighborsItems, array('size' => 0, 'class' => 'form-control input-inline input-large')); ?> <span class="help-block text-danger"><?php echo $form->error($model, 'sort_no'); ?> </span> </div> </div> <div class="form-group" style="margin-top: 20px;"> <?php echo $form->labelEx($model, 'is_content_page', array('class' => 'col-md-3 control-label')); ?> <div class="col-md-9"> <?php $accountStatus = array('0' => 'Товары подкатегорий', '1' => 'Контентную страницу'); echo $form->radioButtonList($model, 'is_content_page', $accountStatus, array('separator' => ' '));
<span class="help-block text-danger" style="color: #a94442;"><?php echo $form->error($model, 'show_at_home'); ?> </span> </div> </div> <?php } ?> <div class="form-group" style="margin-top: 20px;"> <?php echo $form->labelEx($model, 'currency__id', array('class' => 'col-md-2 control-label')); ?> <div class="col-md-10"> <?php echo CHtml::activeListBox($model, 'currency__id', $currenciesList, array('class' => 'form-control', 'size' => 0)); ?> <span class="help-block text-danger" style="color: #a94442;"><?php echo $form->error($model, 'currency__id'); ?> </span> </div> </div> <div class="form-group" style="margin-top: 20px;"> <?php echo $form->labelEx($model, 'price', array('class' => 'col-md-2 control-label')); ?> <div class="col-md-10"> <?php echo $form->textField($model, 'price', array('size' => 10, 'maxlength' => 10, 'class' => 'form-control', 'id' => 'price')); ?>
?> </div> </div> <?php } ?> <?php if ((bool) $settings->allowed_change_animation) { ?> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'slidebar_animation_types__id', array('class' => 'control-label col-md-3')); ?> <div class="col-md-9"> <?php echo CHtml::activeListBox($model, 'slidebar_animation_types__id', SlidebarAnimationTypes::getTypes(), array('class' => 'form-control input-large', 'size' => (int) TRUE, 'style' => 'width: 300px;')); ?> <div class="note note-info input-large mt15" id="animation_desc"></div> <?php foreach (SlidebarAnimationTypes::getDescriptions() as $id => $desc) { ?> <div style="display: none;" id="desc_<?php echo $id; ?> "><?php echo CHtml::encode($desc); ?> </div> <?php }
</div> </div> <div class="form-body "> <div class="form-group "> <?php $fontscategory_array = array(); $fontscategory_object = FontsCategory::model()->findAll(); foreach ($fontscategory_object as $key => $value) { $fontscategory_array[$value->id] = $value->lang->title; } ?> <?php echo CHtml::activeLabelEx($model, 'fonts_category__id'); ?> <?php echo CHtml::activeListBox($model, 'fonts_category__id', $fontscategory_array, array('class' => 'normal form-control', 'size' => '0', 'style' => 'width: 250px;')); ?> <span class="help-block"></span> </div> </div> <div class="form-body "> <div class="form-group "> <?php echo CHtml::activeLabelEx($model, 'title'); ?> <?php echo CHtml::activeTextField($model, 'title', array('class' => 'normal form-control', 'style' => 'width: 50%;')); ?> <span class="help-block"></span>
?> </p> <p id="ticket-version" class='inline-input'> <?php echo CHtml::activeLabel($search, 'version'); ?> <?php echo CHtml::activeListBox($search, 'version', CHtml::listData(TicketVersion::model()->findAll(), 'id', 'title'), array('multiple' => 'multiple')); ?> </p> <p id="ticket-fixedin" class='inline-input'> <?php echo CHtml::activeLabel($search, 'fixedin'); ?> <?php echo CHtml::activeListBox($search, 'fixedin', CHtml::listData(TicketVersion::model()->findAll(), 'id', 'title'), array('multiple' => 'multiple')); ?> </p> <p id="ticket-reportedby" class='inline-input'> <?php echo CHtml::activeLabel($search, 'reportedby'); ?> <?php $this->widget('zii.widgets.jui.CJuiAutoComplete', array('attribute' => 'reportedby', 'model' => $search, 'source' => $this->createUrl('/tickets/getUserNames'), 'options' => array('minLength' => '2'), 'htmlOptions' => array('style' => 'height:20px;'))); ?> <?php echo CHtml::error($search, 'reportedby', array('class' => 'errorMessage inline-input')); ?> </p> <p id="ticket-assignedto" class='inline-input'> <?php
echo CHtml::activeDropDownList($model, 'type', $model->messageTypes, array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'chzn-select validate[required] pm-create-message-type ')); ?> <?php echo CHtml::error($model, 'type'); ?> </div> <div class="clear"></div> <hr /> <div class="grid-3-12"><?php echo CHtml::activeLabelEx($model, 'to'); ?> </div> <div class="grid-9-12"> <?php echo CHtml::activeListBox($model, 'to', $model->getRecipientsList(), array('data-placeholder' => at('Please at least one recipient'), 'prompt' => '', 'multiple' => 'multiple', 'class' => 'chzn-select validate[required] pm-create-message-to')); ?> <?php if (getParam('personal_message_max_participants')) { ?> <br /><span class="subtip"><?php echo at("Maximum participants: {n}", array('{n}' => getParam('personal_message_max_participants'))); ?> </span> <?php } ?> <?php echo CHtml::error($model, 'to'); ?> </div>
/** * Render widget input. */ public function run() { if (isset($this->options['ajax'])) { if ($this->hasModel()) { echo CHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions); } else { echo CHtml::textField($this->name, $this->value, $this->htmlOptions); } } else { if (isset($this->htmlOptions['multiple']) && $this->htmlOptions['multiple'] == 'true') { if ($this->hasModel()) { echo CHtml::activeListBox($this->model, $this->attribute, $this->data, $this->htmlOptions); } else { echo CHtml::listBox($this->model, $this->attribute, $this->data, $this->htmlOptions); } } else { if ($this->hasModel()) { echo CHtml::activeDropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions); } else { echo CHtml::dropDownList($this->name, $this->value, $this->data, $this->htmlOptions); } } } }
echo CHtml::activeDropDownList($model, 'parent', $roles, array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'chzn-select validate[required]')); ?> <?php echo CHtml::error($model, 'parent'); ?> </div> <div class="clear"></div> <hr /> <div class="grid-3-12"><?php echo CHtml::activeLabelEx($model, 'type'); ?> </div> <div class="grid-9-12"> <?php echo CHtml::activeListBox($model, 'child', $roles, array('multiple' => 'multiple', 'size' => 20, 'style' => 'width:500px;height:200px;')); ?> <?php echo CHtml::error($model, 'child'); ?> </div> <div class="clear"></div> <hr /> </div> <div class="clear"></div> </div> <!--Form footer begin--> <section class="box_footer"> <div class="grid-12-12">
</div> <?php } ?> <div class="form-group" style="margin-top: 20px;"> <div class='col-md-2 control-label'><?php echo $form->labelEx($model, 'catalogues'); ?> <span class="help-block help-italic"> <?php echo Yii::t('app', 'Зажмите Ctrl для выбора нескольких каталогов'); ?> </span></div> <div class="col-md-10"> <?php echo CHtml::activeListBox($model, 'catalogues', $cataloguesOptions->list, array('options' => $cataloguesOptions->params, 'class' => 'form-control', 'style' => 'height: 170px;', 'multiple' => 'multiple')); ?> <span class="help-block text-danger"><?php echo $form->error($model, 'catalogues'); ?> </span> </div> </div> <div class="form-group" style="margin-top: 20px;"> <?php echo $form->labelEx($model->currentLangModel, 'meta_description', array('class' => 'col-md-2 control-label')); ?> <div class="col-md-10"> <?php echo $form->textArea($model->currentLangModel, 'meta_description', array('size' => 60, 'maxlength' => 255, 'class' => 'form-control')); ?>
{ jQuery( "#<?php echo CHtml::activeId($model, $attribute); ?> " ).multiSelect(); } }); </script> <div class="row-form clearfix"> <div class="span3"><?php echo $model->getAttributeLabel($attribute); ?> </div> <div class="clear"></div> <div class="span11"> <?php echo CHtml::activeListBox($model, $attribute, $data, array('multiple' => 'multiple')); ?> <span class="error" id="<?php echo CHtml::activeId($model, $attribute); ?> _error"> <?php echo $model->getError($attribute); ?> </span> </div> </div>