Uses phone class a little bit more.
authorStéphane Jacob <sj@m4x.org>
Fri, 17 Sep 2010 10:00:43 +0000 (12:00 +0200)
committerStéphane Jacob <sj@m4x.org>
Sat, 18 Sep 2010 13:01:54 +0000 (15:01 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile.php
modules/profile/jobs.inc.php

index fb62e72..34f431d 100644 (file)
@@ -396,7 +396,8 @@ class ProfileModule extends PLModule
         $page->assign('prefid', $prefid);
         $page->assign('prefname', $prefname);
         $page->assign('telid', $telid);
-        $page->assign('tel', array());
+        $phone = new Phone();
+        $page->assign('tel', $phone->toFormArray());
     }
 
     function handler_ajax_edu(&$page, $eduid, $class)
index 50510df..453d21f 100644 (file)
@@ -45,6 +45,7 @@ class ProfileSettingJob implements ProfileSetting
     public function emptyJob()
     {
         $address = new Address();
+        $phone = new Phone();
         return array(
             'id'               => '0',
             'jobid'            => '',
@@ -56,13 +57,8 @@ class ProfileSettingJob implements ProfileSetting
             'w_email'          => '',
             'w_email_pub'      => 'private',
             'w_email_new'      => '',
-            'w_phone'          => array(0 => array(
-                'type'    => 'fixed',
-                'tel'     => '',
-                'pub'     => 'private',
-                'comment' => '',
-            ),
-            'terms'            => array()),
+            'w_phone'          => array(0 => $phone->toFormArray()),
+            'terms'            => array()
         );
     }