Search by code postal and use code insee as code
This commit is contained in:
parent
67eb3dd084
commit
136f9623be
@ -24,7 +24,7 @@ class FieldsController extends Zend_Controller_Action
|
||||
|
||||
$request = $this->getRequest();
|
||||
$family = $request->getParam('family');
|
||||
if (!empty($family) )
|
||||
if ( !empty($family) )
|
||||
{
|
||||
$fields = new Scores_Fields();
|
||||
$fields->resetFamille($family);
|
||||
@ -67,7 +67,7 @@ class FieldsController extends Zend_Controller_Action
|
||||
$q = preg_replace("/['-]/", ' ', $q);
|
||||
|
||||
//Remove characters
|
||||
$q = preg_replace("/^[a-z0-9]\s/i", '', $q);
|
||||
$q = preg_replace("/^[a-z]\s/i", '', $q);
|
||||
|
||||
//Detect if we have string
|
||||
if ( preg_match("/[a-zA-Z]+/", $q) )
|
||||
@ -157,12 +157,13 @@ class FieldsController extends Zend_Controller_Action
|
||||
$result = $table->fetchAll($sql);
|
||||
foreach ($result as $item) {
|
||||
$output[] = array(
|
||||
'label' => $item->Codepos . ' ( Code postal )',
|
||||
'value' => $item->Codepos
|
||||
'label' => $item->Commune . ', '. $item->Codepos .' (Ville)',
|
||||
'value' => 'C'.$item->INSEE
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case 'cj':
|
||||
$table = new Application_Model_FormeJuridique();
|
||||
|
Loading…
Reference in New Issue
Block a user