当前位置: 首页>>代码示例>>PHP>>正文


PHP CHtml::activeCheckBoxList方法代码示例

本文整理汇总了PHP中CHtml::activeCheckBoxList方法的典型用法代码示例。如果您正苦于以下问题:PHP CHtml::activeCheckBoxList方法的具体用法?PHP CHtml::activeCheckBoxList怎么用?PHP CHtml::activeCheckBoxList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CHtml的用法示例。


在下文中一共展示了CHtml::activeCheckBoxList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkBoxList

	public function checkBoxList($model, $attribute)
	{
		if ($model !== null) {
			return CHtml::activeCheckBoxList($model, $attribute, $this->all);
		} else 	
			return CHtml::checkBoxList($attribute, '', $this->all);
			
	}
开发者ID:nizsheanez,项目名称:PolymorphCMS,代码行数:8,代码来源:VariantListBase.php

示例2: array

?>
</b>
	<?php 
echo $form->dropDownList($model, 'id_tipo_bus', CHtml::listData(Stipobus::model()->findAll(), 'id_tipo_bus', 'desc_tipo_bus'), array('empty' => '-- Seleccionar --'));
?>

	<?php 
echo $form->textFieldRow($model, 'carga_maxima', array('style' => 'width:100px'));
?>
	<?php 
echo $form->fileFieldRow($model, 'imagen', array('class' => 'span5', 'maxlength' => 500));
?>
	<?php 
echo $form->textAreaRow($model, 'observaciones', array('rows' => 4, 'cols' => 35, 'class' => 'span4'));
?>
	<b><?php 
echo $form->labelEx($model, 'configuracion');
?>
</b>
    <?php 
echo CHtml::activeCheckBoxList($model, 'configuracion', CHtml::listData(scodobjventasextras::model()->findAll(), 'id_cod_obj_venta_extra', 'name'));
?>

	<div class="form-actions">
		<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Almacenar' : 'Actualizar'));
?>
	</div>

<?php 
$this->endWidget();
开发者ID:bbustillos,项目名称:saleh_dev,代码行数:31,代码来源:_form.php

示例3: array

echo $form->textField($model, 'email', array('size' => 60, 'maxlength' => 100));
?>
		<?php 
echo $form->error($model, 'email');
?>
	</div>

        <div class="row">

		<?php 
echo $form->labelEx($model, '_selected_roles');
?>
		
		<?php 
