Prevents various warnings on profile edition.
authorStéphane Jacob <sj@m4x.org>
Sat, 18 Sep 2010 16:13:15 +0000 (18:13 +0200)
committerStéphane Jacob <sj@m4x.org>
Sat, 18 Sep 2010 16:13:15 +0000 (18:13 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
core
modules/profile/jobs.inc.php
templates/include/emails.combobox.tpl
templates/profile/general.edu.tpl
templates/profile/general.searchname.tpl
templates/profile/general.tpl

diff --git a/core b/core
index 3c7bc7a..1290d41 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 3c7bc7a377e3d5422f61b92ddf69c4a953ad3d15
+Subproject commit 1290d4101fe07192886e205bf8c645219d94658e
index 7bd470e..f0d30d7 100644 (file)
@@ -138,7 +138,7 @@ class ProfileSettingJob implements ProfileSetting
             } else if ($job['name'] == '') {
                 if ($job['description'] == '' && $job['w_url'] == ''
                     && $job['w_address']['text'] == '' && $job['w_email'] == ''
-                    && count($job['w_phone']) == 1 && $job['w_phone']['tel'] == '') {
+                    && count($job['w_phone']) >= 1 && $job['w_phone'][0]['display'] == '') {
                     array_splice($value, $key, 1);
                     continue;
                 }
index f372537..f0b1067 100644 (file)
@@ -78,8 +78,8 @@
       </optgroup>
       {/if}
       <optgroup label="Autres choix">
-        <option value="new@example.org" {if ((($val eq '') && (!$error) && ($name eq "email")) || $error)}selected="selected"{/if}>Nouvelle adresse email</option>
-        <option value="" {if (($val eq '') && (!$error) && ($name neq "email"))}selected="selected"{/if}>{if $name neq "email"}Ne pas mettre d'adresse email{else}&nbsp;{/if}</option>
+        <option value="new@example.org" {if ($val eq '' && !$error && $name eq 'email') || $error}selected="selected"{/if}>Nouvelle adresse email</option>
+        <option value="" {if $val eq '' && !$error && $name neq 'email'}selected="selected"{/if}>{if $name neq "email"}Ne pas mettre d'adresse email{else}&nbsp;{/if}</option>
       </optgroup>
     </select>
     {if $name neq "email"}
index ec518f4..ccf59b0 100644 (file)
@@ -60,7 +60,7 @@
     <span class="titre">Année d'obtention du diplôme&nbsp;:</span>
   </td>
   <td>
-    <input type="text" {if $edu.warning}class="warning"{/if} name="{$eduname}[grad_year]"
+    <input type="text" {if t($edu.warning)}class="warning"{/if} name="{$eduname}[grad_year]"
     value="{$edu.grad_year}" size="4" maxlength="4" />
     <small>(par exemple&nbsp;: 2008)</small>
   </td>
index c341043..42157d3 100644 (file)
@@ -20,7 +20,7 @@
 {*                                                                        *}
 {**************************************************************************}
 
-<tr id="search_name_{$i}"{if $class} class="{$class}" {if !$error_name}style="{$style}"{/if}{/if}>
+<tr id="search_name_{$i}"{if t($class)} class="{$class}" {if !t($error_name)}style="{$style}"{/if}{/if}>
   <td>
     <input type="hidden" name="search_names[{$i}][always_displayed]" value="{$sn.always_displayed}"/>
     <input type="hidden" name="search_names[{$i}][has_particle]" value="{$sn.has_particle}"/>
@@ -28,7 +28,7 @@
       <span id="flag_{$i}">{if $sn.pub}{icon name="flag_green" title="site public"}
       {else}{icon name="flag_red" title="site privé"}{/if}</span>
     </span>&nbsp;
-    {if $sn_type_list}
+    {if t($sn_type_list)}
     <select id="search_name_select_{$i}" name="search_names[{$i}][typeid]"
       onchange="changeNameFlag({$i});updateNameDisplay({$isFemale});">
         {foreach from=$sn_type_list item=sn_type}
@@ -49,7 +49,7 @@
   <td>
     <input type="text" name="search_names[{$i}][name]" value="{$sn.name}"
       {if $sn.has_particle}title="Coche la case en bout de ligne si ton nom commence par une particle."{/if}
-      {if $sn.error} class="error"{/if} size="25" onkeyup="updateNameDisplay({$isFemale});"/>
+      {if t($sn.error)} class="error"{/if} size="25" onkeyup="updateNameDisplay({$isFemale});"/>
   </td>
   <td>
     {if $sn.has_particle}<input type="checkbox"{if $sn.particle neq ''} checked="checked"{/if}
index d7a41e4..28d3946 100644 (file)
@@ -22,7 +22,7 @@
 
 <table class="bicol" style="margin-bottom: 1em" summary="Profil : Noms">
   <tr>
-    <th colspan="3">Noms{if $validation} <small>(validations en attente de modération)</small>{/if}</th>
+    <th colspan="3">Noms{if t($validation)} <small>(validations en attente de modération)</small>{/if}</th>
   </tr>
   <tr>
     <td class="titre">
@@ -97,7 +97,7 @@
       <span class="titre">Promotion</span>
     </td>
     <td>
-      {if !$promo_choice}
+      {if !t($promo_choice)}
         <span class="nom">{$profile->promo()}</span>
         <input type="hidden" name="promo_display" value="{$profile->promo()}"/>
       {else}
       </div>
     </td>
   </tr>
-  {if $email_error}
+  {if t($email_error)}
     {include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory_error error=$email_error i="0"}
-  {else}{include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory error=$email_error i="0"}{/if}
+  {else}{include file="include/emails.combobox.tpl" name="email_directory" val=$email_directory error=false i="0"}{/if}
   <tr>
     <td colspan="2">
       <span class="titre">Messageries, networking et sites web</span>