本文整理汇总了PHP中Country::items方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::items方法的具体用法?PHP Country::items怎么用?PHP Country::items使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Country
的用法示例。
在下文中一共展示了Country::items方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
?>
<?php
echo $form->textField($model, 'address_line2', array('size' => 66, 'maxlength' => 50, 'style' => 'width:500px;'));
?>
<span class="status"> </span>
<?php
echo $form->error($model, 'address_line2');
?>
</div>
<div class="row">
<div class="row-left">
<?php
echo $form->labelEx($model, 'country');
?>
<?php
echo $form->dropDownList($model, 'country', Country::items(), array('prompt' => 'Select Country', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('Organization/UpdateStates'), 'update' => '#Organization_state')));
?>
<span class="status"> </span>
<?php
echo $form->error($model, 'country');
?>
</div>
<div class="row-right">
<?php
echo $form->labelEx($model, 'state');
?>
<?php
if (isset($model->state)) {
echo $form->dropDownList($model, 'state', CHtml::listData(State::model()->findAll(array('condition' => 'country_id=' . $model->country)), 'state_id', 'state_name'), array('prompt' => 'Select State', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('Organization/UpdateCities'), 'update' => '#Organization_city')));
示例2: array
<span class="status"> </span>
<?php
echo $form->error($address, 'student_address_p_line2');
?>
</div>
<div class="row">
<div class="row-left">
<?php
echo $form->labelEx($address, 'student_address_p_country');
?>
<?php
//echo $form->dropDownList($address,'student_address_p_country',Country::items(), array('empty' => '-----------Select---------','tabindex'=>9));
echo $form->dropDownList($address, 'student_address_p_country', Country::items(), array('prompt' => '-----------Select---------', 'tabindex' => 9, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('StudentTransaction/getItemName3'), 'dataType' => 'json', 'success' => 'function(data) {
$("#StudentAddress_student_address_p_state").html(data.state);
$("#StudentAddress_student_address_p_city").html(data.city);
}')));
?>
<span class="status"> </span>
<?php
echo $form->error($address, 'student_address_p_country');
?>
</div>
<div class="row-right">
<?php
echo $form->labelEx($address, 'student_address_p_state');
示例3: array
echo $form->textField($address, 'student_address_p_line2', array('size' => 59, 'maxlength' => 100, 'tabindex' => 8));
?>
<span class="status"> </span>
<?php
echo $form->error($address, 'student_address_p_line2');
?>
</div>
<div class="row">
<div class="row-right">
<?php
echo $form->labelEx($address, 'student_address_p_country');
?>
<?php
echo $form->dropDownList($address, 'student_address_p_country', Country::items(), array('prompt' => '-----------Select-----------', 'tabindex' => 9, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/UpdateStudPStates'), 'update' => '#StudentAddress_student_address_p_state')));
?>
<span class="status"> </span>
<?php
echo $form->error($address, 'student_address_p_country');
?>
</div>
<div class="row-left">
<?php
echo $form->labelEx($address, 'student_address_p_state');
?>
<?php
if (isset($address->student_address_p_state)) {
echo $form->dropDownList($address, 'student_address_p_state', CHtml::listData(State::model()->findAll(array('condition' => 'country_id=' . $address->student_address_p_country)), 'state_id', 'state_name'), array('prompt' => '-----------Select-----------', 'tabindex' => 10, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/UpdateStudPCities'), 'update' => '#StudentAddress_student_address_p_city')));
} else {
示例4: array
?>
<?php
echo $form->textField($model, 'state_name', array('size' => 22, 'maxlength' => 60));
?>
<span class="status"> </span>
</div>
<div class="row">
<?php
echo $form->labelEx($model, 'country_id');
?>
<?php
//echo $form->textField($model,'country_id',array('size'=>30,'maxlength'=>30));
?>
<?php
echo $form->dropDownList($model, 'country_id', Country::items(), array('empty' => 'Select Country'));
?>
<span class="status"> </span>
<?php
echo $form->error($model, 'country_id');
?>
</div>
<div class="row buttons">
<?php
echo CHtml::submitButton($model->isNewRecord ? 'Add' : 'Save', array('class' => 'submit'));
?>
</div>
<?php
$this->endWidget();
示例5: array
<div class="row">
<?php echo $form->labelEx($model,'address_line1'); ?>
<?php echo $form->textField($model,'address_line1',array('size'=>66,'maxlength'=>50,'style'=>'width:550px')); ?><span class="status"> </span>
<?php echo $form->error($model,'address_line1'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'address_line2'); ?>
<?php echo $form->textField($model,'address_line2',array('size'=>66,'maxlength'=>50,'style'=>'width:550px')); ?><span class="status"> </span>
<?php echo $form->error($model,'address_line2'); ?>
</div>
<div class="row">
<div class="row-left">
<?php echo $form->labelEx($model,'country'); ?>
<?php echo $form->dropDownList($model,'country', Country::items(), array(
'prompt' => 'Select Country',
'ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('Organization/UpdateStates'),
'update'=>'#Organization_state', //selector to update
)));?><span class="status"> </span>
<?php echo $form->error($model,'country'); ?>
</div>
<div class="row-right">
<?php echo $form->labelEx($model,'state'); ?>
<?php
if(isset($model->state))
echo $form->dropDownList($model,'state', CHtml::listData(State::model()->findAll(array('condition'=>'country_id='.$model->country)), 'state_id', 'state_name'),
示例6: array
echo $form->textField($address, 'employee_address_c_line2', array('size' => 59, 'maxlength' => 100, 'tabindex' => 2));
?>
<span class="status"> </span>
<?php
echo $form->error($address, 'employee_address_c_line2');
?>
</div>
<div class="row">
<div class="row-right">
<?php
echo $form->labelEx($address, 'employee_address_c_country');
?>
<?php
echo $form->dropDownList($address, 'employee_address_c_country', Country::items(), array('prompt' => '-----------Select-----------', 'tabindex' => 3, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/UpdateEmpCStates'), 'update' => '#EmployeeAddress_employee_address_c_state')));
?>
<span class="status"> </span>
<?php
echo $form->error($address, 'employee_address_c_country');
?>
</div>
<div class="row-left">
<?php
echo $form->labelEx($address, 'employee_address_c_state');
?>
<?php
if (isset($address->employee_address_c_state)) {
echo $form->dropDownList($address, 'employee_address_c_state', CHtml::listData(State::model()->findAll(array('condition' => 'country_id=' . $address->employee_address_c_country)), 'state_id', 'state_name'), array('prompt' => '-----------Select-----------', 'tabindex' => 4, 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('dependent/UpdateEmpCCities'), 'update' => '#EmployeeAddress_employee_address_c_city')));
} else {
示例7: array
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'city-form',
'enableAjaxValidation'=>true,
'clientOptions'=>array('validateOnSubmit'=>true),
)); ?>
<p class="note">Fields with <span class="required">*</span> are required.</p>
<?php //echo $form->errorSummary($model); ?>
<div class="row">
<?php echo $form->labelEx($model,'country_id'); ?>
<?php
echo $form->dropDownList($model,'country_id', Country :: items(),
array(
'prompt' => 'Select Country',
'ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('dependent/getstatecity'),
'update'=>'#City_state_id', //selector to update
),'tabindex'=>21));
?><span class="status"> </span>
<?php echo $form->error($model,'country_id'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'state_id'); ?>
示例8: array
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'state-grid',
'dataProvider'=>$dataProvider,
'filter'=>$model,
'selectionChanged'=>"function(id){
window.location='" . Yii::app()->urlManager->createUrl('state/view', array('id'=>'')) . "' + $.fn.yiiGridView.getSelection(id);
}",
'columns'=>array(
array(
'header'=>'SI No',
'class'=>'IndexColumn',
),
'state_name',
array(
'name'=>'country_id',
'value'=>'Country::model()->findByPk($data->country_id)->name',
'filter'=>Country::items(),
),
array(
'class'=>'MyCButtonColumn',
),
),
'pager'=>array(
'class'=>'AjaxList',
'maxButtonCount'=>$model->count(),
'header'=>''
),
)); ?></div>
示例9:
?>
<?php
echo $form->dropDownList($model, 'employee_address_p_state', State::items());
?>
<span class="status"> </span>
<?php
echo $form->error($model, 'employee_address_p_state');
?>
</div>
<div class="row">
<?php
echo $form->labelEx($model, 'employee_address_p_country');
?>
<?php
echo $form->dropDownList($model, 'employee_address_p_country', Country::items());
?>
<span class="status"> </span>
<?php
echo $form->error($model, 'employee_address_p_country');
?>
</div>
<div class="row">
<?php
echo $form->labelEx($model, 'employee_address_phone');
?>
<?php
echo $form->textField($model, 'employee_address_phone');
?>
<span class="status"> </span>
示例10: operator
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('city-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<h1>Manage Cities</h1>
<!--<p>
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>-->
<?php
//echo CHtml::link('Advanced Search','#',array('class'=>'search-button'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$dataProvider = $model->search();
if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) {
$pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]);
} else {
$pageSize = Yii::app()->params['pageSize'];
}
$dataProvider->getPagination()->setPageSize($pageSize);
?>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'city-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), 'city_name', array('name' => 'state_id', 'value' => 'State::item($data->state_id)', 'filter' => State::items()), array('name' => 'country_id', 'value' => 'Country::item($data->country_id)', 'filter' => Country::items()), array('class' => 'MyCButtonColumn')), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => '')));
示例11:
echo $form->labelEx($model, 'student_address_p_state');
?>
<?php
echo $form->dropDownList($model, 'student_address_p_state', State::items());
?>
<?php
echo $form->error($model, 'student_address_p_state');
?>
</div>
<div class="row">
<?php
echo $form->labelEx($model, 'student_address_p_country');
?>
<?php
echo $form->dropDownList($model, 'student_address_p_country', Country::items());
?>
<?php
echo $form->error($model, 'student_address_p_country');
?>
</div>
<div class="row">
<?php
echo $form->labelEx($model, 'student_address_phone');
?>
<?php
echo $form->textField($model, 'student_address_phone');
?>
<?php
echo $form->error($model, 'student_address_phone');
示例12: array
<?php echo $form->labelEx($address,'student_address_p_line1'); ?>
<?php echo $form->textField($address,'student_address_p_line1',array('size'=>60,'style'=>'width:auto')); ?><span class="status"> </span>
<?php echo $form->error($address,'student_address_p_line1'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($address,'student_address_p_line2'); ?>
<?php echo $form->textField($address,'student_address_p_line2',array('size'=>60,'style'=>'width:auto')); ?><span class="status"> </span>
<?php echo $form->error($address,'student_address_p_line2'); ?>
</div>
<div class="row">
<div class="row-right">
<?php echo $form->labelEx($address,'student_address_p_country'); ?>
<?php
echo $form->dropDownList($address,'student_address_p_country',Country::items(), array(
'prompt' => 'Select Country',
'ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('dependent/UpdateStudPStates'),
'update'=>'#StudentAddress_student_address_p_state', //selector to update
))); ?><span class="status"> </span>
<?php echo $form->error($address,'student_address_p_country'); ?>
</div>
<div class="row-left">
<?php echo $form->labelEx($address,'student_address_p_state'); ?>
<?php
if(!empty($address->student_address_p_state) && !empty($address->student_address_p_country))
echo $form->dropDownList($address,'student_address_p_state', CHtml::listData(State::model()->findAll(array('condition'=>'country_id='.$address->student_address_p_country)), 'state_id', 'state_name'),
示例13: array
<?php //echo $form->error($address,'employee_address_p_taluka'); ?>
</div>
<div class="row-right">
<?php //echo $form->labelEx($address,'employee_address_p_district'); ?>
<?php //echo $form->textField($address,'employee_address_p_district',array('size'=>13)); ?><span class="status"> </span>
<?php //echo $form->error($address,'employee_address_p_district'); ?>
</div>
</div-->
<div class="row">
<div class="row-right">
<?php echo $form->labelEx($address,'employee_address_p_country'); ?>
<?php echo $form->dropDownList($address,'employee_address_p_country' ,Country::items(),
array(
'prompt' => 'Select Country',
'ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('dependent/UpdateEmpPStates'),
'update'=>'#EmployeeAddress_employee_address_p_state', //selector to update
)));
?><span class="status"> </span>
<?php echo $form->error($address,'employee_address_p_country'); ?>
</div>
<div class="row-left">
<?php echo $form->labelEx($address,'employee_address_p_state'); ?>
<?php
示例14: array
<?php
echo CHtml::link('PDF', array('exportToPDFExcel/StateExportToPdf'), array('class' => 'btnyellow', 'target' => '_blank'));
echo CHtml::link('Excel', array('exportToPDFExcel/StateExportToExcel'), array('class' => 'btnblue'));
?>
</div>
<div class="portlet box blue">
<div class="portlet-title"> States
</div>
<?php
echo CHtml::link('Add New +', array('state/create'), array('class' => 'btn green'));
?>
<?php
$dataProvider = $model->search();
if (Yii::app()->user->getState("pageSize", @$_GET["pageSize"])) {
$pageSize = Yii::app()->user->getState("pageSize", @$_GET["pageSize"]);
} else {
$pageSize = Yii::app()->params['pageSize'];
}
$dataProvider->getPagination()->setPageSize($pageSize);
?>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'state-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'selectionChanged' => "function(id){\n\t\twindow.location='" . Yii::app()->urlManager->createUrl('state/view', array('id' => '')) . "' + \$.fn.yiiGridView.getSelection(id);\n\t}", 'columns' => array(array('header' => 'SI No', 'class' => 'IndexColumn'), 'state_name', array('name' => 'country_id', 'value' => 'Country::item($data->country_id)', 'filter' => Country::items())), 'pager' => array('class' => 'AjaxList', 'maxButtonCount' => $model->count(), 'header' => '')));
?>
</div>