Finish closing #20: show who need auth
[platal.git] / templates / password_prompt.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
50a40a33 3{* Copyright (C) 2003-2006 Polytechnique.org *}
0337d704 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<noscript>
24 <p class="erreur">
25 Ton navigateur n'accepte pas le javaScript !!
26 </p>
27 <p>
28 Cette forme de script web est nécessaire pour l'utilisation du site.
7b2413f6 29 Pour en savoir plus, regarde la <a href="Docs/FAQ#connect">FAQ</a>.
0337d704 30 </p>
31</noscript>
32
f9544023 33{if $smarty.server.HTTP_REFERER}
34<h1>
35 Accès restreint
36</h1>
37<p>
38 Bonjour,<br />
39 La page que vous avez demandez (<strong>{$smarty.server.HTTP_REFERER}</strong>) nécessite une authentification
40</p>
41{else}
0337d704 42<h1>
43 Accès réservé aux Polytechniciens
44</h1>
f9544023 45{/if}
c6db254a 46{if $smarty.session.auth ge AUTH_COOKIE}
0337d704 47<p>
48<strong>Merci de rentrer ton mot de passe pour démarrer une connexion au site.</strong>
49Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi sur
7b2413f6 50<a href="register/">la page d'inscription</a>.
0337d704 51</p>
c6db254a 52{/if}
0337d704 53
c6db254a 54{if !$smarty.session.auth}
0337d704 55<p>
56<strong>Tu ne connais pas ton mot de passe ?</strong>
57</p>
58<ul>
59 <li>
60 Si tu viens de terminer ta pré-inscription, <strong>il est dans le mail</strong> que
7d73bb7b 61 nous t'avons envoyé (expéditeur pre-inscription@{#globals.mail.domain#}).
0337d704 62 </li>
63 <li>
64 Si tu n'es jamais venu sur le site, <strong>il faut t'enregistrer auprès de
7d73bb7b 65 nous</strong> pour obtenir un accès. {#globals.core.sitename#} c'est l'e-mail des X,
0337d704 66 l'annuaire en ligne, plus un tas d'autres services. Nous te fournirons un accès le plus
7b2413f6 67 rapidement possible. <strong> <a href="register/">Clique ici pour nous demander tes
0337d704 68 paramètres personnels.</a></strong>
69 </li>
70</ul>
c6db254a 71{/if}
0337d704 72
73<br />
74
75<form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;">
76 <table class="bicol" cellpadding="4" summary="Formulaire de login">
77 <tr>
78 <th colspan="2">Connexion</th>
79 </tr>
80 <tr style="white-space: nowrap">
81 <td class="titre">
82 Adresse email :
83 </td>
84 <td>
85 <input type="text" name="username" size="20" maxlength="50" value="{insert name="getUserName"}" />&nbsp;@&nbsp;<select name="domain">
86 <option value="login">{#globals.mail.domain#} / {#globals.mail.domain2#}</option>
87 <option value="alias" {if $smarty.cookies.ORGdomain eq alias}selected="selected"{/if}>
88 {#globals.mail.alias_dom#} / {#globals.mail.alias_dom2#}
89 </option>
90 {$smarty.cookies.domain}
91 </select>
92 </td>
93 </tr>
94 <tr>
95 <td class="titre">
96 Mot de passe:
97 </td>
98 <td>
99 <input type="password" name="password" size="10" maxlength="10" />
100 </td>
101 </tr>
102 <tr>
103 <td></td>
104 <td {popup caption='Connexion permanente' width='300' text="Coche cette case pour que le site se souvienne de ce navigateur.<br />
105 Il n'est pas conseillé de cocher la case si cette machine n'est pas <b>strictement</b> personnelle"}>
106 <input type="checkbox" name="remember" /> Garder l'accès aux services après déconnexion
107 </td>
108 </tr>
109 <tr>
110 <td colspan="2">
111 <table width="100%"><tr>
112 <td>
7b2413f6 113 <a href="recovery">mot de passe perdu ?</a>
0337d704 114 </td>
115 <td class="right">
116 <input type="submit" name="submitbtn" value="Envoyer" />
117 </td>
118 </tr></table>
119 </td>
120 </tr>
121 </table>
122</form>
123<p>
7b2413f6 124Problème de connexion ? <a href="Docs/FAQ#connect">La réponse est là.</a>
0337d704 125<br />
126(Activer obligatoirement le <strong>javascript</strong>)
127</p>
128
129{if $smarty.request.response}<!-- failed login code //-->
130<br />
131<div class="erreur">
132 Erreur d'identification. Essaie à nouveau !
133</div>
134{/if}
135
136<!-- Set up the form with the challenge value and an empty reply value //-->
137<form action="{$smarty.server.REQUEST_URI}" method="post" id="loginsub">
138 <div>
cab08090 139 <input type="hidden" name="challenge" value="{$smarty.session.challenge}" />
0337d704 140 <input type="hidden" name="response" value="" />
46bde4d1 141 <input type="hidden" name="xorpass" value="" />
0337d704 142 <input type="hidden" name="username" value="" />
143 <input type="hidden" name="remember" value="" />
144 <input type="hidden" name="domain" value="" />
145 </div>
146</form>
147
148{literal}
149<script type="text/javascript">
150 <!--
151 // Activate the appropriate input form field.
152 if (document.forms.login.username.value == '') {
153 document.forms.login.username.focus();
154 } else {
155 document.forms.login.password.focus();
156 }
157 // -->
158</script>
159{/literal}
160
161{* vim:set et sw=2 sts=2 sws=2: *}