Fixes phones edition.
authorStéphane Jacob <jacou@melix.net>
Sat, 11 Apr 2009 19:54:23 +0000 (21:54 +0200)
committerStéphane Jacob <jacou@melix.net>
Sat, 11 Apr 2009 19:54:41 +0000 (21:54 +0200)
htdocs/javascript/profile.js
modules/profile/page.inc.php

index 70159b3..add62f8 100644 (file)
@@ -335,15 +335,15 @@ function removeTel(id)
 
 function addPhoneComment(id)
 {
-    $(id + '_comment').show();
-    $(id + '_addComment').hide();
+    $('#' + id + '_comment').show();
+    $('#' + id + '_addComment').hide();
 }
 
 function removePhoneComment(id, pref)
 {
-    $(id + '_comment').hide();
-    $(id + '_comment').find("[name='" + pref + "[comment]']").val('');
-    $(id + '_addComment').show();
+    $('#' + id + '_comment').hide();
+    $('#' + id + '_comment').find("[name='" + pref + "[comment]']").val('');
+    $('#' + id + '_addComment').show();
 }
 
 // {{{1 Groups
index 628a949..8a5014f 100644 (file)
@@ -139,7 +139,7 @@ class ProfilePhones implements ProfileSetting
     public function value(ProfilePage &$page, $field, $value, &$success)
     {
         $success = true;
-        if (is_null($value) || !is_array($value)) {
+        if (is_null($value)) {
             $value = array();
             $res = XDB::iterator("SELECT  t.display_tel AS tel, t.tel_type AS type, t.pub, t.comment
                                     FROM  profile_phones AS t