Dotclear

source: inc/admin/default-templates/auth.html.twig @ 1059:822b9d78f9cd

Revision 1059:822b9d78f9cd, 3.1 KB checked in by JcDenis, 13 years ago (diff)
  • First draft for the use of Twig on authentication pages
Line 
1{% import "js_helpers.html.twig" as js %}
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $dlang; ?>" lang="en">
4<head>
5  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6  <meta http-equiv="Content-Script-Type" content="text/javascript" />
7  <meta http-equiv="Content-Style-Type" content="text/css" />
8  <meta http-equiv="Content-Language" content="en" />
9  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />
10  <meta name="GOOGLEBOT" content="NOSNIPPET" />
11  <title>{{vendor_name}}</title>
12  <link rel="stylesheet" href="{{theme_url}}style/default.css" type="text/css" media="screen" />
13  {{ js.load_IE7 }}
14  {{ js.common }}
15  <script type="text/javascript" src="{{theme_url}}js/_auth.js"></script>
16</head>
17
18<body id="dotclear-admin" class="auth">
19
20{% form auth %}
21<div id="login-screen">
22<h1>{{vendor_name}}</h1>
23{% if page_message is not empty %}
24     <p class="message">{{page_message}}</p>
25{% endif %}
26{% if page_errors is not empty %}
27     <div class="error">
28          <p><strong>Errors :</strong></p>
29          <ul>
30          {% for error in page_errors %}
31               <li>{{error}}</li>
32          {% endfor %}
33          </ul>
34     </div>
35{% endif %}
36{% if akey %}
37     <p><a href="auth.php">{{__('Back to login screen')}}</a></p>
38{% elseif recover %}
39     <fieldset><legend>{{__('Request a new password')}}</legend>
40     <p>{{ form_field('user_id') }}</p>
41     <p>{{ form_field('user_email') }}</p>
42     <p>{{ form_field('auth_recover')}}</p>
43     </fieldset>
44     <div id="issue">
45     <p><a href="auth.php">{{__('Back to login screen')}}</a></p></div>
46{% elseif change_pwd %}
47     <fieldset><legend>{{__('Change your password')}}</legend>
48     <p>{{ form_field('new_pwd') }}</p>
49     <p>{{ form_field('new_pwd_c') }}</p>
50     </fieldset>
51     <p>{{ form_field('auth_change') }}</p>
52{% else %}
53     {% if safe_mode %}
54          <fieldset>
55          <legend>{{__('Safe mode login')}}</legend>
56          <p class="form-note info">
57          {{__('This mode allows you to login without activating any of your plugins. This may be useful to solve compatibility problems')}}&nbsp;<br />
58          {{__('Disable or delete any plugin suspected to cause trouble, then log out and log back in normally.')}}
59          </p>
60     {% else %}
61          <div class="fieldset">
62     {% endif %}
63               <p>{{ form_field('user_id') }}</p>
64               <p>{{ form_field('user_pwd') }}</p>
65               <p>{{ form_field('user_remenber') }}</p>
66               <p>{{ form_field('auth_login')}}</p>
67     {% if safe_mode %}
68          </fieldset>
69     {% else %}
70          </div>
71     {% endif %}
72          <p id="cookie_help" class="error">{{__('You must accept cookies in order to use the private area.')}}</p>
73          <div id="issue">
74     {% if safe_mode %}
75          <p><a href="auth.php" id="normal_mode_link">{{__('Get back to normal authentication')}}</a></p>
76     {% else %}
77          <p id="more"><strong>{{__('Connection issue?')}}</strong></p>
78          {% if allow_pass_change %}
79               <p><a href="auth.php?recover=1">{{__('I forgot my password')}}</a></p>
80          {% endif %}
81          <p><a href="auth.php?safe_mode=1" id="safe_mode_link">{{__('I want to log in in safe mode')}}</a></p>
82     {% endif %}
83          </div>
84{% endif %}
85</div>
86{% endform %}
87</body>
88</html>
Note: See TracBrowser for help on using the repository browser.

Sites map