BUG 0000 Forgot Password (2nd commit)
This commit is contained in:
@@ -151,11 +151,8 @@
|
|||||||
G::loadClass('configuration');
|
G::loadClass('configuration');
|
||||||
$oConf = new Configurations;
|
$oConf = new Configurations;
|
||||||
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
||||||
print_r($oConf->aConfig);
|
|
||||||
|
|
||||||
$flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])? $oConf->aConfig['login_enableForgotPassword']: false;
|
$flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])? $oConf->aConfig['login_enableForgotPassword']: 'off';
|
||||||
if ($flagForgotPassword)
|
$oHeadPublisher->addScriptCode("var flagForgotPassword = '$flagForgotPassword';");
|
||||||
$oHeadPublisher->addScriptCode( 'var flagForgotPassword = 1; ');
|
|
||||||
else
|
|
||||||
$oHeadPublisher->addScriptCode( 'var flagForgotPassword = 0; ');
|
|
||||||
G::RenderPage ( "publish" );
|
G::RenderPage ( "publish" );
|
||||||
|
|||||||
48
workflow/engine/xmlform/login/login.html
Normal file
48
workflow/engine/xmlform/login/login.html
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit="return validateForm('{$form_objectRequiredFields}');"> <div class="borderForm" style="width:{$form_width}; padding-left:0; padding-right:0; border-width:{$form_border};">
|
||||||
|
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||||
|
<div class="content" style="height:{$form_height};" >
|
||||||
|
<table width="99%">
|
||||||
|
<tr>
|
||||||
|
<td valign='top'>
|
||||||
|
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
|
||||||
|
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" />
|
||||||
|
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td class='FormTitle' colspan="2" align="">{$form.TITLE}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class='FormLabel' width="{$form_labelWidth}">{$USR_USERNAME}</td>
|
||||||
|
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USR_USERNAME}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class='FormLabel' width="{$form_labelWidth}">{$USR_PASSWORD}</td>
|
||||||
|
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USR_PASSWORD}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class='FormLabel' width="{$form_labelWidth}">{$USER_LANG}</td>
|
||||||
|
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.USER_LANG}</td>
|
||||||
|
</tr>
|
||||||
|
<tr style="display: none">
|
||||||
|
<td colspan="2">{$form.URL}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class='FormButton' colspan="2" align="">{$form.BSUBMIT}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class='FormLabel' colspan="2" align="right">{$form.FORGOT_PASWORD_LINK}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
{$form.JS}
|
||||||
|
</script>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
try {literal}{{/literal} dynaformSetFocus();}catch(e){literal}{{/literal}}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<dynaForm name="login" version="1.0" basedir="" xmlform_type="NORMAL" width="400px">
|
<dynaForm name="login" version="1.0" basedir="" xmlform_type="NORMAL" width="400px" enabletemplate="1">
|
||||||
<TITLE type="title">
|
<TITLE type="title">
|
||||||
<en>Login</en>
|
<en>Login</en>
|
||||||
</TITLE>
|
</TITLE>
|
||||||
@@ -19,11 +19,17 @@
|
|||||||
<en>Login</en>
|
<en>Login</en>
|
||||||
</BSUBMIT>
|
</BSUBMIT>
|
||||||
|
|
||||||
<FORGOT_PASWORD_LINK type="link" value="I forgot my password" link="forgotPassword" onclick="" colAlign="right" colWidth="135"/>
|
<FORGOT_PASWORD_LINK type="link" link="forgotPassword" onclick="" colAlign="right" colWidth="135">
|
||||||
|
<en>Forgot Password</en>
|
||||||
|
</FORGOT_PASWORD_LINK>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<JS type="javascript"><![CDATA[
|
<JS type="javascript"><![CDATA[
|
||||||
|
// enable/disable forgot password link
|
||||||
|
if(flagForgotPassword != 'on' )
|
||||||
|
hideRowById('FORGOT_PASWORD_LINK');
|
||||||
|
|
||||||
var panel;
|
var panel;
|
||||||
|
|
||||||
function processHbInfo(){
|
function processHbInfo(){
|
||||||
@@ -127,11 +133,6 @@ try{
|
|||||||
}
|
}
|
||||||
catch(e){}
|
catch(e){}
|
||||||
|
|
||||||
// enable/disable forgot password link
|
|
||||||
if(flagForgotPassword == 0 )
|
|
||||||
hideRowById('FORGOT_PASWORD_LINK');
|
|
||||||
|
|
||||||
|
|
||||||
]]></JS>
|
]]></JS>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -607,7 +607,11 @@ $startingTime = array_sum(explode(' ',microtime()));
|
|||||||
}
|
}
|
||||||
if ($bRedirect) {
|
if ($bRedirect) {
|
||||||
if (empty($_POST)) {
|
if (empty($_POST)) {
|
||||||
|
//if(SYS_TARGET != 'forgotPassword')
|
||||||
header('location: ' . SYS_URI . 'login/login?u=' . urlencode($_SERVER['REQUEST_URI']));
|
header('location: ' . SYS_URI . 'login/login?u=' . urlencode($_SERVER['REQUEST_URI']));
|
||||||
|
//else
|
||||||
|
//header('location: ' . SYS_URI . 'login/forgotPassword');
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
header('location: ' . SYS_URI . 'login/login');
|
header('location: ' . SYS_URI . 'login/login');
|
||||||
|
|||||||
Reference in New Issue
Block a user