{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template core/loginform Moodle template for the login page. Example context (json): { "autofocusform": false, "canloginasguest": true, "canloginbyemail": true, "cansignup": true, "error": "testerror", "errorformatted": "Test error formatted", "forgotpasswordurl": "http://example.com/login/forgot_password.php", "hasidentityproviders": false, "hasinstructions": true, "instructions": "For full access to this site, you first need to create an account.", "loginurl": "http://example.com/stable_master/login/index.php", "rememberusername": true, "signupurl": "http://localhost/stable_master/login/signup.php", "cookieshelpiconformatted": "", "username": "", "logintoken": "randomstring" } }} {{#hasinstructions}}
{{/hasinstructions}} {{^hasinstructions}}
{{/hasinstructions}}
{{#cansignup}} {{/cansignup}} {{#canloginasguest}}
{{#str}} someallowguest {{/str}}
{{/canloginasguest}}
{{#hasinstructions}}

{{#str}} firsttime {{/str}}

{{{instructions}}} {{#cansignup}}
{{/cansignup}}
{{/hasinstructions}} {{#hasidentityproviders}}
{{#str}} potentialidps, auth {{/str}}
{{#identityproviders}} {{/identityproviders}}
{{/hasidentityproviders}}
{{#js}} {{#error}} require(['jquery'], function($) { $('#loginerrormessage').focus(); }); {{/error}} {{^error}} {{#autofocusform}} require(['jquery'], function($) { if ($('#username').val()) { $('#password').focus(); } else { $('#username').focus(); } }); {{/autofocusform}} {{/error}} {{/js}}