1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Forgot password template cleanup

This commit is contained in:
Cameron
2013-05-31 15:54:45 -07:00
parent 0ed759d0c7
commit c63b3111ac
2 changed files with 91 additions and 9 deletions

View File

@@ -3,7 +3,7 @@
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
if (!defined("USER_WIDTH")){ define("USER_WIDTH","width:70%"); } if (!defined("USER_WIDTH") && deftrue('e_BOOTSTRAP')!==true){ define("USER_WIDTH","width:70%"); }
// ##### FPW TABLE ----------------------------------------------------------------------------- // ##### FPW TABLE -----------------------------------------------------------------------------
if(!isset($FPW_TABLE)) if(!isset($FPW_TABLE))
@@ -23,7 +23,7 @@ if(!isset($FPW_TABLE))
<tr> <tr>
<td class='forumheader3' style='width:70%'>".LAN_FPW1.":</td> <td class='forumheader3' style='width:70%'>".LAN_FPW1.":</td>
<td class='forumheader3' style='width:30%;text-align:center'> <td class='forumheader3' style='width:30%;text-align:center'>
<input class='tbox' type='text' name='username' size='40' value='' maxlength='100' /> {FPW_USERNAME}
</td> </td>
</tr>"; </tr>";
} }
@@ -32,8 +32,8 @@ if(!isset($FPW_TABLE))
$FPW_TABLE .=" $FPW_TABLE .="
<tr> <tr>
<td class='forumheader3' style='width:70%'>".LAN_112.":</td> <td class='forumheader3' style='width:70%'>".LAN_112.":</td>
<td class='forumheader3' style='width:30%; text-align:center'> <td class='forumheader3 text-left' style='width:30%'>
<input class='tbox' type='text' name='email' size='40' value='' maxlength='100' /> {FPW_USEREMAIL}
</td> </td>
</tr>"; </tr>";
@@ -41,8 +41,8 @@ if(!isset($FPW_TABLE))
{ {
$FPW_TABLE .= " $FPW_TABLE .= "
<tr> <tr>
<td class='forumheader3' style='width:25%'>{FPW_TABLE_SECIMG_LAN}</td> <td class='forumheader3' style='width:70%'>{FPW_TABLE_SECIMG_LAN}</td>
<td class='forumheader3' style='width:75%;text-align:left'>{FPW_TABLE_SECIMG_HIDDEN} {FPW_TABLE_SECIMG_SECIMG}<br /> <td class='forumheader3 text-left' style='width:30%;'>{FPW_TABLE_SECIMG_HIDDEN} {FPW_TABLE_SECIMG_SECIMG}<br />
{FPW_TABLE_SECIMG_TEXTBOC}<br /> {FPW_TABLE_SECIMG_TEXTBOC}<br />
</td> </td>
</tr>"; </tr>";
@@ -51,7 +51,7 @@ if(!isset($FPW_TABLE))
$FPW_TABLE .=" $FPW_TABLE .="
<tr style='vertical-align:top'> <tr style='vertical-align:top'>
<td class='forumheader' colspan='2' style='text-align:center'> <td class='forumheader' colspan='2' style='text-align:center'>
<input class='button btn btn-primary' type='submit' name='pwsubmit' value='".LAN_156."' /> {FPW_SUBMIT}
</td> </td>
</tr> </tr>
</table> </table>
@@ -65,7 +65,7 @@ if(!isset($FPW_TABLE_HEADER))
{ {
$FPW_TABLE_HEADER = " $FPW_TABLE_HEADER = "
<div style='width:100%;text-align:center;margin-left:auto;margin-right:auto'> <div style='width:100%;text-align:center;margin-left:auto;margin-right:auto'>
<div style='width:70%;margin-left:auto;margin-right:auto;text-align:center;'><br /> <div><br />
{FPW_LOGIN_LOGO} {FPW_LOGIN_LOGO}
<br />"; <br />";
} }

84
fpw.php
View File

@@ -34,6 +34,68 @@ else
} }
class fpw_shortcodes extends e_shortcode
{
private $secImg;
function __construct()
{
global $sec_img;
$this->secImg = $sec_img;
}
function sc_fpw_username($parm='') //TODO Use $frm
{
return "<input class='tbox' type='text' name='username' size='40' value='' maxlength='100' />";
}
function sc_fpw_useremail($parm='') //TODO Use $frm
{
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."' />";
}
function sc_fpw_captcha_lan($parm='')
{
return LAN_FPW2;
}
function sc_fpw_captcha_hidden($parm='')
{
return; // no longer required - included in renderInput();
}
function sc_fpw_captcha_img($parm='')
{
return $this->secImg->renderImage();
}
function sc_fpw_captcha_input($parm='')
{
return $this->secImg->renderInput();
}
function sc_fpw_logo($parm='')
{
// Unused at the moment.
}
}
if ($pref['membersonly_enabled']) if ($pref['membersonly_enabled'])
{ {
@@ -222,6 +284,11 @@ if (isset($_POST['pwsubmit']))
$sc = array(); $sc = array();
/*
if (USE_IMAGECODE) if (USE_IMAGECODE)
{ {
$sc = array ( $sc = array (
@@ -231,14 +298,29 @@ if (USE_IMAGECODE)
'FPW_TABLE_SECIMG_TEXTBOC' => "<input class='tbox' type='text' name='code_verify' size='15' maxlength='20' />" 'FPW_TABLE_SECIMG_TEXTBOC' => "<input class='tbox' type='text' name='code_verify' size='15' maxlength='20' />"
); );
} }
*/
if (!$FPW_TABLE) if (!$FPW_TABLE)
{ {
require_once (e107::coreTemplatePath('fpw')); //correct way to load a core template. require_once (e107::coreTemplatePath('fpw')); //correct way to load a core template.
} }
$text = $tp->simpleParse($FPW_TABLE, $sc);
$sc = new fpw_shortcodes;
// New Shortcode names in v2. BC Fix.
$bcShortcodes = array('{FPW_TABLE_SECIMG_LAN}', '{FPW_TABLE_SECIMG_HIDDEN}', '{FPW_TABLE_SECIMG_SECIMG}', '{FPW_TABLE_SECIMG_TEXTBOC}');
$nwShortcodes = array('{FPW_CAPTCHA_LAN}', '{FPW_CAPTCHA_HIDDEN}', '{FPW_CAPTCHA_IMG}', '{FPW_CAPTCHA_INPUT}');
$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(LAN_03, $text);
require_once(FOOTERF); require_once(FOOTERF);
?> ?>