Merge branch 'xorg/maint' into xorg/master
[platal.git] / include / ufbuilder.inc.php
index 5d52807..1543b15 100644 (file)
@@ -411,11 +411,10 @@ class UFB_DeltaTenSearch extends UserFilterBuilder
         $fields = array(
             new UFBF_DeltaTenMessage('deltaten_message'),
 
-            new UFBF_Town('city', 'Ville / Code Postal'),
-            new UFBF_Country('countryTxt', 'country', 'Pays'),
-            new UFBF_AdminArea('administrativearea', 'Région'),
-            new UFBF_SubAdminArea('subadministrativearea', 'Département'),
-
+            new UFBF_AddressIndex('administrative_area_level_2', 'Département', 'ADMNISTRATIVEAREAS2'),
+            new UFBF_AddressIndex('administrative_area_level_1', 'Région', 'ADMNISTRATIVEAREAS1'),
+            new UFBF_AddressMixed('locality_text', 'locality', 'Ville', 'LOCALITIES'),
+            new UFBF_AddressMixed('country_text', 'country', 'Pays', 'COUNTRIES'),
 
             new UFBF_EducationSchool('schoolTxt', 'school', "École d'application"),
             new UFBF_EducationDegree('diplomaTxt', 'diploma', 'Diplôme'),
@@ -1132,35 +1131,10 @@ class UFBF_AddressIndex extends UFBF_Index
 // {{{ class UFBF_JobCompany
 class UFBF_JobCompany extends UFBF_Text
 {
-    private $onlymentorfield;
-
-    public function __construct($envfield, $formtext = '', $onlymentorfield = 'only_referent')
-    {
-        parent::__construct($envfield, $formtext);
-        $this->onlymentorfield = $onlymentorfield;
-    }
-
-    public function check(UserFilterBuilder $ufb) {
-        if (parent::check($ufb)) {
-            # No company check for mentors
-           if ($ufb->isOn($this->onlymentorfield)) {
-                $this->empty = true;
-           }
-           return true;
-        } else {
-            return false;
-        }
-    }
-
     protected function buildUFC(UserFilterBuilder $ufb)
     {
         return new UFC_Job_Company(UFC_Job_Company::JOBNAME, $this->val);
     }
-
-    public function getEnvFieldNames()
-    {
-        return array($this->envfield, $this->onlymentorfield);
-    }
 }
 // }}}