closes FS301
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Sat, 7 May 2005 13:43:30 +0000 (13:43 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:53 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-628

ChangeLog
include/validations.inc.php
templates/admin/valider.tpl
templates/alias.tpl

index 6ac7b19..8dc251d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@ Bug/Wish :
        * Admin :
                - #298: On su exit, go back to SU page on the given account.            -MC
                - #300: Notify hotliners for validation comments.                                       -Car
+               - #301: Some design issues solved for validation.                                       -MC
 
        * Misc :
                - #290: Date display with no preceding 0.                                                       -Car
index ce0c934..14553f5 100644 (file)
@@ -206,10 +206,14 @@ class Validate
         }
 
         if (Env::has('refuse')) {
-            $this->sendmail(false);
-            $this->clean();
-            $this->trig('mail envoyé');
-            return true;
+            if (Env::get('comm')) {
+                $this->sendmail(false);
+                $this->clean();
+                $this->trig('mail envoyé');
+                return true;
+            } else {
+                $this->trig('pas de motivation pour le refus !!!');
+            }
         }
 
         return false;
index 98bb935..f49227a 100644 (file)
 
 {iterate item=valid from=$vit|smarty:nodefaults}
 <br />
-<form action="{$smarty.server.PHP_SELF}" method="post">
-  <table class="bicol" {popup caption="Règles de validation" text=$valid->rules}>
-    <tr>
-      <th colspan="2">{$valid->type}</th>
-    </tr>
-    <tr>
-      <td class="titre" style="width: 20%">Demandeur&nbsp;:</td>
-      <td>
-        <a href="{rel}/fiche.php?user={$valid->bestalias}" class="popup2">
-          {$valid->prenom} {$valid->nom} (X{$valid->promo})
-        </a>
-      </td>
-    </tr>
-    {include file=$valid->formu()}
-    {if $valid->comments}
-    <tr><th colspan='2'>Commentaires</th></tr>
-    {/if}
-    {foreach from=$valid->comments item=c}
-    <tr class="{cycle values="impair,pair"}">
-      <td class="titre">
-        <a href="{rel}/fiche.php?user={$c[0]}" class="popup2">{$c[0]}</a>
-      </td>
-      <td>{$c[1]}</td>
-    </tr>
-    {/foreach}
-    <tr>
-      <td colspan='2' class='center'>
-        Commentaire:<br />
-        <textarea rows="5" cols="50" name="comm"></textarea><br />
+<table class="bicol">
+  <tr>
+    <th colspan="2">{$valid->type}</th>
+  </tr>
+  <tr>
+    <td class="titre" style="width: 20%">Demandeur&nbsp;:</td>
+    <td>
+      <a href="{rel}/fiche.php?user={$valid->bestalias}" class="popup2">
+        {$valid->prenom} {$valid->nom} (X{$valid->promo})
+      </a>
+    </td>
+  </tr>
+  {include file=$valid->formu()}
+  <tr><th colspan='2'>Commentaires</th></tr>
+  {foreach from=$valid->comments item=c}
+  <tr class="{cycle values="impair,pair"}">
+    <td class="titre">
+      <a href="{rel}/fiche.php?user={$c[0]}" class="popup2">{$c[0]}</a>
+    </td>
+    <td>{$c[1]}</td>
+  </tr>
+  {/foreach}
+  <tr id='comment{$valid->uid}'>
+    <td colspan='2' class='center'>
+      <form action="{$smarty.server.PHP_SELF}" method="post">
+        <div>
+          <input type="hidden" name="uid"    value="{$valid->uid}" />
+          <input type="hidden" name="type"   value="{$valid->type}" />
+          <input type="hidden" name="stamp"  value="{$valid->stamp}" />
+          <textarea rows="3" cols="50" name="comm"></textarea>
+          <br />
+          <input type="submit" name="hold"   value="Commenter" />
+        </div>
+      </form>
+    </td>
+  </tr>
+  <tr><th colspan='2'>Réponse</th></tr>
+  <tr>
+    <td colspan='2' class='center' {popup caption="Règles de validation" text=$valid->rules}>
+      <form action="{$smarty.server.PHP_SELF}" method="post">
+        <div>
+          Ajouté dans l'email :<br />
+          <textarea rows="5" cols="50" name="comm"></textarea><br />
 
-        <input type="hidden" name="uid"    value="{$valid->uid}" />
-        <input type="hidden" name="type"   value="{$valid->type}" />
-        <input type="hidden" name="stamp"  value="{$valid->stamp}" />
-        <input type="submit" name="accept" value="Accepter" />
-        <input type="submit" name="hold"   value="Commenter" />
-        {if $valid->refuse}<input type="submit" name="refuse" value="Refuser" />{/if}
-        <input type="submit" name="delete" value="Supprimer" />
-      </td>
-    </tr>
-  </table>
-</form>
+          <input type="hidden" name="uid"    value="{$valid->uid}" />
+          <input type="hidden" name="type"   value="{$valid->type}" />
+          <input type="hidden" name="stamp"  value="{$valid->stamp}" />
+          <input type="submit" name="accept" value="Accepter" />
+          {if $valid->refuse}<input type="submit" name="refuse" value="Refuser" />{/if}
+          <input type="submit" name="delete" value="Supprimer" />
+        </div>
+      </form>
+    </td>
+  </tr>
+</table>
 {/iterate}
 
 {else}
index 259d36d..87aa444 100644 (file)
@@ -92,7 +92,7 @@
           <table class="flags" summary="Flags" cellpadding="0" cellspacing="0">
             <tr>
               <td class="orange">
-                <input type="checkbox" name="public" {if $r_public}checked{/if}/>
+                <input type="checkbox" name="public" {if $mail_public}checked="checked"{/if}/>
               </td>
               <td class="texte">
                 adresse publique (apparaît sur ta fiche).