Пример #1
0
echo $form->labelEx($model, 'responsavel');
?>
		<?php 
$this->widget('zii.widgets.jui.CJuiAutoComplete', array('name' => 'PatrimonioTermo[responsavel]', 'value' => $model->responsavel, 'source' => Pessoa::toArray()));
?>
		<?php 
echo $form->error($model, 'responsavel');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'co_responsavel');
?>
		<?php 
$this->widget('zii.widgets.jui.CJuiAutoComplete', array('name' => 'PatrimonioTermo[co_responsavel]', 'value' => $model->co_responsavel, 'source' => Pessoa::toArray()));
?>
		<?php 
echo $form->error($model, 'co_responsavel');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'nro_termo_responsabilidade');
?>
		<?php 
echo $form->textField($model, 'nro_termo_responsabilidade');
?>
		<?php 
echo $form->error($model, 'nro_termo_responsabilidade');
Пример #2
0
<h1>Pessoas</h1>

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'pessoa-form', 'enableAjaxValidation' => false, 'action' => array('/pessoa/search/'), 'method' => 'GET', 'htmlOptions' => array('class' => 'form-search')));
?>

        <?php 
echo $form->errorSummary($model);
?>

                <?php 
//echo $form->textField($model,'nome');
?>
                <?php 
$this->widget('zii.widgets.jui.CJuiAutoComplete', array('name' => 'Pessoa[nome]', 'source' => Pessoa::toArray(), 'htmlOptions' => array('class' => 'input-medium search-query', 'submit' => '')));
?>
                <?php 
echo $form->error($model, 'nome');
?>
                <?php 
echo CHtml::submitButton('Buscar', array('class' => 'btn btn-info btn-medium'));
?>

<?php 
$this->endWidget();
?>

<?php 
/*
                        Yii::app()->clientScript->registerScript('financeiro', "
Пример #3
0
<h1>Pessoas</h1>

<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'pessoa-form', 'enableAjaxValidation' => false, 'action' => array('/pessoa/search/'), 'method' => 'GET'));
?>

	<?php 
echo $form->errorSummary($model);
?>

		<?php 
//echo $form->textField($model,'nome');
?>
		<?php 
$this->widget('zii.widgets.jui.CJuiAutoComplete', array('name' => 'Pessoa[nome]', 'source' => Pessoa::toArray()));
?>
		<?php 
echo $form->error($model, 'nome');
?>
		<?php 
echo CHtml::submitButton('Buscar');
?>
	
<?php 
$this->endWidget();
?>

<?php 
Yii::app()->clientScript->registerScript('financeiro', "\n\t\t\n\t\t\t\$('.financeiro-show-button').toggle(\n\t\t\n\t\tfunction(){\n\t\t\t\$(this).text('Ocultar Informações Financeiras');\n\t\t\t\ta = \$(this).parent();\n\t\t\t\tpessid = \$(a).attr('id');\n\t\t\t\tcontainer = a.children('div');\n\t\t\t\t\$(container).show('fast');\n\t\t\n\t\t\t\$.get('/sipesq/index.php/pessoa/ajaxpessoa'\t,\n\t\t\t\t\t\n\t\t\t\t{id: pessid},function (data){\n\t\t\t\t\t\t\$(container).html(data);\n\t\t\t\t\t\t\$(container).focus();\n\t\t\t\t\t},\n\t\t\t\t\t\"html\"); \n\t\t\t\t\t\n\t\t},\n\t\t\n\t\tfunction(){\n\t\t\t\ta = \$(this).parent();\n\t\t\t\t\$(this).text('Mostrar Informações Financeiras');\n\t\t\t\tb = a.children('div');\n\t\t\t\tb.hide('fast');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\t\$('#all-financeiro-button').toggle(\n\t\t\tfunction(){\n\t\t\t\t\$(this).text('Ocultar Informações Financeiras');\n\t\t\t\tcontainers = \$('.financeiro-div');\n\t\t\t\t\$.each(containers, \n\t\t\t\t\tfunction(key,value)\n\t\t\t\t\t{\n\t\t\t\t\t\t\$.get('/sipesq/index.php/pessoa/ajaxpessoa'\t,\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t{id:  \$(value).parent().attr('id')},function (data){\n\t\t\t\t\t\t\t\t\$(value).html(data);\n\t\t\t\t\t\t\t\t\$(value).focus();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"html\"); \n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t\$('.financeiro-div').show();\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tfunction(){\n\t\t\t\t\$(this).text('Mostrar Informações Financeiras');\n\t\t\t\t\$('.financeiro-div').hide('fast');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t);\t\n\t\t");
?>