Improves the comment/edition box opener in admin/validate
[platal.git] / templates / profile / nomusage.tpl
index 184fe65..9b813df 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -68,7 +68,7 @@ exceptionnellement sur changement de l'état civil, ...).
 <p>
 Les surnoms sont <strong>systématiquement refusés</strong>. Pour
 utiliser une adresse personnalisée, il faut se tourner vers
-<a href="emails/alias">l'alias @melix.net</a>.
+<a href="emails/alias">l'alias @{#globals.mail.alias_dom#}</a>.
 </p>
 
   <p>
@@ -80,7 +80,18 @@ utiliser une adresse personnalisée, il faut se tourner vers
 
   <br />
 
-  <form action="profile/usage" method="post">
+{literal}
+  <form action="profile/usage" method="post" onsubmit="
+  for (var i=this.reason.length-1; i>=0; i--) {
+    if (this.reason[i].checked && 
+      (this.reason[i].value != 'other' || this.other_reason.value != '')) {
+      return true;
+    }
+  }
+  alert('Tu dois préciser une raison motivant ta demande.');
+  return false;
+">
+{/literal}
     <table class="bicol" cellpadding="4" summary="Nom d'usage">
       <tr>
         <th>Nom d'usage</th>
@@ -98,12 +109,12 @@ utiliser une adresse personnalisée, il faut se tourner vers
       </tr>
       <tr>
         <td class="rt">
-          <input type="radio" name="reason" checked="checked" value="époux/se" id="reason_ep" onclick="this.form.other_reason.value=''" /><label for="reason_ep">Nom d'épouse / d'époux</label><br />
+          <input type="radio" name="reason" value="époux/se" id="reason_ep" onclick="this.form.other_reason.value=''" /><label for="reason_ep">Nom d'épouse / d'époux</label><br />
           {if $usage_old}
             <input type="radio" name="reason" value="divorce" id="reason_div" onclick="this.form.other_reason.value=''" /><label for="reason_div">Divorce</label><br />
           {/if}
           <input type="radio" name="reason" value="raccourci" id="reason_rac" onclick="this.form.other_reason.value=''" /><label for="reason_rac">Nom d'état civil simplifié, le nom officiel étant trop long</label><br />
-          <input type="radio" name="reason" value="other" id="reason_oth" /><label for="reason_oth">Autre :</label><br />
+          <input type="radio" name="reason" value="other" id="reason_oth" /><label for="reason_oth">Autre&nbsp;:</label><br />
           <input type="text" name="other_reason" onfocus="document.getElementById('reason_oth').checked='checked'" size="60" />
         </td>
       </tr>