コード例 #1
0
ファイル: _form.php プロジェクト: sharmarakesh/EduSec2.0.0
?>
		<?php 
echo $form->textField($model, 'address_line2', array('size' => 66, 'maxlength' => 50, 'style' => 'width:500px;'));
?>
<span class="status">&nbsp;</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">&nbsp;</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
0
<span class="status">&nbsp;</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">&nbsp;</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
0
ファイル: _tab5.php プロジェクト: sharmarakesh/EduSec2.0.0
echo $form->textField($address, 'student_address_p_line2', array('size' => 59, 'maxlength' => 100, 'tabindex' => 8));
?>
<span class="status">&nbsp;</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">&nbsp;</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
0
?>
		<?php 
echo $form->textField($model, 'state_name', array('size' => 22, 'maxlength' => 60));
?>
<span class="status">&nbsp;</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">&nbsp;</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
0
ファイル: _uform.php プロジェクト: rinodung/EduSec3.0.0
	<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">&nbsp;</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">&nbsp;</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">&nbsp;</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
0
$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'), 'tabindex' => 21));
?>
<span class="status">&nbsp;</span>
        <?php 
echo $form->error($model, 'country_id');
?>
	</div>
	<div class="row">
		<?php 
echo $form->labelEx($model, 'state_id');
?>
		<?php 
if (isset($model->state_id)) {
    echo $form->dropDownList($model, 'state_id', CHtml::listData(State::model()->findAll(array('condition' => 'state_id=' . $model->state_id)), 'state_id', 'state_name'));
} else {
    echo $form->dropDownList($model, 'state_id', array('empty' => 'Select State'));
コード例 #7
0
echo $form->textField($address, 'employee_address_c_line2', array('size' => 59, 'maxlength' => 100, 'tabindex' => 2));
?>
<span class="status">&nbsp;</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">&nbsp;</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 {
コード例 #8
0
ファイル: _form.php プロジェクト: rinodung/EduSec3.0.0
<?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">&nbsp;</span>
        <?php echo $form->error($model,'country_id'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'state_id'); ?>
コード例 #9
0
ファイル: admin.php プロジェクト: rinodung/EduSec3.0.0
<?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>
コード例 #10
0
ファイル: _form.php プロジェクト: sharmarakesh/EduSec2.0.0
?>
		<?php 
echo $form->dropDownList($model, 'employee_address_p_state', State::items());
?>
<span class="status">&nbsp;</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">&nbsp;</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">&nbsp;</span>
コード例 #11
0
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>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</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' => '')));
コード例 #12
0
ファイル: _form.php プロジェクト: sharmarakesh/EduSec2.0.0
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');
コード例 #13
0
		<?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">&nbsp;</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">&nbsp;</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">&nbsp;</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'),
コード例 #14
0
		 <?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">&nbsp;</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">&nbsp;</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 
コード例 #15
0
ファイル: _form.php プロジェクト: rinodung/EduSec3.0.0
	'id'=>'state-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,'state_name'); ?>
		<?php echo $form->textField($model,'state_name',array('size'=>22,'maxlength'=>60)); ?> 
		<span class="status">&nbsp;</span><?php echo $form->error($model,'state_name'); ?>
	</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">&nbsp;</span>
		<?php echo $form->error($model,'country_id'); ?>
	</div>
</div><!-- form -->

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Add' : 'Save',array('class'=>'submit')); ?>
		<?php echo CHtml::link('Cancel', array('admin'), array('class'=>'btnCan')); ?> 
	</div>

<?php $this->endWidget(); ?>
</div>
コード例 #16
0
ファイル: admin.php プロジェクト: sharmarakesh/EduSec2.0.0
<?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>