Allow edition of the death date in the profile edition page.
[platal.git] / templates / profile / general.tpl
index 7c5a079..fbe27db 100644 (file)
@@ -22,7 +22,7 @@
 
 <table class="bicol" style="margin-bottom: 1em" summary="Profil : Noms">
   <tr>
-    <th colspan="3">Noms</th>
+    <th colspan="3">Noms{if t($validation)} <small>(validations en attente de modération)</small>{/if}</th>
   </tr>
   <tr>
     <td class="titre">
@@ -71,9 +71,9 @@
     class="names_advanced" style="display: none" error_name=$errors.search_names}
   {/foreach}
   <tr class="names_advanced" id="searchname" {if !$errors.search_names}style="display: none"{/if}>
-    <td colspan="2">
+    <td colspan="3">
       <div id="sn_add" class="center">
-        <a href="javascript:addSearchName();">
+        <a href="javascript:addSearchName({$isFemale});">
           {icon name=add title="Ajouter un nom"} Ajouter un nom
         </a>
       </div>
@@ -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}
     </td>
     <td><input type="text" {if $errors.birthdate}class="error"{/if} name="birthdate" value="{$birthdate}" /></td>
   </tr>
+  {if !$smarty.session.user->isMe($owner)}
+  <tr>
+    <td>
+      <span class="titre">Date de décès</span>
+    </td>
+    <td><input type="text" {if $errors.deathdate}class="error"{/if} name="deathdate" value="{$deathdate}" /></td>
+  </tr>
+  {/if}
   <tr>
     <td>
       <span class="titre">Nationalité</span>
     {cycle values="impair, pair" assign=class}
     {include file="profile/general.edu.tpl" eduid=$eduid edu=$edu edu_fields=$edu_fields class=$class}
   {/foreach}
-  {if $edus|@count eq 0}
-    {cycle values="impair, pair" assign=class}
-    {include file="profile/general.edu.tpl" eduid=0 edu=0 class=$class}
-  {/if}
   {cycle values="impair, pair" assign=class}
   {assign var=eduaddid value=$edus|@count}
   <tr id="edu_add" class="edu_{$eduaddid} {$class}">
       quelque part (sur ton ordinateur ou sur Internet) d'une photo
       d'identité (dans un fichier au format JPEG, PNG ou GIF).<br />
       <div class="center">
-        <a href="photo/change">Éditer ta photo</a>
+        <a href="photo/change/{$profile->hrid()}">Éditer ta photo</a>
       </div>
     </td>
   </tr>
         </div>
       {/if}
       <div id="tels_add" class="center" style="clear: both; padding-top: 4px;">
-        <a href="javascript:addTel('tels', 'tels');">
+        <a href="javascript:addTel('tels','tels');">
           {icon name=add title="Ajouter un téléphone"} Ajouter un téléphone
         </a>
       </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>
     {include file="profile/general.networking.tpl" nw=$network i=$id}
   {/foreach}
   <tr id="networking">
-    <script type="text/javascript">//<![CDATA[
-      var nw_list = new Array();
-      {foreach from=$network_list item=network}
-        nw_list['{$network.name}'] = {$network.type};
-      {/foreach}
-    //]]></script>
     <td colspan="2">
+      <script type="text/javascript">//<![CDATA[
+        var nw_list = new Array();
+        {foreach from=$network_list item=network}
+          nw_list['{$network.name}'] = {$network.type};
+        {/foreach}
+      //]]></script>
       <div id="nw_add" class="center">
         <a href="javascript:addNetworking();">
           {icon name=add title="Ajouter une adresse"} Ajouter une adresse