From 92a1ea687001f145a53dd8f79c187eac14e60da6 Mon Sep 17 00:00:00 2001 From: Alexander Bias Date: Wed, 17 May 2017 20:58:46 +0200 Subject: [PATCH 1/2] MDL-58970 themes: Rename login.mustache to loginform.mustache --- lib/templates/{login.mustache => loginform.mustache} | 0 theme/boost/templates/core/{login.mustache => loginform.mustache} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename lib/templates/{login.mustache => loginform.mustache} (100%) rename theme/boost/templates/core/{login.mustache => loginform.mustache} (100%) diff --git a/lib/templates/login.mustache b/lib/templates/loginform.mustache similarity index 100% rename from lib/templates/login.mustache rename to lib/templates/loginform.mustache diff --git a/theme/boost/templates/core/login.mustache b/theme/boost/templates/core/loginform.mustache similarity index 100% rename from theme/boost/templates/core/login.mustache rename to theme/boost/templates/core/loginform.mustache From 79675c05d04b5ac295081e4d76fee3af49f97d1c Mon Sep 17 00:00:00 2001 From: Alexander Bias Date: Wed, 17 May 2017 21:01:09 +0200 Subject: [PATCH 2/2] MDL-58970 themes: Fix references to core/loginform template --- lib/outputrenderers.php | 2 +- lib/templates/loginform.mustache | 2 +- theme/boost/classes/output/core_renderer.php | 2 +- theme/boost/templates/core/loginform.mustache | 2 +- theme/upgrade.txt | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 7406646d05b..0aae68d5ccb 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -4294,7 +4294,7 @@ EOD; $context->cookieshelpiconformatted = $this->help_icon('cookiesenabled'); $context->errorformatted = $this->error_text($context->error); - return $this->render_from_template('core/login', $context); + return $this->render_from_template('core/loginform', $context); } /** diff --git a/lib/templates/loginform.mustache b/lib/templates/loginform.mustache index a0545c38573..1d65ea1152d 100644 --- a/lib/templates/loginform.mustache +++ b/lib/templates/loginform.mustache @@ -15,7 +15,7 @@ along with Moodle. If not, see . }} {{! - @template core/login + @template core/loginform Moodle template for the login page. diff --git a/theme/boost/classes/output/core_renderer.php b/theme/boost/classes/output/core_renderer.php index 4e5835ef78d..e48bc636b82 100644 --- a/theme/boost/classes/output/core_renderer.php +++ b/theme/boost/classes/output/core_renderer.php @@ -465,7 +465,7 @@ class core_renderer extends \core_renderer { $context->logourl = $url; $context->sitename = format_string($SITE->fullname, true, ['context' => context_course::instance(SITEID), "escape" => false]); - return $this->render_from_template('core/login', $context); + return $this->render_from_template('core/loginform', $context); } /** diff --git a/theme/boost/templates/core/loginform.mustache b/theme/boost/templates/core/loginform.mustache index 90fb24c96c5..65d21395962 100644 --- a/theme/boost/templates/core/loginform.mustache +++ b/theme/boost/templates/core/loginform.mustache @@ -15,7 +15,7 @@ along with Moodle. If not, see . }} {{! - @template core/login + @template core/loginform Moodle template for the login page. diff --git a/theme/upgrade.txt b/theme/upgrade.txt index 06a1e92379a..af4ff6619ff 100644 --- a/theme/upgrade.txt +++ b/theme/upgrade.txt @@ -7,6 +7,10 @@ information provided here is intended especially for theme designer. setup for this module have been moved from core standard_head_html to the bootstrapbase renderer. If your theme needs this javascript you will need to ensure the bootstrap renderer is called, or require the JS yourself +* There was a mustache template login.mustache in /lib/templates/ rendering the login form + and a template with the same name in /theme/boost/templates/ rendering the pagelayout "login". + To prevent misunderstanding when overriding one of these templates in a Boost child theme, + the first one was renamed to loginform.mustache - see MDL-58970. === 3.2 ===