From 45d674df48cfe7ea3de0a3940882c4f68b4d71ee Mon Sep 17 00:00:00 2001 From: Aram HARUTYUNYAN Date: Thu, 29 Aug 2013 07:59:02 +0000 Subject: [PATCH] Issue #0001653: --- .../scripts/recherche/worldcheck.phtml | 25 ++++++++++++++++--- .../Application/Form/RechercheWorldcheck.php | 22 ++++++++-------- .../config/_sql/structure/worldcheck.sql | 4 +-- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/application/views/default/scripts/recherche/worldcheck.phtml b/application/views/default/scripts/recherche/worldcheck.phtml index 46f55cccd..4a5a6b4f0 100644 --- a/application/views/default/scripts/recherche/worldcheck.phtml +++ b/application/views/default/scripts/recherche/worldcheck.phtml @@ -8,9 +8,9 @@ $form = $this->form; method="getMethod()?>" action="getAction()?>"> type?> -
dirNom?>
-
dirPrenom?>
dirType?>
+
dirNom?>
+
dirPrenom?>
submit?> @@ -18,4 +18,23 @@ $form = $this->form;
- \ No newline at end of file + + diff --git a/library/Application/Form/RechercheWorldcheck.php b/library/Application/Form/RechercheWorldcheck.php index 953d14984..f09e94d99 100644 --- a/library/Application/Form/RechercheWorldcheck.php +++ b/library/Application/Form/RechercheWorldcheck.php @@ -22,7 +22,16 @@ class Application_Form_RechercheWorldcheck extends Zend_Form 'value' => 'wcheck', 'decorators' => array('ViewHelper'), )); - + + $this->addElement('select', 'dirType', array( + 'decorators' => $this->elementDecorators, + 'label' => 'TYPE', + 'style' => 'width:175px;', + 'required' => true, + 'multiOptions' => array( + 'INDIVIDUAL' => 'Individual', + 'ORGANISATION' => 'Organisation'), + )); $this->addElement('text', 'dirNom', array( 'filters' => array('StringTrim'), 'label' => 'NOM', @@ -44,17 +53,6 @@ class Application_Form_RechercheWorldcheck extends Zend_Form 'maxlength' => 30, ), )); - - $this->addElement('select', 'dirType', array( - 'decorators' => $this->elementDecorators, - 'label' => 'Type', - 'style' => 'width:175px;', - 'required' => true, - 'multiOptions' => array( - '' => '', - 'INDIVIDUAL' => 'Individual', - 'ORGANISATION' => 'Organisation'), - )); $this->addElement('submit', 'submit', array( 'label' => 'Recherche', diff --git a/scripts/build/config/_sql/structure/worldcheck.sql b/scripts/build/config/_sql/structure/worldcheck.sql index 97db8de6e..7d67d5714 100644 --- a/scripts/build/config/_sql/structure/worldcheck.sql +++ b/scripts/build/config/_sql/structure/worldcheck.sql @@ -1,10 +1,10 @@ -CREATE TABLE IF NOT EXISTS `worldcheck` ( +CREATE TABLE IF NOT EXISTS `worldcheckqw` ( `id` int(11) NOT NULL AUTO_INCREMENT, `idClient` char(5) NOT NULL, `login` char(25) NOT NULL, `nameIdentifier` varchar(23) NOT NULL, `name` varchar(50) NOT NULL, - `nameType` varchar(12) NOT NULL, + `nameType` enum('INDIVIDUAL', 'ORGANISATION') NOT NULL, `matchCount` int(4) DEFAULT NULL, `dateInsert` date NOT NULL, PRIMARY KEY (`id`)