echo CHtml::activeCheckBoxList($model, '_selected_roles', CHtml::listData($model->getActiveRoles(), 'id', 'name'), array('style' => 'float: left; 
						  margin-right: 5px; 
						  margin-top: 0px;'));
?>
		<?php 
echo $form->error($model, '_selected_roles');
?>
	</div>

	<div class="row" >
		<?php 
echo CHtml::encode($model->getAttributeLabel('active'));
?>
    	<?php 
echo $form->checkbox($model, 'active');
?>
		<?php 
开发者ID:rodespsan,项目名称:LMEC,代码行数:31,代码来源:_form.php

示例4: activeCheckBoxList

 public static function activeCheckBoxList($model, $attribute, $data, $htmlOptions = array())
 {
     self::getJValidateInstance()->activeCheckBoxList($model, $attribute, $data, $htmlOptions);
     return parent::activeCheckBoxList($model, $attribute, $data, $htmlOptions);
 }
开发者ID:schyzoo,项目名称:YiiBoilerplate,代码行数:5,代码来源:EHtml.php

示例5: array

        echo CHtml::activeCheckBoxList($propertyAmenities, 'houseAmenities', CHtml::listData(CategoryAmenities::model()->findAll('amenity_type=:amenityType', array(':amenityType' => '0')), 'id', 'amenity'));
        ?>
</div>
	</li>
	<li class="error_message"><?php 
        echo CHtml::error($propertyAmenities, 'houseAmenities');
        ?>
</li>
</ul>
<ul>
	<li><span><label for="Property_description" class="required">External
	Amenities <span class="required"></span></label></span> <?php 
        //echo CHtml::activeDropdownList($propertyAmenities,'amenity_id[]',CHtml::listData(CategoryAmenities::model()->findAll(),'id','amenity'),array('size'=>'5','multiple'=>'multiple','id'=>'amenities-multi'))
        ?>
	<div class="multi_checkbox avg"><?php 
        echo CHtml::activeCheckBoxList($propertyAmenities, 'externalAmenities', CHtml::listData(CategoryAmenities::model()->findAll('amenity_type=:amenityType', array(':amenityType' => '1')), 'id', 'amenity'));
        ?>
</div>
	</li>
	<li class="error_message"><?php 
        echo CHtml::error($propertyAmenities, 'externalAmenities');
        ?>
</li>
</ul>
</fieldset>
<?php 
        break;
}
?>

开发者ID:romeo14,项目名称:wallfeet,代码行数:29,代码来源:getPropertyFeatures.php

示例6: array

        echo CHtml::activeDropDownList($modelProperty, 'transaction_type_id', CHtml::listData(PropertyTransactionTypes::model()->findAll(), 'id', 'transaction_type'), array('class' => 'select_box', 'empty' => 'All'));
        ?>
			</td>
		</tr>
		<tr>
			<td><label>Age Of Construction</label><br />
			<?php 
        echo CHtml::activeDropDownList($modelProperty, 'age_of_construction', CHtml::listData(PropertyAgeOfConstruction::model()->findAll(), 'id', 'age'), array('empty' => 'All', 'class' => 'select_box'));
        ?>
			</td>
		</tr>
		<tr>
			<td><label>Type of Ownership</label> <?php 
        echo CHtml::activeDropDownList($modelProperty, 'ownership_type_id', CHtml::listData(CategoryOwnershipTypes::model()->findAll(), 'id', 'ownership_type'), array('empty' => 'All', 'class' => 'select_box'));
        ?>
			</td>
		</tr>
		<tr>
			<td><label>Amenities</label><br />
			<div class="multi_checkbox med"><?php 
        //$amenities = isset($_POST['amenity_id'])? $_POST['amenity_id'] : null;
        echo CHtml::activeCheckBoxList($propertyAmenities, 'amenity_id', CHtml::listData(CategoryAmenities::model()->findAll(), 'id', 'amenity'), array('size' => '5', 'multiple' => 'multiple', 'id' => 'amenities-multi'));
        //echo CHtml::checkBoxList('amenity_id',$amenities,CHtml::listData(CategoryAmenities::model()->findAll(),'id','amenity'),array('size'=>'5','multiple'=>'multiple','id'=>'amenities-multi'));
        ?>
</div>
			</td>
		</tr>
	</table>
<?php 
        break;
}
开发者ID:romeo14,项目名称:wallfeet,代码行数:31,代码来源:getPropertyCriteriaType.php

示例7:

            </br></br><h3>Вид</h3>
            <?php 
echo CHtml::activeDropDownList($form, 'inkind', $inkind);
?>
            </br></br><h3>Цена (у.е.)</h3>
            <p>min:<?php 
echo CHtml::activeNumberField($form, 'min');
?>
</p>
            <p>max:<?php 
echo CHtml::activeNumberField($form, 'max');
?>
</p>
            </br><h3>Производитель</h3>
          <?php 
echo CHtml::activeCheckBoxList($form, 'producer', $producer);
?>
</p>

            <?php 
echo CHtml::SubmitButton('Поиск');
?>

        </div>
        <?php 
echo CHtml::endForm();
?>
    </div>
    <div id="SelectFooter"></div>
</div>
开发者ID:stanhelen87,项目名称:mysite,代码行数:30,代码来源:productSelect.php

示例8: array

////        'panel 3'=>$this->renderPartial('list',null,true),
//    ),
//    // additional javascript options for the accordion plugin
//    'options'=>array(
//        'animated'=>'bounceslide',
//    ),
//));
?>

<h3>Suche einschränken: </h3>
<div class="adv_row">
<?php 
echo CHtml::activeDropDownList($search, 'wortart', CHtml::listData(wortarten::model()->findAll(), 'bezeichnung', 'bezeichnung'), array('prompt' => 'alle Wortarten'));
?>
</div>
<div class="adv_row">
<?php 
echo CHtml::activeDropDownList($search, 'kategorie', CHtml::listData(kategorien::model()->findAll(), 'bezeichnung', 'bezeichnung'), array('prompt' => 'alle Kategorien'));
?>
</div>
<!--
activeCheckBox: <?php 
echo CHtml::activeCheckBox($search, 'wortart', array('value' => 'Substantiv'));
?>
<br /><br />

<?php 
echo CHtml::activeCheckBoxList($search, 'wortart', CHtml::listData(wortarten::model()->findAll(), 'bezeichnung', 'bezeichnung'), array('template' => '{input}{label}', 'separator' => '<br />', 'checkAll' => 'alle Wortarten'));
?>
-->
开发者ID:BackupTheBerlios,项目名称:swahili-dict,代码行数:30,代码来源:_advancedSearch.php

