diff --git a/CHANGES.md b/CHANGES.md index f08b5a94eb9718a5e7474aad4f988d87f18e5a0c..1598fe1917af298468194dd174c0c9ca6f2d7a1b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2019-10-28 - Adjusted loginform.mustache template due to upstream changes in Moodle core. * 2019-10-28 - Adjusted function favicon() in core_renderer.php due to upstream changes in Moodle core. * 2019-10-28 - Removed CSS rule for maintenance warning due to upstream changes. diff --git a/templates/loginform.mustache b/templates/loginform.mustache index a387d5a8ec0c14fa29bca724aface1ecaa751f51..552c0f03f05dce7cca9bb46f9a42d7a6d91659f3 100644 --- a/templates/loginform.mustache +++ b/templates/loginform.mustache @@ -38,8 +38,9 @@ * cookieshelpiconformatted - Formatted html of cookies help icon, * errorformatted - Formatted error, * logourl - Flag, logo url, - * sitename - Name of site. - * logintoken - Random token to protect login request. + * sitename - Name of site., + * logintoken - Random token to protect login request., + * maintenance - Maintenance message Example context (json): { @@ -89,7 +90,8 @@ "errorformatted": "", "logourl": false, "sitename": "Beer & Chips", - "logintoken": "randomstring" + "logintoken": "randomstring", + "maintenance": "For full access to this site, you need to login in as an admin." } }} {{! MODIFICATION: @@ -228,6 +230,22 @@ </div> {{/hasinstructions}} +{{#maintenance}} + <div class="row justify-content-center mt-3"> + <div class="col-xl-6 col-sm-8"> + <div class="card"> + <div class="card-body"> + <div class="card-title"> + <h2>{{#str}}sitemaintenance, core_admin{{/str}}</h2> + </div> + <div> + {{{maintenance}}} + </div> + </div> + </div> + </div> + </div> +{{/maintenance}} {{#js}} {{#error}} require(['jquery'], function($) { diff --git a/templates/loginform.mustache.original b/templates/loginform.mustache.original index 5f8066697da4dd1734a5fa49470873a5e690dc05..27b8ec5bdfcd1f3227dc6d399b680be246e39712 100644 --- a/templates/loginform.mustache.original +++ b/templates/loginform.mustache.original @@ -38,8 +38,9 @@ * cookieshelpiconformatted - Formatted html of cookies help icon, * errorformatted - Formatted error, * logourl - Flag, logo url, - * sitename - Name of site. - * logintoken - Random token to protect login request. + * sitename - Name of site., + * logintoken - Random token to protect login request., + * maintenance - Maintenance message Example context (json): { @@ -89,7 +90,8 @@ "errorformatted": "", "logourl": false, "sitename": "Beer & Chips", - "logintoken": "randomstring" + "logintoken": "randomstring", + "maintenance": "For full access to this site, you need to login in as an admin." } }} @@ -224,6 +226,22 @@ </div> {{/hasinstructions}} +{{#maintenance}} + <div class="row justify-content-center mt-3"> + <div class="col-xl-6 col-sm-8"> + <div class="card"> + <div class="card-body"> + <div class="card-title"> + <h2>{{#str}}sitemaintenance, core_admin{{/str}}</h2> + </div> + <div> + {{{maintenance}}} + </div> + </div> + </div> + </div> + </div> +{{/maintenance}} {{#js}} {{#error}} require(['jquery'], function($) {