1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-14 01:22:13 +02:00

Merge pull request #2690 from arunshekher/bs3_login_menu_duplicate_id_fix

[html] - Fix 'Duplicate ID' html validation error when Bootstrap3 theme user-login-dropdown menu and login_menu rendered together on a page.
This commit is contained in:
Cameron 2017-06-20 12:12:42 -07:00 committed by GitHub
commit e3684b25e2
2 changed files with 6 additions and 6 deletions

View File

@ -85,7 +85,7 @@ e107::getLanguage()->bcDefs($bcDefs);
// If logging in with email address - ignore pref and increase to 100 chars.
$maxLength = ($this->allowEmailLogin == 1 || $this->allowEmailLogin) ? 100 : varset($pref['loginname_maxlength'],30);
return "<input class='form-control tbox login user' type='text' name='username' placeholder='".$this->usernameLabel."' required='required' id='username' size='15' value='' maxlength='".$maxLength."' />\n";
return "<input class='form-control tbox login user' type='text' name='username' placeholder='".$this->usernameLabel."' required='required' id='".vartrue( $parm['idprefix'] )."username' size='15' value='' maxlength='".$maxLength."' />\n";
}
@ -98,7 +98,7 @@ e107::getLanguage()->bcDefs($bcDefs);
function sc_lm_password_input($parm='')
{
$pref = e107::getPref();
$t_password = "<input class='form-control tbox login pass' type='password' placeholder='".LAN_PASSWORD."' required='required' name='userpass' id='userpass' size='15' value='' maxlength='30' />\n";
$t_password = "<input class='form-control tbox login pass' type='password' placeholder='".LAN_PASSWORD."' required='required' name='userpass' id='".vartrue( $parm['idprefix'] )."userpass' size='15' value='' maxlength='30' />\n";
if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0)) $t_password .= "<input type='hidden' name='hashchallenge' id='hashchallenge' value='".e107::getSession()->get('challenge')."' />\n\n";
return $t_password;
}

View File

@ -137,8 +137,8 @@ class theme_shortcodes extends e_shortcode
$text .='
<form method="post" onsubmit="hashLoginPassword(this);return true" action="'.e_REQUEST_HTTP.'" accept-charset="UTF-8">
<p>{LM_USERNAME_INPUT}</p>
<p>{LM_PASSWORD_INPUT}</p>
<p>{LM_USERNAME_INPUT: idprefix=bs3-}</p>
<p>{LM_PASSWORD_INPUT: idprefix=bs3-}</p>
<div class="form-group"></div>
@ -147,10 +147,10 @@ class theme_shortcodes extends e_shortcode
<div class="checkbox">
<label class="string optional" for="autologin"><input style="margin-right: 10px;" type="checkbox" name="autologin" id="autologin" value="1">
<label class="string optional" for="bs3-autologin"><input style="margin-right: 10px;" type="checkbox" name="autologin" id="bs3-autologin" value="1">
'.LAN_LOGINMENU_6.'</label>
</div>
<input class="btn btn-primary btn-block" type="submit" name="userlogin" id="userlogin" value="'.LAN_LOGINMENU_51.'">
<input class="btn btn-primary btn-block" type="submit" name="userlogin" id="bs3-userlogin" value="'.LAN_LOGINMENU_51.'">
';
$text .= '