本文整理汇总了PHP中Chtml::radioButtonList方法的典型用法代码示例。如果您正苦于以下问题:PHP Chtml::radioButtonList方法的具体用法?PHP Chtml::radioButtonList怎么用?PHP Chtml::radioButtonList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chtml
的用法示例。
在下文中一共展示了Chtml::radioButtonList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<div class="help-block"><span class="text-danger"><?php
echo $form->error($model, 'from');
?>
</span></div>
</div>
</div>
<?php
if ($model->isNewRecord) {
?>
<div class="form-group">
<?php
echo Chtml::label(Yii::t('app', 'Кому') . ' <span class="required">*</span>', '', array('class' => 'col-md-3 control-label', 'style' => 'padding-top: 15px;'));
?>
<div class="col-md-9">
<?php
echo Chtml::radioButtonList('type', $type, array('0' => Yii::t('app', 'Всем пользователям'), '1' => Yii::t('app', 'Определенным пользователям')), array('style' => 'margin-left:-10px'));
?>
<div class="help-block"><span class="text-danger"></span></div>
</div>
</div>
<?php
}
?>
<?php
echo $model->isNewRecord ? '<div class="form-group" id="emailRow" style="display:none;">' : '<div class="form-group">';
?>
<?php
echo $form->labelEx($model, 'to', array('class' => 'col-md-3 control-label'));
?>
<div class="col-md-9">
<?php
示例2: array
} else {
if (Yii::app()->user->hasFlash('error')) {
?>
<div class="flash-error">
<?php
echo Yii::t('citizen', Yii::app()->user->getFlash('error'));
?>
</div>
<?php
}
}
echo Chtml::hiddenField('geom');
echo "<div class=\"jFormComponent\">";
echo Chtml::radioButtonList('geom_type', 1, array('1' => Yii::t('citizen', 'Evaluate the quality of service'), '2' => Yii::t('citizen', 'Report a fault on the water network')), array('labelOptions' => array('style' => 'display:inline'), 'uncheckValue' => 1, 'separator' => '<br>'));
echo "</div>";
?>
<div class="jFormComponent" id="quality">
<?php
echo CHtml::label('Quality <span class="required">*</span>', 'qualities_list');
?>
<?php
echo CHtml::dropDownList('qualities_list', '', CHtml::listData(WaterQualities::model()->findAll(array('order' => 'priority')), 'id', 'quality'), array('empty' => Yii::t('citizen', 'Select Quality')));
?>
</div>
<div class="jFormComponent" id="fault">
<?php
echo CHtml::label('Fault <span class="required">*</span>', 'faults_list');