From 6c4aba1e7e67aa652fcb55ebc0887357dd14c673 Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Wed, 23 Nov 2016 16:06:58 +0530 Subject: [PATCH] MDL-57122 boost: Add context docs to login template --- theme/boost/templates/core/login.mustache | 73 +++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/theme/boost/templates/core/login.mustache b/theme/boost/templates/core/login.mustache index eb50c468c0a..8f3a2173b07 100644 --- a/theme/boost/templates/core/login.mustache +++ b/theme/boost/templates/core/login.mustache @@ -18,6 +18,79 @@ @template core/login Moodle template for the login page. + + Context variables required for this template: + * autofocusform: Auto focus on form ?, + * canloginasguest - Is guest login allowed?, + * canloginbyemail - Is login by email allowed?, + * cansignup - Signup allowed?, + * cookieshelpicon - cookies help icon details + * error - Any errors in the form?, + * forgotpasswordurl - Forgot password url, + * hasidentityproviders - Flag, set to true to hide identity providers, + * hasinstructions - Flag, set to true to show instructions, + * identityproviders - List of identiy providers, + * instructions - Instructions, + * instructionsformat - Format of instructions, + * loginurl - Login url, + * rememberusername - Remeber username?, + * passwordautocomplete - Allow password autocomplete?, + * signupurl - Signup url, + * cookieshelpiconformatted - Formatted html of cookies help icon, + * errorformatted - Formatted error, + * logourl - Flag, logo url, + * sitename - Name of site. + + Example context (json): + { + "autofocusform": false, + "canloginasguest": "1", + "canloginbyemail": false, + "cansignup": true, + "cookieshelpicon": { + "heading": "Cookies must be enabled in your browser", + "text": "
Two cookies are used on this site. Both died..
", + "icon": { + "attributes": [ + { + "name": "class", + "value": "iconhelp" + }, + { + "name": "alt", + "value": "Help with Cookies must be enabled in your browser" + }, + { + "name": "title", + "value": "Help with Cookies must be enabled in your browser" + }, + { + "name": "src", + "value": "http://localhost/stable_master/theme/image.php?theme=boost&component=core&image=help" + } + ] + }, + "linktext": null, + "title": "Help with Cookies must be enabled in your browser", + "url": "http://localhost/stable_master/help.php?component=core&identifier=cookiesenabled&lang=en", + "ltr": true + }, + "error": "", + "forgotpasswordurl": "http://localhost/stable_master/login/forgot_password.php", + "hasidentityproviders": false, + "hasinstructions": true, + "identityproviders": [], + "instructions": "For full access to this site, you first need to create an account.", + "instructionsformat": "1", + "loginurl": "http://localhost/stable_master/login/index.php", + "rememberusername": true, + "passwordautocomplete": false, + "signupurl": "http://localhost/stable_master/login/signup.php", + "cookieshelpiconformatted": "", + "errorformatted": "", + "logourl": false, + "sitename": "Beer & Chips" + } }}