示例9: foreach

					<div class="privilege_main">
						<?php 
foreach ($privileges as $i => $privilege) {
    ?>
						<div class="privilege_wide">
							<h3 class="title"><?php 
    echo $privilege['label'];
    ?>
</h3>
							<div class="selectbox" style="margin-bottom:5px;">
								<a href="#" class="selected-all">全选</a> /
								<a href="#" class="inverse">反选</a>
							</div>
							<div class="optionbox">
								<?php 
    echo CHtml::activeCheckBoxList($form, 'privileges', CHtml::listData($privilege['items'], 'privilege', 'label'), array('id' => false, 'class' => 'privileges'));
    ?>
							</div>
						</div>
						<?php 
}
?>
					</div>
				</div>
				<?php 
echo Helper::fieldTips('权限修改后管理员需要重新登录系统方可生效');
?>
			</td>
		</tr>
	</table>
开发者ID:kinghinds,项目名称:kingtest2,代码行数:30,代码来源:updatePrivilege.php

示例10:

        <div style="margin-top: -20px">
            <?php 
$current_url = $this->createUrl('site/msghistory');
?>

            <table class="formtable left" style="margin-right: 20px;">
            <tr>
                <th><?php 
echo CHtml::activeLabel($form, 'type');
?>
</th>
            </tr>
            <tr>
                <td>
                    <?php 
echo CHtml::activeCheckBoxList($form, 'types', $form->getTypes());
?>
                    <?php 
echo CHtml::error($form, 'types');
?>
 
                </td>
            </tr>
            </table>        
        
            <table class="formtable left middlecolumns" id="filterparams" >
            <tr>
                <th><?php 
echo CHtml::activeLabel($form, 'date_from');
?>
</th>
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:31,代码来源:messages_history.php

示例11: array

?>
                <div class="controls">
                    <?php 
echo CHtml::activeTextField($signupForm, 'email', array('class' => 'input-xlarge', 'data-required' => 'ture', 'data-type' => 'email'));
echo CHtml::tag('span', array('class' => 'help-inline'), $signupForm->getError('email'));
?>
                </div>
            </div>
            <div class="well well-smallest">
                <strong>
                <?php 
echo Yii::t('SignUpForm', 'Product list');
?>
                </strong>
            </div>
            <div class="row-fluid row-product-list">
                <?php 
echo CHtml::activeCheckBoxList($signupForm, 'products', $productOpts, array('separator' => '', 'template' => '<div class="checkbox inline span4">{input}{label}</div>'));
?>
            </div>
            <div class="row-fluid">
               <?php 
echo CHtml::submitButton(Yii::t('SignUpForm', 'Signup'), array('class' => 'btn btn-primary'));
?>
            </div>
            <?php 
echo CHtml::endForm();
?>
        </div>
    </body>
</html>
开发者ID:xuzhitong89,项目名称:web1.0,代码行数:31,代码来源:signup.php

示例12: checkBoxListLimited

    /**
     * The same as CHtml::checkBoxList, but with js handlers to limit the number
     * of choices in the list
     *
     * @param  [type] $model       [description]
     * @param  [type] $attribute   [description]
     * @param  [type] $data        [description]
     * @param  array  $htmlOptions [description]
     * @param  integer $maxLimit
     * @return string  checkBoxList
     */
    public static function checkBoxListLimited($model, $attribute, $data, $htmlOptions = array(), $maxLimit)
    {
        if (isset($maxLimit) && $maxLimit > 0) {
            // javascript function that performs validation of number of checkboxes clicked in a list. When number of checkboxes clicked reaches maxLimit it grays out non-clicked checkboxes. Otherwise it makes available all checkboxes in a list.
            $js = <<<EOD
function checkboxClickedLimit(maxLimit){
    var checkboxes = arguments[1].parentNode.parentNode.getElementsByTagName("input");

    // Get number of checked checkboxes
    var checkedCounter = 0;
    for (var i = 0; i < checkboxes.length; i++) {
        if (checkboxes[i].checked)
            checkedCounter++;
    }

    // If limit of checked succeeded mark all other checkboxes as read only, otherwise make all checkboxes updateable
    if (checkedCounter >= maxLimit) {
        for (var i = 0; i < checkboxes.length; i++) {
            if (!checkboxes[i].checked) {
                checkboxes[i].disabled = true;
                checkboxes[i].parentNode.className = "checkbox-disabled";
            }
        }
    } else {
        for (var i = 0; i < checkboxes.length; i++) {
                checkboxes[i].disabled = false;
                checkboxes[i].parentNode.className = "checkbox-enabled";
        }
    }
}
EOD;
            $css = <<<EOD
            .checkbox-disabled {
                color: gray;
            }

            .checkbox-enabled {
                color: #312a1e;
            }
EOD;
            $cs = Yii::app()->getClientScript();
            $cs->registerCss('checkboxAppearance', $css);
            $cs->registerScript('checkboxClickedLimit', $js, CClientScript::POS_END);
            // add event to all of the checkboxes in a list
            $htmlOptions['onchange'] = 'javascript:checkboxClickedLimit(' . $maxLimit . ', this);';
            return CHtml::activeCheckBoxList($model, $attribute, $data, $htmlOptions);
        }
    }
