Fixes some XHTML strict errors or warnings
authorPascal Corpet <pascal.corpet@m4x.org>
Thu, 27 May 2010 22:38:54 +0000 (00:38 +0200)
committerPascal Corpet <pascal.corpet@m4x.org>
Fri, 28 May 2010 21:44:03 +0000 (23:44 +0200)
27 files changed:
htdocs/javascript/profile.js
include/education.func.inc.php
plugins/function.select_nat.php
plugins/function.test_email.php
templates/admin/validation.tpl
templates/geoloc/form.address.tpl
templates/include/tips.tpl
templates/platal/preferences.tpl
templates/profile/adresses.address.tpl
templates/profile/deco.tpl
templates/profile/general.edu.tpl
templates/profile/general.searchname.tpl
templates/profile/general.tpl
templates/profile/groups.tpl
templates/profile/jobs.job.tpl
templates/profile/jobs.sector.tpl
templates/profile/jobs.sub_sector.tpl
templates/profile/mentor.tpl
templates/profile/phone.tpl
templates/profile/skill.skill.tpl
templates/profile/skill.tpl
templates/survey/edit_question.tpl
templates/survey/edit_radio.tpl
templates/survey/edit_radiotable.tpl
templates/xnetevents/index.tpl
templates/xnetgrp/edit.tpl
templates/xnetgrp/membres-new-search.tpl

index 2c5291c..4bb7eb1 100644 (file)
@@ -376,7 +376,7 @@ function addBinet()
              + '    <div style="float: left; width: 70%">'
              +        text
              + '    </div>'
-             + '    <a href="javascript:removeElement(\'binets\', ' + id + ')">'
+             + '    <a href="javascript:removeElement(\'binets\',' + id + ')">'
              + '      <img src="images/icons/cross.gif" alt="cross" title="Supprimer ce groupe" />'
              + '    </a>'
              + '  </td>'
@@ -549,7 +549,7 @@ function addCountry()
     var val  = $('#countries_table').find('[name=countries_sel] :selected').val();
     var text = $('#countries_table').find('[name=countries_sel] :selected').text();
     var html = '<div id="countries_' + val + '" style="clear: both; margin-bottom: 0.7em">'
-        + '  <a href="javascript:removeElement(\'countries\', \'' + val + '\')" style="display: block; float:right">'
+        + '  <a href="javascript:removeElement(\'countries\',\'' + val + '\')" style="display: block; float:right">'
         + '    <img src="images/icons/cross.gif" alt="" title="Supprimer ce pays" />'
         + '  </a>'
         + '  <div style="float: left; width: 50%">' + text + '</div>'
@@ -601,7 +601,7 @@ function addSector()
     var sst = $('#subSectorSelection').find("[name='jobs[-1][subSector]'] :selected").text();
 
     var html = '<div id="sectors_' + s + '_' + ss + '" style="clear: both; margin-top: 0.5em" class="titre">'
-             + '  <a href="javascript:removeSector(\'' + s + '\', \'' + ss + '\')" style="display: block; float: right">'
+             + '  <a href="javascript:removeSector(\'' + s + '\',\'' + ss + '\')" style="display: block; float: right">'
              + '    <img src="images/icons/cross.gif" alt="" title="Supprimer ce secteur" />'
              + '  </a>'
              + '  <input type="hidden" name="sectors[' + s + '][' + ss + ']" value="' + sst + '" />'
