Example #1
0
	<div class="container">
		<div class="row">
			<div class="col-xs-12 col-md-12" ng-controller="CorpoController">
				<br />
				<?php 
echo CHtml::statefulForm($this->createUrl('busca'), "post", array('id' => 'formBuscaInicial', 'class' => 'form-horizontal'));
?>
					<div class="form-group">
						<div class="col-xs-6 col-sm-2">
							<?php 
echo CHtml::dropDownList('tpnegocio', $this->tpnegocio, CHtml::listData(Tpnegocio::model()->findAll(), 'id', 'tpnegocio'), array('empty' => 'Todos negócio', 'class' => 'form-control', 'require' => ''));
?>
						</div>
						<div class="col-xs-6 col-sm-2">
							<?php 
echo CHtml::dropDownList('tpimovel', $this->tpimovel, CHtml::listData(Tpimovel::model()->findAll(), 'id', 'tpimovel'), array('empty' => 'Todos imóveis', 'class' => 'form-control', 'require' => ''));
?>
						</div>
						<div class="col-xs-6 col-sm-2">
							<?php 
echo CHtml::dropDownList('cidade', $this->cidade, CHtml::listData(Cidade::model()->findAll(), 'id', 'cidade'), array('empty' => 'Todas cidades', 'class' => 'form-control', 'require' => ''));
?>
						</div>
						<div class="col-xs-6 col-sm-2">
							<?php 
$valores = array('50000' => '50.000,00', '100000' => '100.000,00', '200000' => '200.000,00', '500000' => '500.000,00', '2000000' => '2.000.000,00', '1000000000' => 'sem limites');
echo CHtml::dropDownList('valor', $this->valor, $valores, array('empty' => 'Todos valores', 'class' => 'form-control', 'require' => ''));
?>
						</div>
						<div class="col-xs-12 col-sm-4 text-right esconder-celular">
							<button type='button' class='btn btn-default btn-block' ng-click="limpar('<?php 
Example #2
0
 public function actionBuscainicial()
 {
     $this->setPageTitle($this->tituloPagina);
     $buscainicial = isset($_POST['buscainicial']) ? $_POST['buscainicial'] : "";
     $busca = explode(".", $buscainicial);
     $tpimovel = Tpimovel::model()->find(array('condition' => 'tpimovel=:tpimovel', 'params' => array(':tpimovel' => $busca[1])));
     switch ($busca[0]) {
         case 'alugar':
             $this->tpnegocio = 3;
             $this->tpimovel = $tpimovel->id;
             break;
         case 'comprar':
             $this->tpnegocio = 2;
             $this->tpimovel = $tpimovel->id;
             break;
         default:
             $this->tpimovel = $tpimovel->id;
             break;
     }
     $this->render('busca');
 }
Example #3
0
echo CHtml::statefulForm($this->createUrl('salvarAnuncio'), "post", array('id' => 'formCadastrarAnuncio'));
?>
	<div class="row">
		<br />
		<div class="col-xs-12 col-md-6">
			<div class="form-class col-md-6">
				<label for="descricao" required>Tipo de negócio*</label>
				<?php 
echo CHtml::dropDownList('tpnegocio', '', CHtml::listData(Tpnegocio::model()->findAll(), 'id', 'tpnegocio'), array('empty' => '-- Selecione --', 'class' => 'form-control', 'require' => '', 'ng-model' => 'anuncio.tpnegocio'));
?>
				
			</div>
			<div class="form-group col-md-6">
				<label for="descricao">Tipo de imóvel*</label>
				<?php 
echo CHtml::dropDownList('tpimovel', '', CHtml::listData(Tpimovel::model()->findAll(), 'id', 'tpimovel'), array('empty' => '-- Selecione --', 'class' => 'form-control', 'require' => '', 'ng-model' => 'anuncio.tpimovel'));
?>
			</div>
			<div class="form-group col-md-6">
				<label for="endereco">Endereço do anúncio</label>
				<input type="text" class="form-control" id="endereco" name="endereco" placeholder="Endereço/Localização" maxlength="100" require='' ng-model='anuncio.endereco' />
			</div>
			<div class="form-group col-md-6">
				<label for="descricao">Cidade*</label>
				<?php 
echo CHtml::dropDownList('cidade', '', CHtml::listData(Cidade::model()->findAll(), 'id', 'cidade'), array('empty' => '-- Selecione --', 'class' => 'form-control', 'require' => '', 'ng-model' => 'anuncio.cidade'));
?>
			</div>
			<div class="form-group col-md-6">
				<label for="valor">Valor* <small>(R$)</small></label>
				<input type="text" class="form-control text-right bold-font" id="valor" require='' ng-model='anuncio.valor' ui-money-mask maxlength='17' />