Happy New Year!
[platal.git] / templates / core / password_prompt.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 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 t($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ée
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
39 <form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;" style="display: none">
40   <table class="bicol" cellpadding="4" summary="Formulaire de login">
41     <tr>
42       <th colspan="2">{if $smarty.server.HTTPS}{icon name=lock}{/if} Identification
43       {if !$smarty.server.HTTPS && #globals.core.secure_domain#}
44       (<a href="https://{#globals.core.secure_domain#}{$smarty.server.REQUEST_URI}">{icon name=lock_add} Passer en connexion sécurisée</a>)
45       {/if}
46       </th>
47     </tr>
48     <tr style="white-space: nowrap">
49       <td class="titre">
50         Identifiant&nbsp;:
51       </td>
52       <td>
53         <input type="text" name="username" size="20" maxlength="50" value="{insert name="getUserName"}" />
54         <select name="domain">
55           <option value="login">@ {#globals.mail.domain#} / {#globals.mail.domain2#}</option>
56           <option value="alias" {if t($smarty.cookies.ORGdomain) eq "alias"}selected="selected"{/if}>
57             @ {#globals.mail.alias_dom#} / {#globals.mail.alias_dom2#}
58           </option>
59           <option value="ax" {if t($smarty.cookies.ORGdomain) eq "ax"}selected="selected"{/if}>
60             Identifiant
61           </option>
62         </select>
63       </td>
64     </tr>
65     <tr>
66       <td class="titre">
67         Mot de passe&nbsp;:
68       </td>
69       <td>
70         <input type="password" name="password" size="10" maxlength="256" />
71       </td>
72     </tr>
73     <tr>
74       <td></td>
75       <td>
76         <script type="text/javascript">{literal}
77           function confirm_remember(input) {
78             if (input.checked && !confirm('Cocher cette case te permet d\'être automatiquement reconnu à ta prochaine connexion depuis cet ordinateur. '
79             + 'Il n\'est pas conseillé de cocher la case si cette machine n\'est pas strictement personnelle.\n\nVeux-tu vraiment cocher cette case ?')) {
80               input.checked = false;
81               return false;
82             }
83             return true;
84           }
85         {/literal}</script>
86         <input type="checkbox" name="remember" id="remember" onchange="return confirm_remember(this);" /><label for="remember">Garder l'accès aux services après déconnexion.</label>
87       </td>
88     </tr>
89     <tr>
90       <td colspan="2">
91       <table width="100%"><tr>
92       <td>
93         <a href="recovery">Mot de passe perdu&nbsp;?</a>
94       </td>
95       <td class="right">
96         <input type="submit" name="submitbtn" value="Me connecter" />
97       </td>
98       </tr></table>
99       </td>
100     </tr>
101   </table>
102 </form>
103
104 {if !$smarty.session.auth}
105 <p>
106 <strong>Tu ne connais pas ton mot de passe&nbsp;?</strong>
107 </p>
108   Si tu n'es jamais venu sur le site, <strong>il faut t'enregistrer auprès de
109     nous</strong> pour obtenir un accès. {#globals.core.sitename#} c'est l'email des X,
110   l'annuaire en ligne, plus un tas d'autres services.  Nous te fournirons un accès le plus
111   rapidement possible. <strong> <a href="register/">Clique ici pour nous demander tes
112       paramètres personnels.</a></strong>
113 {/if}
114
115 <div id="nologin" style="background: #fcc; color: red">
116   Pour assurer la confidentialité de ton mot de passe, il est chiffré sur ta machine
117   avant de nous être transmis. Pour cela, il faut
118   <a href="Xorg/FAQ?display=light#connect" class="popup2">activer javascript</a>
119   dans ton navigateur, ce qui n'est actuellement pas le cas.
120   <div class="center" style="margin-top: 1ex">
121     <strong>Active le javascript et recharge cette page pour pouvoir te connecter.</strong>
122   </div>
123 </div>
124
125 <p>
126   <strong>Problème de connexion&nbsp;?</strong> <a href="Xorg/FAQ?display=light#connect" class="popup2">La réponse est là.</a>
127 </p>
128
129 <script type="text/javascript">
130   document.getElementById('login').style.display="";
131   document.getElementById('nologin').style.display="none";
132 </script>
133
134 <hr />
135
136 <div class="smaller">
137   {if $smarty.server.HTTPS}
138   {icon name=lock} Tu utilises actuellement une connexion HTTPS sécurisée. Aucune information ne circule
139   en clair entre chez toi et Polytechnique.org, ce qui assure une confidentialité maximale.
140   {else}
141   {icon name=lock_open} Tu utilises actuellement une connexion HTTP non sécurisée. Toutes les informations
142   (<strong>excepté le mot de passe de connexion au site</strong>) circulent en clair entre chez toi et
143   Polytechnique.org. Tu peux basculer sur une connexion sécurisée en cliquant sur le lien
144   <div class="center">
145   <a href="https://{#globals.core.secure_domain#}{$smarty.server.REQUEST_URI}">
146     {icon name=lock_add} Passer en connexion sécurisée</a>
147   </div><br />
148   Plus d'informations sur la connexion sécurisée se trouvent
149   <a href="Xorg/CertificatDeSécurité?display=light" class="popup2">sur cette page</a>.
150   {/if}
151 </div>
152
153 <!-- Set up the form with the challenge value and an empty reply value //-->
154 <form action="{$smarty.server.REQUEST_URI}" method="post" id="loginsub">
155   <div>
156     {xsrf_token_field}
157     <input type="hidden" name="challenge" value="{$smarty.session.challenge}" />
158     <input type="hidden" name="response"  value="" />
159     <input type="hidden" name="xorpass"   value="" />
160     <input type="hidden" name="username"  value="" />
161     <input type="hidden" name="remember"  value="" />
162     <input type="hidden" name="domain"    value="" />
163   </div>
164 </form>
165
166 {literal}
167 <script type="text/javascript">
168   <!--
169   // Activate the appropriate input form field.
170   if (document.forms.login.username.value == '') {
171     document.forms.login.username.focus();
172   } else {
173     document.forms.login.password.focus();
174   }
175   // -->
176 </script>
177 {/literal}
178
179 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}