开发者ID:asopin,项目名称:portal,代码行数:59,代码来源:LibraryHelper.php

示例13: array

		<tr>
			<th><?php 
echo CHtml::activeLabelEx($category, 'brand_id');
?>
			</th>
			<td>
				<div class="privilege_main">
					<div class="privilege_wide">
						<div class="selectbox" style="margin-bottom:5px;">
							<a href="#" class="selected-all">全选</a> /
							<a href="#" class="inverse">反选</a>
						</div>
						<div class="optionbox">

							<?php 
echo CHtml::activeCheckBoxList($category, 'brand_id', $brandOptions, array('class' => 'privileges'));
?>
						</div>
					</div>
				</div>

				<!-- <select name="ProductCategory[brand_id]" id="brand_id">
					<option value="0">请选择</option>
					<?php 
foreach ($brandOptions as $key => $value) {
    ?>
					<option value="<?php 
    echo $key;
    ?>
" <?php 
    if (!empty($category) && $category->brand_id == $key) {
开发者ID:kinghinds,项目名称:kingtest2,代码行数:31,代码来源:create.php

示例14: array

                CHtml::listData(Pais::model()->findAll(), 'idpais', 'descpais'),
                array('prompt'=>'Select',
                    'class'=>'form-control input-sm')
            ); ?>
        </div>
    </div>
</fieldset>
<br/>
<fieldset>
    <legend>Campo de la mecánica de interés (Puede seleccionar más de uno)</legend>
    <div class="row">
        <div class="col-md-4">
            <?php echo CHtml::activeCheckBoxList($model,'campoint',
                array(
                    '1'=>'Diseño mecánico',
                    '2'=>'Educación en ingeniería mecánica',
                    '3'=>'Manufactura y materiales',
                    '4'=>'Mecanica teórica',
                    '5'=>'Otras',
                    '6'=>'Termofluidos')); ?>
        </div>
    </div>
    <div class="row">
        <div class="col-md-8">
            <?php echo CHtml::activeLabel($model,'areaespe'); ?>
            <?php echo CHtml::activeTextField($model,'areaespe',
                array('class'=>'form-control input-sm')) ?>
        </div>
    </div>
</fieldset>
<br/>
<fieldset>
开发者ID:enriqueism,项目名称:app,代码行数:32,代码来源:nuevo.php

示例15: array

            echo $station['color'];
            ?>
; width:5px; height:5px; float:left; margin-left:2px; "></div>
                                                        <?php 
        }
    }
    ?>
                                            </li>
                                            <?php 
    /* if (!in_array($group_key,['TemperatureWater', 'TemperatureSoil'])): ?>
           <li class="head"><?php echo $group['name'] ?></li>
       <?php endif;*/
    ?>

                                            <?php 
    echo CHtml::activeCheckBoxList($form, 'sensor_feature_code[' . $group_key . ']', $group['sensor_features'], array('separator' => '', 'template' => '<li>{input} {label}</li>', 'container' => '', 'checkAll' => count($group['sensor_features']) > 1 ? 'Select All' : null));
    ?>
                                        </ul>
                                    </li>
                                <?php 
}
?>
                                <li id="station-feature-attention" class="hide">Please select station(s) first</li>
                            </ul>
                        </div>
                    </div>
                </td>
                <td>
                    <div class="select-list">
                        <?php 
echo CHtml::button(It::t('site_label', 'do_select'), array('id' => 'accumulation_select', 'style' => 'width: 100px; display: none;'));
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:31,代码来源:__aws_table_form.php


注:本文中的CHtml::activeCheckBoxList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。