MDL-55074 theme_boost: Navigation and blocks
[moodle.git] / theme / boost / templates / core / login.mustache
CommitLineData
386f269f
FM
1{{!
2 This file is part of Moodle - http://moodle.org/
3
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16}}
17{{!
18 @template core/login
19
20 Moodle template for the login page.
21}}
22
99061152 23<div class="m-y-3 hidden-sm-down"></div>
386f269f 24<div class="row">
99061152
DW
25<div class="col-xl-6 push-xl-3 m-2-md col-sm-8 push-sm-2">
26<div class="card">
27 {{#logourl}}
28 <img class="card-img-top" src="{{logourl}}" alt="" role="presentation"/>
29 {{/logourl}}
30 <div class="card-block">
31 <div class="card-title">
32 <h2 class="m-t-1">{{sitename}}</h2>
33 </div>
34
35 {{#cansignup}}
36 <div class="sr-only">
37 <a href="{{signupurl}}">{{#str}} tocreatenewaccount {{/str}}</a>
38 </div>
39 {{/cansignup}}
386f269f 40
99061152
DW
41 {{#error}}
42 <div class="loginerrors m-t-1">
43 <a href="#" id="loginerrormessage" class="accesshide">{{error}}</a>
44 <div class="alert alert-danger" role="alert">{{error}}</div>
45 </div>
46 {{/error}}
47
48 <div class="row">
49 <div class="col-md-4 push-md-1">
386f269f
FM
50 <form class="m-t-1" action="{{loginurl}}" method="post" id="login" {{^passwordautocomplete}}autocomplete="off"{{/passwordautocomplete}}>
51 <input id="anchor" type="hidden" name="anchor" value="">
52 <script>document.getElementById('anchor').value = location.hash;</script>
53
54 <label for="username" class="sr-only">
55 {{^canloginbyemail}}
56 {{#str}} username {{/str}}
57 {{/canloginbyemail}}
58 {{#canloginbyemail}}
59 {{#str}} usernameemail {{/str}}
60 {{/canloginbyemail}}
61 </label>
62 <input type="text" name="username" id="username"
63 class="form-control"
64 value="{{username}}"
65 placeholder={{#quote}}{{^canloginbyemail}}{{#str}}username{{/str}}{{/canloginbyemail}}{{#canloginbyemail}}{{#str}}usernameemail{{/str}}{{/canloginbyemail}}{{/quote}}>
66 <label for="password" class="sr-only">{{#str}} password {{/str}}</label>
67 <input type="password" name="password" id="password" value=""
68 class="form-control"
69 placeholder={{#quote}}{{#str}}password{{/str}}{{/quote}}
70 {{^passwordautocomplete}}autocomplete="off"{{/passwordautocomplete}}>
71
72 {{#rememberusername}}
73 <div class="rememberpass m-t-1">
74 <input type="checkbox" name="rememberusername" id="rememberusername" value="1" {{#username}}checked="checked"{{/username}} />
75 <label for="rememberusername">{{#str}} rememberusername, admin {{/str}}</label>
76 </div>
77 {{/rememberusername}}
78
79 <button type="submit" class="btn btn-primary btn-block m-t-1" id="loginbtn">{{#str}}login{{/str}}</button>
386f269f 80 </form>
99061152 81 </div>
75d6a7d3 82
99061152
DW
83 <div class="col-md-4 push-md-3">
84 <div class="forgetpass m-t-1">
85 <p><a href="{{forgotpasswordurl}}">{{#str}}forgotten{{/str}}</a></p>
86 </div>
386f269f 87
99061152
DW
88 <div class="m-t-1">
89 {{#str}} cookiesenabled {{/str}}
90 {{{cookieshelpiconformatted}}}
91 </div>
92 {{#canloginasguest}}
93 <div class="m-t-2">
94 <p>{{#str}}someallowguest{{/str}}</p>
95 <form action="{{loginurl}}" method="post" id="guestlogin">
96 <input type="hidden" name="username" value="guest" />
97 <input type="hidden" name="password" value="guest" />
98 <button class="btn btn-secondary btn-block" type="submit">{{#str}}loginguest{{/str}}</button>
99 </form>
100 </div>
101 {{/canloginasguest}}
102
103 {{#hasidentityproviders}}
104 <h6 class="m-t-2">{{#str}} potentialidps, auth {{/str}}</h6>
105 <div class="potentialidplist" class="m-t-1">
106 {{#identityproviders}}
107 <div class="potentialidp">
108 <a href="{{url}}" title={{#quote}}{{name}}{{/quote}}>{{#icon}}{{>core/pix_icon}}{{/icon}}{{name}}</a>
109 </div>
110 {{/identityproviders}}
111 </div>
112 {{/hasidentityproviders}}
386f269f 113 </div>
99061152
DW
114 </div>
115 </div>
116</div>
117</div>
118</div>
386f269f 119
386f269f 120
99061152
DW
121{{#hasinstructions}}
122<div class="row">
123<div class="col-xl-6 push-xl-3 m-2-md col-sm-8 push-sm-2">
124<div class="card">
125 <div class="card-block">
126 <div class="card-title">
127 <h2>{{#str}}firsttime{{/str}}</h2>
128 </div>
129 <div>
130 {{{instructions}}}
131 {{#cansignup}}
132 <form class="m-t-1" action="{{signupurl}}" method="get" id="signup">
133 <button type="submit" class="btn btn-secondary">{{#str}}startsignup{{/str}}</button>
134 </form>
135 {{/cansignup}}
386f269f
FM
136 </div>
137 </div>
138</div>
139</div>
99061152
DW
140</div>
141{{/hasinstructions}}
142
386f269f
FM
143
144{{#js}}
145 require(['jquery', 'core/yui'], function($, Y) {
146 {{#error}}
147 $(function() {
148 M.util.focus_login_error(Y);
149 });
150 {{/error}}
151 {{^error}}
152 {{#autofocusform}}
153 $(function() {
154 M.util.focus_login_form(Y);
155 });
156 {{/autofocusform}}
157 {{/error}}
158 })
159{{/js}}