Skip to content

Commit

Permalink
Fix #6, #7 Login form is missing URL and password field is wrong type
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWr committed Feb 12, 2018
1 parent da573a8 commit d0eea0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions HealthSciencesThemePlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
));
}
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/components/loginForm.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{translate key="common.required"}
</span>
</label>
<input type="text" class="form-control" name="password" id="password" value="{$password|escape}" maxlength="32" required>
<input type="password" class="form-control" name="password" id="password" value="{$password|escape}" maxlength="32" required>
</div>
<div class="row">
<div class="col-md-6">
Expand Down

0 comments on commit d0eea0b

Please sign in to comment.