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