| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2010 Polytechnique.org *} |
| 4 | {* http://opensource.polytechnique.org/ *} |
| 5 | {* *} |
| 6 | {* This program is free software; you can redistribute it and/or modify *} |
| 7 | {* it under the terms of the GNU General Public License as published by *} |
| 8 | {* the Free Software Foundation; either version 2 of the License, or *} |
| 9 | {* (at your option) any later version. *} |
| 10 | {* *} |
| 11 | {* This program is distributed in the hope that it will be useful, *} |
| 12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} |
| 13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} |
| 14 | {* GNU General Public License for more details. *} |
| 15 | {* *} |
| 16 | {* You should have received a copy of the GNU General Public License *} |
| 17 | {* along with this program; if not, write to the Free Software *} |
| 18 | {* Foundation, Inc., *} |
| 19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} |
| 20 | {* *} |
| 21 | {**************************************************************************} |
| 22 | |
| 23 | {literal} |
| 24 | <script type="text/javascript"> |
| 25 | /* <![CDATA[ */ |
| 26 | function add_user_to_url(f) { |
| 27 | f.action += '/' + f.login.value; |
| 28 | } |
| 29 | /* ]]> */ |
| 30 | </script> |
| 31 | {/literal} |
| 32 | |
| 33 | <fieldset> |
| 34 | <legend>{icon name=user_edit} Administrer un compte</legend> |
| 35 | <form method="post" action="admin/user" onsubmit="add_user_to_url(this); return true"> |
| 36 | {xsrf_token_field} |
| 37 | <p> |
| 38 | Il est possible d'entrer ici n'importe quelle adresse mail : redirection, melix, ou alias. |
| 39 | </p> |
| 40 | <p> |
| 41 | <input type="text" name="login" size="40" maxlength="255" |
| 42 | value="{if t($smarty.request.login)}{$smarty.request.login}{/if}" /> |
| 43 | <input type="submit" name="select" value="edit" /> |
| 44 | <input type="submit" name="su_account" value="su" /> |
| 45 | <input type="submit" name="log_account" value="logs" /> |
| 46 | </p> |
| 47 | </form> |
| 48 | </fieldset> |
| 49 | |
| 50 | <fieldset> |
| 51 | <legend>Liste des comptes manuels</legend> |
| 52 | |
| 53 | <ul> |
| 54 | {iterate item=user from=$users} |
| 55 | <li> |
| 56 | <a href="admin/user/{$user->hruid}">{$user->fullName()} ({$user->hruid} - {$user->type})</a> |
| 57 | </li> |
| 58 | {/iterate} |
| 59 | </ul> |
| 60 | </fieldset> |
| 61 | |
| 62 | <fieldset> |
| 63 | <legend>Nouveau compte</legend> |
| 64 | |
| 65 | <ul> |
| 66 | <li><a href="admin/add_accounts">Ajout d'un ensemble d'utilisateurs</a></li> |
| 67 | <li>Ajouter une secrétaire de l'AX:</li> |
| 68 | </ul> |
| 69 | <p> |
| 70 | <form action="admin/accounts" method="post"> |
| 71 | {xsrf_token_field} |
| 72 | <table style="width: 75%; margin-left: auto; margin-right: auto"> |
| 73 | <tr> |
| 74 | <td class="titre">Nom</td> |
| 75 | <td><input type="text" name="firstname" size=60 maxlength="255" value="" /></td> |
| 76 | </tr> |
| 77 | <tr> |
| 78 | <td class="titre">Prénom</td> |
| 79 | <td><input type="text" name="lastname" size=60" maxlength="255" value="" /></td> |
| 80 | </tr> |
| 81 | <tr> |
| 82 | <td class="titre">Sexe</td> |
| 83 | <td><input type="checkbox" name="sex" checked="checked" /></td> |
| 84 | </tr> |
| 85 | <tr> |
| 86 | <td class="titre">Email</td> |
| 87 | <td><input type="text" name="email" size="60" maxlength="255" value="" /></td> |
| 88 | </tr> |
| 89 | <tr> |
| 90 | <td class="titre">Mot de passe</td> |
| 91 | <td> |
| 92 | <div style="float: left"> |
| 93 | <input type="password" name="password" size="10" maxlength="256" /> |
| 94 | <input type="hidden" name="pwhash" value="" /> |
| 95 | </div> |
| 96 | <div style="float: left; margin-top: 5px"> |
| 97 | {checkpasswd prompt="password" submit="create_account" text="Créer le compte"} |
| 98 | </div> |
| 99 | </td> |
| 100 | </tr> |
| 101 | <tr> |
| 102 | <td colspan="2" class="center"> |
| 103 | <input type="submit" name="create_account" value="Créer le compte" |
| 104 | onclick="return hashResponse('password', false, false);" /> |
| 105 | </td> |
| 106 | </tr> |
| 107 | </table> |
| 108 | </form> |
| 109 | </p> |
| 110 | </fieldset> |
| 111 | |
| 112 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |