From d0eea0b03c68ea5a64ebf4d8dfaac6381a53fbc4 Mon Sep 17 00:00:00 2001 From: Nate Wright Date: Mon, 12 Feb 2018 17:56:00 +0000 Subject: [PATCH] Fix #6, #7 Login form is missing URL and password field is wrong type --- HealthSciencesThemePlugin.inc.php | 10 ++++++++++ templates/frontend/components/loginForm.tpl | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/HealthSciencesThemePlugin.inc.php b/HealthSciencesThemePlugin.inc.php index 9dd2dda..28daf0d 100644 --- a/HealthSciencesThemePlugin.inc.php +++ b/HealthSciencesThemePlugin.inc.php @@ -121,13 +121,23 @@ public function loadTemplateData($hookName, $args) { $context = $request->getContext(); if (!defined('SESSION_DISABLE_INIT')) { + + // Get possible locales if ($context) { $locales = $context->getSupportedLocaleNames(); } else { $locales = $request->getSite()->getSupportedLocaleNames(); } + + // Load login form + $loginUrl = $request->url(null, 'login', 'signIn'); + if (Config::getVar('security', 'force_login_ssl')) { + $loginUrl = PKPString::regexp_replace('/^http:/', 'https:', $loginUrl); + } + $templateMgr->assign(array( 'languageToggleLocales' => $locales, + 'loginUrl' => $loginUrl, 'brandImage' => 'templates/images/ojs_brand_white.png', )); } diff --git a/templates/frontend/components/loginForm.tpl b/templates/frontend/components/loginForm.tpl index cbf136f..8370882 100644 --- a/templates/frontend/components/loginForm.tpl +++ b/templates/frontend/components/loginForm.tpl @@ -37,7 +37,7 @@ {translate key="common.required"} - +