mirror of
https://github.com/e107inc/e107.git
synced 2025-08-26 15:54:43 +02:00
Bootstrap front-end template. Login page added.
This commit is contained in:
@@ -36,13 +36,19 @@ class login_shortcodes extends e_shortcode
|
||||
|
||||
function sc_login_table_username($parm='') //FIXME use $frm
|
||||
{
|
||||
return "<input class='tbox' type='text' name='username' id='username' size='40' maxlength='100' />";
|
||||
$pref = e107::getPref();
|
||||
$allowEmailLogin = varset($pref['allowEmailLogin'],0);
|
||||
$ulabel = array(LAN_LOGIN_1,LAN_LOGIN_28,LAN_LOGIN_29);
|
||||
$placeholder = $ulabel[$allowEmailLogin];
|
||||
|
||||
|
||||
return "<input class='tbox input-block-level' type='text' name='username' id='username' size='40' maxlength='100' placeholder=\"".$placeholder."\" />";
|
||||
}
|
||||
|
||||
function sc_login_table_password($parm='') //FIXME use $frm
|
||||
{
|
||||
$pref = e107::getPref();
|
||||
$text = "<input class='tbox' type='password' name='userpass' id='userpass' size='40' maxlength='100' />";
|
||||
$text = "<input class='tbox input-block-level' type='password' name='userpass' id='userpass' size='40' maxlength='100' placeholder=\"".LAN_LOGIN_2."\" />";
|
||||
|
||||
if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0))
|
||||
{
|
||||
@@ -92,7 +98,9 @@ class login_shortcodes extends e_shortcode
|
||||
|
||||
function sc_login_table_submit($parm="") //FIXME use $frm
|
||||
{
|
||||
return "<input class='btn btn-primary button' type='submit' name='userlogin' value=\"".LAN_LOGIN_9."\" />";
|
||||
|
||||
$class = ($parm == 'large') ? "btn-large" : "";
|
||||
return "<input class='btn btn-primary ".$class." button' type='submit' name='userlogin' value=\"".LAN_LOGIN_9."\" />";
|
||||
}
|
||||
|
||||
|
||||
|
@@ -54,7 +54,7 @@ if(!isset($LOGIN_TABLE))
|
||||
</td>\n</tr>\n";
|
||||
|
||||
|
||||
if(LOGIN_CAPTCHA)
|
||||
if(LOGIN_CAPTCHA) //FIXME - add shortcode for this.
|
||||
{
|
||||
$LOGIN_TABLE .= "<tr><td class='forumheader3'>{LOGIN_TABLE_SECIMG_LAN}</td>\n<td class='forumheader3'>{LOGIN_TABLE_SECIMG_HIDDEN} {LOGIN_TABLE_SECIMG_SECIMG} {LOGIN_TABLE_SECIMG_TEXTBOC}</td>\n</tr>\n";
|
||||
}
|
||||
@@ -82,22 +82,34 @@ if(!isset($LOGIN_TABLE_FOOTER))
|
||||
|
||||
|
||||
// Starter for v2. - Bootstrap
|
||||
$LOGIN_TEMPLATE['page']['header'] = "
|
||||
<div>
|
||||
<div class='center' style='padding:50px; margin-left:auto; margin-right: auto'>
|
||||
{LOGO=login}
|
||||
</div>";
|
||||
|
||||
$LOGIN_TEMPLATE['xxxxx'] = '
|
||||
$LOGIN_TEMPLATE['page']['body'] = '
|
||||
|
||||
<h2 class="form-signin-heading">Please sign in</h2>
|
||||
<input type="text" class="input-block-level" placeholder="Email address">
|
||||
<input type="password" class="input-block-level" placeholder="Password">
|
||||
<h2 class="form-signin-heading">'.LAN_LOGIN_4.'</h2>
|
||||
{LOGIN_TABLE_USERNAME}
|
||||
{LOGIN_TABLE_PASSWORD}
|
||||
{LOGIN_TABLE_SECIMG_SECIMG} {LOGIN_TABLE_SECIMG_TEXTBOC}
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" value="remember-me"> Remember me
|
||||
{LOGIN_TABLE_AUTOLOGIN} {LOGIN_TABLE_AUTOLOGIN_LAN}
|
||||
</label>
|
||||
<button class="btn btn-large btn-primary" type="submit">Sign in</button>
|
||||
{LOGIN_TABLE_SUBMIT=large}
|
||||
|
||||
';
|
||||
|
||||
|
||||
|
||||
|
||||
$LOGIN_TEMPLATE['page']['footer'] = "
|
||||
<div style='margin-bottom:100px; width:70%;margin-right:auto;margin-left:auto'>
|
||||
<div style='text-align:center'><br />
|
||||
{LOGIN_TABLE_FOOTER_USERREG}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user