index 16cca57..dbfba28 100644 (file)
@@ -21,7 +21,7 @@
 
 function education_options($current = 0)
 {
-    $html = '<option value="-1"></option>';
+    $html = '<option value="-1">&nbsp;</option>';
     $res  = XDB::iterator("SELECT  e.id AS id, gc.countryFR AS country,
                                    IF(CHAR_LENGTH(e.name) > 76, e.abbreviation, e.name) AS name
                              FROM  profile_education_enum AS e
@@ -33,8 +33,11 @@ function education_options($current = 0)
     $country = "";
     while ($arr_edu = $res->next()) {
         if ($arr_edu["country"] != $country) {
+            if ($country) {
+                $html .= '</optgroup>';
+            }
             $country = $arr_edu["country"];
-            $html .= "<optgroup label=" . $country . ">";
+            $html .= '<optgroup label="' . $country . '">';
         }
         $html .= '<option value="' . $arr_edu["id"] . '"';
         if ($arr_edu["id"] == $current) {
@@ -42,6 +45,9 @@ function education_options($current = 0)
         }
         $html .= '>' . htmlspecialchars($arr_edu["name"]) . "</option>\n";
     }
+    if ($country) {
+        $html .= '</optgroup>';
+    }
     return $html;
 }
 
index 9a73f39..a9720ed 100644 (file)
@@ -30,10 +30,10 @@ function select_nat($valeur, $pad=false) {
     // on ajoute une entree vide si $pad est vrai
     $html = "";
     if ($pad) {
-             $html .= sprintf("<option value=\"\"%s></option>\n", ($valeur ? $sel : ""));
+             $html .= sprintf("<option value=\"\"%s>&nbsp;</option>\n", ($valeur ? $sel : ""));
     }
     while (list($my_id, $my_text) = $res->next()) {
-        $html .= sprintf("<option value=\"%s\"%s>%s</option>\n", $my_id, ($valeur==$my_id ? $sel : ""), $my_text);
+        $html .= sprintf("<option value=\"%s\"%s>%s</option>\n", $my_id, ($valeur==$my_id ? $sel : ""), $my_text?$my_text:"&nbsp;");
     }
 
     return $html;
index 2093082..745a484 100644 (file)
@@ -26,8 +26,8 @@ function smarty_function_test_email($params, &$smarty) {
     return '<div class="center">'
          . '  <div id="mail_sent" style="position: absolute;"></div><br />'
          . '  <form action="emails/test" method="get" onsubmit="return sendTestEmail(' . $token . $hruid . ')">'
-         . '    <input type="hidden" name="token" value="' . S::v('xsrf_token') . '" />'
-         . '    <div><input type="submit" name="send" value="' . $label . '" /></div>'
+         . '    <div><input type="hidden" name="token" value="' . S::v('xsrf_token') . '" />'
+         . '    <input type="submit" name="send" value="' . $label . '" /></div>'
          . '  </form>'
          . '</div>';
 }
index 970e2f9..815d403 100644 (file)
@@ -136,7 +136,7 @@ function toggleField(name, id, obj) {
         <div>
           Réponse préremplie&nbsp;:
           <select onchange="this.form.comm.value=this.value">
-            <option value=""></option>
+            <option value="">&nbsp;</option>
             {foreach from=$valid->answers() item=automatic_answer}
               <option value="{$automatic_answer.answer}">{$automatic_answer.title}</option>
             {/foreach}
index 5f37486..6539391 100644 (file)
@@ -26,9 +26,9 @@
 </div>
 <div class="{$prefid}_geoloc">
   <ul>
-    <li><a href="javascript:validGeoloc('{$prefid}', '{$id}', 0)" style="color: red">ton adresse (à gauche)</a>&nbsp;;</li>
-    <li><a href="javascript:validGeoloc('{$prefid}', '{$id}', 1)" style="color: green">notre suggestion (à droite)</a>&nbsp;;</li>
-    <li><a href="javascript:validGeoloc('{$prefid}', '{$id}', 2)"
+    <li><a href="javascript:validGeoloc('{$prefid}','{$id}',0)" style="color: red">ton adresse (à gauche)</a>&nbsp;;</li>
+    <li><a href="javascript:validGeoloc('{$prefid}','{$id}',1)" style="color: green">notre suggestion (à droite)</a>&nbsp;;</li>
+    <li><a href="javascript:validGeoloc('{$prefid}','{$id}',2)"
            title="Garder le texte de l'adresse que tu as renseignée tout en utilisant les informations trouvées par le géocodage pour te localiser sur le planisphère et dans lors d'une recherche dans l'annuaire.">
       le texte de ton adresse localisé à l'endroit que nous te suggérons</a>.</li>
   </ul>
index 2d4f5f3..32e2d58 100644 (file)
@@ -38,7 +38,7 @@
   {/tidy}
   {if !$nochange}
   <div class="right">
-    <a href="" onclick="Ajax.update_html('tod', 'ajax/tips/{$tips.id}'); return false" style="text-decoration: none">
+    <a href="events" onclick="Ajax.update_html('tod', 'ajax/tips/{$tips.id}'); return false" style="text-decoration: none">
       Astuce suivante {icon name=resultset_next title="Astuce suivante"}
     </a>
   </div>
index 97bff5b..05b8d4e 100644 (file)
@@ -63,7 +63,7 @@
     <td class="half">
       {if $smarty.session.email_format eq html}
       <h3>
-        <a href="javascript:dynpostkv('prefs', 'email_format', 'text')">Recevoir les emails en format texte</a>
+        <a href="javascript:dynpostkv('prefs','email_format','text')">Recevoir les emails en format texte</a>
       </h3>
       <div class='explication'>
         Tu recois tous les emails envoyés par le site
@@ -72,7 +72,7 @@
       </div>
       {else}
       <h3>
-        <a href="javascript:dynpostkv('prefs', 'email_format', 'html')">Recevoir les emails en HTML</a>
+        <a href="javascript:dynpostkv('prefs','email_format','html')">Recevoir les emails en HTML</a>
       </h3>
       <div class='explication'>
         Tu recois tous les emails envoyés par le site
@@ -84,9 +84,9 @@
     <td class="half">
       <h3>
         {if $smarty.session.token}
-        <a href="javascript:dynpostkv('prefs', 'rss', 0)">Désactiver les fils rss</a>
+        <a href="javascript:dynpostkv('prefs','rss',0)">Désactiver les fils rss</a>
         {else}
-        <a href="javascript:dynpostkv('prefs', 'rss', 1)">Activer les fils rss</a>
+        <a href="javascript:dynpostkv('prefs','rss',1)">Activer les fils rss</a>
         {/if}
       </h3>
       <div class='explication'>
index c30aac9..48319b6 100644 (file)
@@ -26,7 +26,7 @@
   <tr>
     <th class="grayed">
       <div style="float: right">
-        <a href="javascript:toggleAddress('{$i}', 0)">{icon name=arrow_refresh title="Restaurer l'adresse"}</a>
+        <a href="javascript:toggleAddress('{$i}',0)">{icon name=arrow_refresh title="Restaurer l'adresse"}</a>
       </div>
       Restaurer l'adresse n°{$i+1}
     </th>
@@ -43,7 +43,7 @@
         </label>
       </div>
       <div style="float: right">
-        <a href="javascript:toggleAddress('{$i}', 1)">
+        <a href="javascript:toggleAddress('{$i}',1)">
           {icon name=cross title="Supprimer l'adresse"}
         </a>
       </div>
         </div>
       {/if}
       <div id="{$prefid}_tel_add" class="center" style="clear: both; padding-top: 4px">
-        <a href="javascript:addTel('{$prefid}_tel', '{$prefname}[tel]')">
+        <a href="javascript:addTel('{$prefid}_tel','{$prefname}[tel]')">
           {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone
         </a>
       </div>
index 7b94069..ae484a7 100644 (file)
@@ -34,7 +34,7 @@
     <td>
       <div style="clear: both; margin-top: 0.2em" id="medals">
         <select name="medal_sel" onchange="updateMedal()">
-          <option value=''></option>
+          <option value=''>&nbsp;</option>
           {foreach from=$medal_list key=type item=list}
           <optgroup label="{$trad[$type]}&hellip;">
             {foreach from=$list item=m}
index e4da793..8a3c4c5 100644 (file)
@@ -38,7 +38,7 @@
   <td>
     <input type="hidden" name="edu_{$eduid}_tmp" value="{$edu.degreeid}" />
     <select name="{$eduname}[degreeid]">
-      <option value=""></option>
+      <option value="">&nbsp;</option>
     </select>
   </td>
 </tr>
index ef613e1..2ba0d0a 100644 (file)
@@ -57,7 +57,7 @@
       title="Coche cette case si ton nom commence par une particle." onchange="toggleParticle({$i});"/>
     {/if}
     <input type="hidden"  name="search_names[{$i}][particle]" value="{$sn.particle}"/>
-    {if !$sn.always_displayed}<a href="javascript:removeSearchName({$i}, {$isFemale})">
+    {if !$sn.always_displayed}<a href="javascript:removeSearchName({$i},{$isFemale})">
       {icon name=cross title="Supprimer ce nom"}
     </a>{/if}
   </td>
index 7c5a079..b5a567d 100644 (file)
         </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>
     {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
index 9aed51f..541ebb8 100644 (file)
@@ -58,7 +58,7 @@
       <div style="float: left; width: 70%">
         {$text}
       </div>
-      <a href="javascript:removeElement('binets', {$bid})">{icon name="cross" title="Supprimer ce binet"}</a>
+      <a href="javascript:removeElement('binets',{$bid})">{icon name="cross" title="Supprimer ce binet"}</a>
     </td>
   </tr>
   {/foreach}
index e7c816f..2d29790 100644 (file)
@@ -34,7 +34,7 @@
     <tr>
       <th class="grayed">
         <div style="float: right">
-          <a href="javascript:restoreJob('{$jobid}', '{$jobpref}')">{icon name=arrow_refresh title="Restaure l'emploi"}</a>
+          <a href="javascript:restoreJob('{$jobid}','{$jobpref}')">{icon name=arrow_refresh title="Restaure l'emploi"}</a>
         </div>
         Restaurer l'entreprise n°{$i+1}&nbsp;:&nbsp;<span id="{$jobid}_grayed_name"></span>
       </th>
@@ -52,7 +52,7 @@
         <input type="text" class="enterpriseName {if $job.name_error}error{/if}" size="35" maxlength="100"
                name="{$jobpref}[name]" value="{$job.name}" />
         {/if}
-        <a href="javascript:removeJob('{$jobid}', '{$jobpref}')">
+        <a href="javascript:removeJob('{$jobid}','{$jobpref}')">
           {icon name=cross title="Supprimer cet emploi"}
         </a>
       </th>
           </div>
         {/if}
         <div id="{$jobid}_w_phone_add" class="center" style="clear: both; padding-top: 4px;">
-          <a href="javascript:addTel('{$jobid}_w_phone', '{$jobpref}[w_phone]')">
+          <a href="javascript:addTel('{$jobid}_w_phone','{$jobpref}[w_phone]')">
             {icon name=add title="Ajouter un numéro de téléphone"} Ajouter un numéro de téléphone
           </a>
         </div>
index 141c402..e12c3dc 100644 (file)
@@ -22,7 +22,7 @@
 
 <?xml version="1.0" encoding="utf-8"?>
 <select name="jobs[{$id}][subSector]" {if ($change)}onchange="updateJobSubSector({$id}, '')"{/if}>
-  <option value="0"></option>
+  <option value="0">&nbsp;</option>
   {iterate from=$subSectors item=subSector}
   {if $subSector.optgroup}
   {if $gp}
index f332e3e..c332f11 100644 (file)
@@ -22,7 +22,7 @@
 
 <?xml version="1.0" encoding="utf-8"?>
 <select name="jobs[{$id}][subSubSector]" onchange="updateJobAlternates({$id})">
-  <option value="0"></option>
+  <option value="0">&nbsp;</option>
   {iterate from=$subSubSectors item=subSubSector}
   <option value="{$subSubSector.id}" {if $subSubSector.id eq $sel}selected="selected"{/if}>{$subSubSector.name}</option>
   {/iterate}
index aaae1e0..52688b9 100644 (file)
@@ -61,9 +61,9 @@
         <a href="javascript:addCountry()">{icon name=add title="Ajouter ce pays"}</a>
       </div>
       <select name="countries_sel" onchange="updateElement('countries')">
-        <option value=""></option>
+        <option value="">&nbsp;</option>
         {iterate from=$countryList item=country}
-        <option value="{$country.iso_3166_1_a2}">{$country.countryFR}</option>
+        <option value="{$country.iso_3166_1_a2}">{$country.countryFR|default:"&nbsp;"}</option>
         {/iterate}
       </select>
     </td>
@@ -73,7 +73,7 @@
       {foreach from=$countries item=country key=i}
       <div id="countries_{$i}" style="clear: both; margin-bottom: 0.7em">
         <a style="display: block; float: right"
-           href="javascript:removeElement('countries', '{$i}')">{icon name=cross title="Supprimer ce pays"}</a>
+           href="javascript:removeElement('countries','{$i}')">{icon name=cross title="Supprimer ce pays"}</a>
         <div class="titre">{$country}</div>
         <input type="hidden" name="countries[{$i}]" value="{$country}" />
       </div>
       {foreach from=$sectors item=sector key=s}
       {foreach from=$sector item=subSector key=ss}
       <div id="sectors_{$s}_{$ss}" style="clear: both; margin-top: 0.5em" class="titre">
-        <a href="javascript:removeSector('{$s}', '{$ss}')" style="display: block; float: right">
+        <a href="javascript:removeSector('{$s}','{$ss}')" style="display: block; float: right">
           {icon name=cross title="Supprimer ce secteur"}
         </a>
         <input type="hidden" name="sectors[{$s}][{$ss}]" value="{$subSector}" />
index 35d9c51..056d85a 100644 (file)
@@ -44,7 +44,7 @@
 <div id="{$id}_comment" style="clear: both;{if $tel.comment eq ''} display:none{/if}">
   Commentaire :
   <input type="text" size="45" maxlength="80" name="{$telpref}[comment]" {if $tel.error}class="error"{/if} value="{$tel.comment}"/>
-  <a href="javascript:removePhoneComment('{$id}', '{$telpref}')">
+  <a href="javascript:removePhoneComment('{$id}','{$telpref}')">
     {icon name=cross title="Supprimer le commentaire"}
   </a>
 </div>
index 853177e..08e6757 100644 (file)
@@ -30,7 +30,7 @@
     <option value="{$lid}" {if $skill.level eq $lid}selected="selected"{/if}>{$level}</option>
     {/foreach}
   </select>
-  <a href="javascript:removeElement('{$cat}', '{$id}')">{icon name=cross title="Supprimer"}</a>
+  <a href="javascript:removeElement('{$cat}','{$id}')">{icon name=cross title="Supprimer"}</a>
 </div>
 
 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 91ba7bd..469bb15 100644 (file)
@@ -34,7 +34,7 @@
     <td>
       <span class="titre">Domaine&nbsp;:</span>
       <select name="competences_sel" onchange="updateElement('competences')">
-        <option value=""></option>
+        <option value="">&nbsp;</option>
         {assign var=ingroup value=false}
         {iterate from=$comp_list item=comp}
         {if $comp.title}
@@ -74,7 +74,7 @@
     <td>
       <span class="titre">Domaine&nbsp;:</span>
       <select name="langues_sel" onchange="updateElement('langues')">
-        <option value=""></option>
+        <option value="">&nbsp;</option>
         {iterate from=$lang_list item=lang}
         <option value="{$lang.id}">{$lang.langue_fr}</option>
         {/iterate}
index 16961df..cc63cdd 100644 (file)
@@ -46,7 +46,7 @@
         fid = "t" + id[name];
         $("#" + name + "_" + tid).before('<div id="' + name + '_' + fid + '">' 
             + '<input id="' + name + '_' + fid + '_field" type="text" name="survey_question[' + name + '][' + fid + ']" size="50" maxlength="200" value="" />&nbsp;'
-            + '<a href="javascript:removeField(&quot;' + name + '&quot;, &quot;' + fid + '&quot;)"><img src="images/icons/delete.gif" alt="" title="Supprimer" /></a>'
+            + '<a href="javascript:removeField(&quot;' + name + '&quot;,&quot;' + fid + '&quot;)"><img src="images/icons/delete.gif" alt="" title="Supprimer" /></a>'
             + '</div>'); 
         id[name]++; 
         $("#" + name + "_" + fid + "_field").focus();
index 6d5d985..8b4e1b2 100644 (file)
         {foreach from=$survey_current.choices key=value item=choice}
         <div id="choices_t{$value}">
           <input type="text" name="survey_question[choices][t{$value}]" size="50" maxlength="200" value="{$choice}" />
-          <a href="javascript:removeField('choices', 't{$value}')">{icon name=delete title="Supprimer"}</a>
+          <a href="javascript:removeField('choices','t{$value}')">{icon name=delete title="Supprimer"}</a>
         </div>
         {/foreach}
         <div id="choices_last">
-          <a href="javascript:newField('choices', 'last')">{icon name=add}</a>
+          <a href="javascript:newField('choices','last')">{icon name=add}</a>
         </div>
       </td>
     </tr>
index 4b79a27..0e034c3 100644 (file)
         {foreach from=$survey_current.subquestions key=value item=subquestion}
         <div id="subquestions_t{$value}">
           <input type="text" name="survey_question[subquestions][t{$value}]" size="50" maxlength="200" value="{$subquestion}" />
-          <a href="javascript:removeField('subquestions', 't{$value}')">{icon name=delete title="Supprimer"}</a>
+          <a href="javascript:removeField('subquestions','t{$value}')">{icon name=delete title="Supprimer"}</a>
         </div>
         {/foreach}
         <div id="subquestions_last">
-          <a href="javascript:newField('subquestions', 'last')">{icon name=add}</a>
+          <a href="javascript:newField('subquestions','last')">{icon name=add}</a>
         </div>
       </td>
     </tr>
index 2b4c05c..16f6c84 100644 (file)
@@ -73,7 +73,7 @@
         modifier
         {icon name=date_edit title="Édition de l'événement"}</a>]
       &nbsp;
-      [<a href="javascript:dynpostkv('{$platal->pl_self()}?token={xsrf_token}', {if !$archive}'archive'{else}'unarchive'{/if}, {$e.eid})">
+      [<a href="javascript:dynpostkv('{$platal->pl_self()}?token={xsrf_token}',{if !$archive}'archive'{else}'unarchive'{/if},{$e.eid})">
         {if !$archive}
           archiver
           {icon name=package_add title="Archivage"}</a>]
@@ -82,7 +82,7 @@
           {icon name=package_delete title="Désarchivage"}</a>]
         {/if}
       &nbsp;
-      [<a href="javascript:dynpostkv('{$platal->ns}events?token={xsrf_token}', 'del', {$e.eid})"
+      [<a href="javascript:dynpostkv('{$platal->ns}events?token={xsrf_token}','del',{$e.eid})"
         onclick="return confirm('Supprimer l\'événement effacera la liste des inscrits et des paiements.\n Es-tu sûr de vouloir supprimer l\'événement&nbsp;?')">
         supprimer
       {icon name=delete title='Suppression'}</a>]
index b5e00c8..0308240 100644 (file)
@@ -69,7 +69,7 @@
       </td>
       <td>
         <select name="dom">
-          <option value=""></option>
+          <option value="">&nbsp;</option>
           {iterate from=$dom item=d}
           <option value="{$d.id}" {if $d.id eq $asso->dom}selected="selected"{/if}>{$d.nom} [{$d.cat}]</option>
           {/iterate}
index 1e5a674..7589bed 100644 (file)
@@ -27,7 +27,7 @@
   {else}
   Camarades correspondants&nbsp;:
   <select name="userid" onchange="document.getElementById('marketing').style.display = (this.value == 0 ? 'none' : '')">
-    <option value="0"></option>
+    <option value="0">&nbsp;</option>
     {foreach item=user from=$users}
     <option value="{$user->id()}" {if $users|@count == 1}selected="selected"{/if}>{profile user=$user link=false promo=true}</option>
     {/foreach}