本文整理汇总了PHP中CHtml::activeListBox方法的典型用法代码示例。如果您正苦于以下问题:PHP CHtml::activeListBox方法的具体用法?PHP CHtml::activeListBox怎么用?PHP CHtml::activeListBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CHtml
的用法示例。
在下文中一共展示了CHtml::activeListBox方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?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();
示例2: array
<?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'));
?>
示例3: array
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'));
?>
示例4: listBox
/**
* 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);
}
示例5: array
?>
<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'));
?>
示例6: array
<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
示例7: array
<?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 -->
示例8: elseif
<?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
示例9: array
<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')) {
示例10: array
</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>
示例11: function
<?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>
示例12: activeListBox
public static function activeListBox($model, $attribute, $data, $htmlOptions = array())
{
self::getJValidateInstance()->activeListBox($model, $attribute, $data, $htmlOptions);
return parent::activeListBox($model, $attribute, $data, $htmlOptions);
}
示例13: array
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>
示例14: switch
<?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);
示例15: array
<?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' => ' '));