mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 12:41:51 +02:00
Bootstrap3 Forget-password template added.
This commit is contained in:
parent
d66a9f8d54
commit
99ec761bc2
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
if (!defined("USER_WIDTH") && deftrue('BOOTSTRAP')!==true){ define("USER_WIDTH","width:70%"); }
|
||||
if (!defined("USER_WIDTH") && !deftrue('BOOTSTRAP')){ define("USER_WIDTH","width:70%"); }
|
||||
|
||||
// ##### FPW TABLE -----------------------------------------------------------------------------
|
||||
if(!isset($FPW_TABLE))
|
||||
@ -78,4 +78,26 @@ if(!isset($FPW_TABLE_FOOTER))
|
||||
}
|
||||
// ##### ------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
$FPW_TEMPLATE['form'] = '
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8">
|
||||
<p>{FPW_TEXT}</p>
|
||||
<div class="form-group">{FPW_USEREMAIL}</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-4 col-sm-offset-8">
|
||||
{FPW_SUBMIT}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
$FPW_TEMPLATE['header'] = '';
|
||||
$FPW_TEMPLATE['footer'] = '';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@ -50,5 +50,8 @@ define('LAN_FPW20','Email send succeeded');
|
||||
define('LAN_FPW21','User clicked on password reset link');
|
||||
define('LAN_FPW22','');
|
||||
|
||||
define("LAN_FPW_100", "Forgot your password?");
|
||||
define("LAN_FPW_101", "Not to worry. Just enter your email address below and we'll send you an instruction email for recovery.");
|
||||
define("LAN_FPW_102", "Reset Password");
|
||||
|
||||
?>
|
@ -41,7 +41,7 @@ class theme_shortcodes extends e_shortcode
|
||||
<li class="divider-vertical"></li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" href="#" data-toggle="dropdown">Sign In <strong class="caret"></strong></a>
|
||||
<div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">
|
||||
<div class="dropdown-menu col-sm-12" style="min-width:250px; padding: 15px; padding-bottom: 0px;">
|
||||
<form method="post" onsubmit="hashLoginPassword(this);return true" action="'.e_REQUEST_HTTP.'" accept-charset="UTF-8">
|
||||
{LM_USERNAME_INPUT}
|
||||
{LM_PASSWORD_INPUT}
|
||||
@ -56,8 +56,9 @@ class theme_shortcodes extends e_shortcode
|
||||
';
|
||||
|
||||
$text .= '
|
||||
<a href="{LM_FPW_LINK=href}" class="btn btn-small btn-block">'.LOGIN_MENU_L4.'</a>
|
||||
<a href="{LM_RESEND_LINK=href}" class="btn btn-small btn-block">'.LOGIN_MENU_L40.'</a>
|
||||
|
||||
<a href="{LM_FPW_LINK=href}" class="btn btn-default btn-sm btn-block">'.LOGIN_MENU_L4.'</a>
|
||||
<a href="{LM_RESEND_LINK=href}" class="btn btn-default btn-sm btn-block">'.LOGIN_MENU_L40.'</a>
|
||||
';
|
||||
|
||||
|
||||
@ -69,7 +70,7 @@ class theme_shortcodes extends e_shortcode
|
||||
';
|
||||
*/
|
||||
|
||||
$text .= "
|
||||
$text .= "<p></p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
35
fpw.php
35
fpw.php
@ -52,12 +52,16 @@ class fpw_shortcodes extends e_shortcode
|
||||
|
||||
function sc_fpw_useremail($parm='') //TODO Use $frm
|
||||
{
|
||||
return "<input class='tbox' type='text' name='email' size='40' value='' maxlength='100' />";
|
||||
return '<input class="tbox form-control" type="text" name="email" size="40" value="" maxlength="100" placeholder="Email" required="required" type="email">';
|
||||
// return "<input class='tbox' type='text' name='email' size='40' value='' maxlength='100' />";
|
||||
}
|
||||
|
||||
function sc_fpw_submit($parm='') //TODO Use $frm
|
||||
{
|
||||
return "<input class='button btn btn-primary' type='submit' name='pwsubmit' value='".LAN_156."' />";
|
||||
$label = deftrue('LAN_FPW_102', LAN_156);
|
||||
return '<button type="submit" name="pwsubmit" class="button btn btn-primary btn-block reset">'.$label.'</button>';
|
||||
|
||||
// return "<input class='button btn btn-primary btn-block' type='submit' name='pwsubmit' value='".$label."' />";
|
||||
}
|
||||
|
||||
function sc_fpw_captcha_lan($parm='')
|
||||
@ -84,6 +88,12 @@ class fpw_shortcodes extends e_shortcode
|
||||
{
|
||||
// Unused at the moment.
|
||||
}
|
||||
|
||||
function sc_fpw_text($parm='')
|
||||
{
|
||||
return deftrue('LAN_FPW_101',"Not to worry. Just enter your email address below and we'll send you an instruction email for recovery.");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -102,10 +112,18 @@ if ($pref['membersonly_enabled'])
|
||||
$sc = array (
|
||||
'FPW_LOGIN_LOGO' => file_exists(THEME."images/login_logo.png") ? "<img src='".THEME_ABS."images/login_logo.png' alt='' />\n" : "<img src='".e_IMAGE_ABS."logo.png' alt='' />\n"
|
||||
);
|
||||
//if (!$FPW_TABLE_HEADER)
|
||||
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$FPW_TABLE_HEADER = e107::getCoreTemplate('fpw','header');
|
||||
$FPW_TABLE_FOOTER = e107::getCoreTemplate('fpw','footer');
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once (e107::coreTemplatePath('fpw')); //correct way to load a core template.
|
||||
}
|
||||
|
||||
$HEADER = $tp->simpleParse($FPW_TABLE_HEADER, $sc);
|
||||
$FOOTER = $tp->simpleParse($FPW_TABLE_FOOTER, $sc);
|
||||
}
|
||||
@ -300,9 +318,15 @@ if (USE_IMAGECODE)
|
||||
}
|
||||
*/
|
||||
|
||||
if (!$FPW_TABLE)
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$FPW_TABLE = e107::getCoreTemplate('fpw','form');
|
||||
$caption = deftrue('LAN_FPW_100',"Forgot your password?");
|
||||
}
|
||||
elseif (!$FPW_TABLE)
|
||||
{
|
||||
require_once (e107::coreTemplatePath('fpw')); //correct way to load a core template.
|
||||
$caption = LAN_03;
|
||||
}
|
||||
|
||||
$sc = new fpw_shortcodes;
|
||||
@ -313,9 +337,10 @@ $nwShortcodes = array('{FPW_CAPTCHA_LAN}', '{FPW_CAPTCHA_HIDDEN}', '{FPW_CAPTCH
|
||||
$FPW_TABLE = str_replace($bcShortcodes,$nwShortcodes,$FPW_TABLE);
|
||||
|
||||
$text = $tp->parseTemplate($FPW_TABLE, true, $sc);
|
||||
|
||||
// $text = $tp->simpleParse($FPW_TABLE, $sc);
|
||||
|
||||
$ns->tablerender(LAN_03, $text);
|
||||
$ns->tablerender($caption, $text);
|
||||
require_once(FOOTERF);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user