Close #640: As we have a certificat only for one domain name, we have to use this...
[platal.git] / templates / core / password_prompt.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2007 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 {if $referer || $platal->pl_self() neq 'login'}
24 <h1>
25   Accès restreint
26 </h1>
27 <p>
28   Bonjour,<br />
29   La page que vous avez demandé
30   (<strong>{if $referer}{$smarty.server.HTTP_REFERER}{else}{$globals->baseurl}/{$platal->pl_self()}{/if}</strong>)
31   nécessite une authentification.
32 </p>
33 {else}
34 <h1>
35   Accès réservé aux polytechniciens
36 </h1>
37 {/if}
38 {if $smarty.session.auth ge AUTH_COOKIE}
39 <p>
40 <strong>Merci de rentrer ton mot de passe pour démarrer une connexion au site.</strong>
41 Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi sur
42 <a href="register/">la page d'inscription</a>.
43 </p>
44 {/if}
45
46 {if !$smarty.session.auth}
47 <p>
48 <strong>Tu ne connais pas ton mot de passe ?</strong>
49 </p>
50 <ul>
51   <li>
52   Si tu viens de terminer ta pré-inscription, <strong>il est dans le mail</strong> que
53   nous t'avons envoyé (expéditeur pre-inscription@{#globals.mail.domain#}).
54   </li>
55   <li>
56   Si tu n'es jamais venu sur le site, <strong>il faut t'enregistrer auprès de
57     nous</strong> pour obtenir un accès. {#globals.core.sitename#} c'est l'e-mail des X,
58   l'annuaire en ligne, plus un tas d'autres services.  Nous te fournirons un accès le plus
59   rapidement possible. <strong> <a href="register/">Clique ici pour nous demander tes
60       paramètres personnels.</a></strong>
61   </li>
62 </ul>
63 {/if}
64
65 <br />
66
67 <form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;" style="display: none">
68   <table class="bicol" cellpadding="4" summary="Formulaire de login">
69     <tr>
70       <th colspan="2">{if $smarty.server.HTTPS}{icon name=lock}{/if} Identification
71       {if !$smarty.server.HTTPS && #globals.core.secure_domain#}
72       (<a href="https://{#globals.core.secure_domain#}{$smarty.server.REQUEST_URI}">{icon name=lock_add} Passer en connexion sécurisée</a>)
73       {/if}
74       </th>
75     </tr>
76     <tr style="white-space: nowrap">
77       <td class="titre">
78         Adresse email :
79       </td>
80       <td>
81         <input type="text" name="username" size="20" maxlength="50" value="{insert name="getUserName"}" />&nbsp;@&nbsp;<select name="domain">
82           <option value="login">{#globals.mail.domain#} / {#globals.mail.domain2#}</option>
83           <option value="alias" {if $smarty.cookies.ORGdomain eq alias}selected="selected"{/if}>
84           {#globals.mail.alias_dom#} / {#globals.mail.alias_dom2#}
85           </option>
86           {$smarty.cookies.domain}
87         </select>
88       </td>
89     </tr>
90     <tr>
91       <td class="titre">
92         Mot de passe:
93       </td>
94       <td>
95         <input type="password" name="password" size="10" maxlength="10" />
96       </td>
97     </tr>
98     <tr>
99       <td></td>
100       <td {popup caption='Connexion permanente' width='300' text="Coche cette case pour être automatiquement reconnu à ta prochaine connexion
101         depuis cet ordinateur.<br />
102         Il n'est pas conseillé de cocher la case si cette machine n'est pas <b>strictement</b> personnelle"}>
103         <input type="checkbox" name="remember" /> Garder l'accès aux services après déconnexion
104       </td>
105     </tr>
106     <tr>
107       <td colspan="2">
108       <table width="100%"><tr>
109       <td>
110         <a href="recovery">mot de passe perdu ?</a>
111       </td>
112       <td class="right">
113         <input type="submit" name="submitbtn" value="Envoyer" />
114       </td>
115       </tr></table>
116       </td>
117     </tr>
118   </table>
119   <p>     
120     Problème de connexion ? <a href="Xorg/FAQ?display=light#connect" class="popup2">La réponse est là.</a>
121   </p>
122 </form>
123
124 <div id="nologin" style="background: #fcc; color: red">
125   Pour assurer la confidentialité de ton mot de passe, il est chiffré sur ta machine
126   avant de nous être transmis. Pour cela, il faut
127   <a href="Xorg/FAQ?display=light#connect" class="popup2">activer javascript</a>
128   dans ton navigateur, ce qui n'est actuellement pas le cas.
129   <div class="center" style="margin-top: 1ex">
130     <strong>Active le javascript et recharge cette page pour pouvoir te connecter.</strong>
131   </div>
132 </div>
133
134 <script type="text/javascript">
135   document.getElementById('login').style.display="";
136   document.getElementById('nologin').style.display="none";
137 </script>
138
139 <hr />
140
141 <div class="smaller">
142   {if $smarty.server.HTTPS}
143   {icon name=lock} Tu utilises actuellement une connexion HTTPS sécurisée. Aucune information ne circule
144   en clair entre chez toi et Polytechnique.org, ce qui assure une confidentialité maximale.
145   {else}
146   {icon name=lock_open} Tu utilises actuellement une connexion HTTP non sécurisée. Toutes les informations
147   (<strong>excepté le mot de passe de connexion au site</strong>) circulent en clair entre chez toi et 
148   Polytechnique.org. Tu peux basculer sur une connexion sécurisée en cliquant sur le lien
149   <div class="center">
150   <a href="{$globals->baseurl|replace:"http":"https"}/{$platal->pl_self()}">
151     {icon name=lock_add} Passer en connexion sécurisée</a>
152   </div><br />
153   Plus d'informations sur la connexion sécurisée se trouvent
154   <a href="Xorg/CertificatDeSécurité?display=light" class="popup2">sur cette page</a>.
155   {/if}
156 </div>
157
158 {if $smarty.request.response}<!-- failed login code //-->
159 <br />
160 <div class="erreur">
161   Erreur d'identification. Essaie à nouveau !
162 </div>
163 {/if}
164
165 <!-- Set up the form with the challenge value and an empty reply value //-->
166 <form action="{$smarty.server.REQUEST_URI}" method="post" id="loginsub">
167   <div>
168     <input type="hidden" name="challenge" value="{$smarty.session.challenge}" />
169     <input type="hidden" name="response"  value="" />
170     <input type="hidden" name="xorpass"  value="" />
171     <input type="hidden" name="username"  value="" />
172     <input type="hidden" name="remember"  value="" />
173     <input type="hidden" name="domain"    value="" />
174   </div>
175 </form>
176
177 {literal}
178 <script type="text/javascript">
179   <!--
180   // Activate the appropriate input form field.
181   if (document.forms.login.username.value == '') {
182     document.forms.login.username.focus();
183   } else {
184     document.forms.login.password.focus();
185   }
186   // -->
187 </script>
188 {/literal}
189
190 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}