Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Sep 21, 11:10 AM

in-portal

Index: branches/RC/themes/default/forgotpw.tpl
===================================================================
--- branches/RC/themes/default/forgotpw.tpl (revision 9126)
+++ branches/RC/themes/default/forgotpw.tpl (revision 9127)
@@ -1,163 +1,186 @@
<inp:include _template="common/head.tpl" />
<BODY>
<inp:include _Template="common/pagetop.tpl" />
<table width="770" border="0" cellspacing="0" cellpadding="0">
<!-- start content -->
<tr>
<td valign="top" height="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10000"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td><img src="img/s.gif" width="200" height="1" alt="" /><br /></td>
</tr>
<tr height="100%">
<td valign="top" class="bott-line">
<!-- start bred crumbles -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bgr-path"><img src="img/s.gif" width="549" height="1" alt="" /><br /></td>
<!--<td bgcolor="#61b0ec"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>-->
</tr>
<tr>
<td class="bgr-path">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><img src="img/s.gif" width="1" height="24" alt="" /><br /></td>
<td class="path">&nbsp;</td>
<td align="right" width="10000">
<table border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td><img src="<inp:m_lang_field _Field="icon" _default="img/ic_flag.gif"/>" width="18" height="12" alt="" /><br /></td>
<td>&nbsp;</td>
<td class="post-action"><span onclick="showSeg('langmenu',true); "><inp:m_lang_field _Field="LocalName" /></span></td>
<td>&nbsp;&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<inp:include _Template="lang_select/lang_menu.tpl" />
</td>
<!--<td width="10000" valign="top" bgcolor="#61b0ec">&nbsp;</td>-->
</tr>
</table>
<!-- end bred crumbles -->
-
+
<img src="img/s.gif" width="1" height="1" alt="" /><br />
-
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="img/s.gif" width="20" height="1" alt="" /><br /></td>
<td valign="top" width="10000" class="bgr-myaccount">
<!-- page title -->
<img src="img/s.gif" width="1" height="5" alt="" /><br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50"><img src="img/ic_login_big.gif" width="46" height="46" alt="" /><br /></td>
<td><h1><inp:m_language _Phrase="lu_login_title" /></h1></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- end page title -->
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><!--<h2>Profile</h2>--></td>
<td class="tips" align="right">
<span class="error">*</span> - <inp:m_language _Phrase="lu_required_field" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4" class="bgr-updatefill"><img src="img/s.gif" width="300" height="1" alt="" /><br /></td>
</tr>
<tr>
<td colspan="4">
- <FORM method="POST" NAME="login" ACTION="<inp:m_form_action _form="forgotpw" _Confirm="forgotpw_confirm"/>">
+ <form method="post" action="<inp2:m_FormAction/>">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
- <tr>
+ <tr>
<td valign="top" width="10000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td colspan="3" class="field-content-top"><h2><inp:m_language _Phrase="lu_forgot_password" /></h2></td>
+ <td colspan="3" class="field-content-top"><h2><inp:m_language _Phrase="lu_forgot_password" /></h2></td>
</tr>
<tr>
- <td colspan="3" class="field-content-top"><span class="text"><inp:m_language _Phrase="lu_forgot_pw_description" /></td>
- </tr>
- <tr>
- <td colspan="3" class="error"><inp:m_list_form_errors _Form="forgotpw" _ItemTemplate="misc/form_error.tpl" /></td>
- </tr>
+ <td colspan="3" class="field-content-top"><span class="text"><inp:m_language _Phrase="lu_forgot_pw_description" /></td>
+ </tr>
<tr>
- <td class="field-name"><inp:m_form_prompt _field="username" _Form="forgotpw" _langtext="lu_prompt_username" _Template="misc/form_prompt.tpl" _ErrorTemplate="misc/form_prompt_error.tpl" /></td>
- <td width="100%" class="field-content-input"><inp:m_form_input type="text" class="input" style="width:135px;" _field="username" _Form="login" _Required="0" /><br /></td>
+ <td class="field-name">
+ <inp2:m_if check="u_HasError" field="Login">
+ <span class="error"><inp2:m_Phrase name="lu_prompt_username"/>:</span>
+ <inp2:m_else/>
+ <inp2:m_Phrase name="lu_prompt_username"/>:
+ </inp2:m_if>
+ </td>
+ <td width="100%" class="field-content-input">
+ <inp2:m_if check="u_HasError" field="Login">
+ <span class="error"><inp2:u_Error field="Login"/></span><br />
+ </inp2:m_if>
+ <input type="text" class="input" name="username" value="<inp2:m_Get name="username"/>" style="width:135px;"/>
+ </td>
<td>&nbsp;</td>
</tr>
- <tr>
- <td class="field-name"><inp:m_language _Phrase="lu_or" /></td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td class="field-name"><inp:m_form_prompt _form="forgotpw" _Field="email" _langtext="lu_pp_email" _Template="misc/form_prompt.tpl" _ErrorTemplate="misc/form_prompt_error.tpl" /></td>
- <td class="field-content-input"><inp:m_form_input type="text" class="input" _field="email" _Form="login" style="width:135px;" /><br /></td>
- <td>&nbsp;</td>
+ <tr>
+ <td class="field-name"><inp:m_language _Phrase="lu_or" /></td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td class="field-name">
+ <inp2:m_if check="u_HasError" field="Email">
+ <span class="error"><inp2:m_Phrase name="lu_pp_email"/>:</span>
+ <inp2:m_else/>
+ <inp2:m_Phrase name="lu_pp_email"/>:
+ </inp2:m_if>
+ </td>
+ <td class="field-content-input">
+ <inp2:m_if check="u_HasError" field="Email">
+ <span class="error"><inp2:u_Error field="Email"/></span><br />
+ </inp2:m_if>
+ <input type="text" class="input" name="email" value="<inp2:m_Get name="email"/>" style="width: 135px;">
+ </td>
+ <td>&nbsp;</td>
</tr>
<tr>
<td class="field-name">&nbsp;</td>
<td class="field-content" valign="top">
<img src="img/s.gif" width="1" height="15" alt="" /><br />
- <INPUT type="submit" name="login" value="<inp:m_language _Phrase="lu_button_forgotpw" />" class="button">
+
+ <input type="hidden" name="template_success" value="index"/>
+ <input type="hidden" name="reset_confirm_template" value="forgotpw_confirm"/>
+
+ <input type="submit" class="button" name="events[u][OnForgotPassword]" value="<inp2:m_Phrase label="lu_button_forgotpw"/>" />
</td>
- <td>&nbsp;</td>
+ <td>&nbsp;</td>
</tr>
<tr>
<td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td colspan="2" class="field-content"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="5" alt="" /><br /></td>
</tr>
</table>
<!-- end profile content -->
</td>
</tr>
</table>
</td>
<!-- start vertical white line in main conent table -->
<td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<!-- end vertical white line in main conent table -->
<!-- right column //-->
<td valign="top" height="100%" class="open-box"><inp:include _Template="index/right_limited.tpl" /></td>
<!-- right column \\-->
</tr>
</table>
</td>
</tr>
<!-- end content -->
<inp:include _Template="common/footer.tpl" />
</table>
</body>
</html>
Property changes on: branches/RC/themes/default/forgotpw.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.2.36.1
\ No newline at end of property
Index: branches/RC/themes/default/forgotpw_confirm.tpl
===================================================================
--- branches/RC/themes/default/forgotpw_confirm.tpl (revision 9126)
+++ branches/RC/themes/default/forgotpw_confirm.tpl (revision 9127)
@@ -1,118 +1,128 @@
<inp:include _template="common/head.tpl" />
<BODY>
<inp:include _Template="common/pagetop.tpl" />
<table width="770" border="0" cellspacing="0" cellpadding="0">
<!-- start content -->
<tr>
<td valign="top" height="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10000"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td><img src="img/s.gif" width="200" height="1" alt="" /><br /></td>
</tr>
<tr height="100%">
<td valign="top" class="bott-line">
<!-- path //-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bgr-path"><img src="img/s.gif" width="549" height="1" alt="" /><br /></td>
<!--<td bgcolor="#61b0ec"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>-->
</tr>
<tr>
<td class="bgr-path">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="17"><img src="img/ic_homepath.gif" width="17" height="24" alt="" /><br /></td>
<td class="path">&nbsp;</td>
<td align="right">
<table border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td><img src="<inp:m_lang_field _Field="icon" _default="img/ic_flag.gif"/>" width="18" height="12" alt="" /><br /></td>
<td>&nbsp;</td>
<td class="post-action"><span onclick="showSeg('langmenu',true); "><inp:m_lang_field _Field="LocalName" /></span></td>
<td>&nbsp;&nbsp;</td>
</tr>
</table>
</td>
</tr>
- </table>
+ </table>
<inp:include _Template="lang_select/lang_menu.tpl" />
</td>
<!--<td class="bgr-path"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>-->
</tr>
<tr><td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td></tr>
</table>
<!-- path \\-->
-
-
+
+
<!-- confirm //-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="img/s.gif" width="20" height="1" alt="" /><br /></td>
<td valign="top" width="10000">
<img src="img/s.gif" width="1" height="5" alt="" /><br />
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<FORM method="POST" NAME="login" ACTION="<inp:m_form_action _form="forgotpw_confirm" _Template="login" />">
<tr>
<td width="50"><img src="img/ic_confirm_big.gif" width="46" height="46" alt="" /><br /></td>
<td><h1><inp:m_language _Phrase="lu_forgot_password" /></h1></td>
</tr>
<tr>
<td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td class="bgr-updatefill"><img src="img/s.gif" width="300" height="1" alt="" /><br /></TD>
</tr>
<tr>
<td>&nbsp;</td>
<td><br />
<h2><inp:m_language _Phrase="lu_forgotpw_confirm_reset" /></h2>
- <inp:m_language _Phrase="lu_forgotpw_confirm_text_reset" /><br /><br />
+ <inp:m_language _Phrase="lu_forgotpw_confirm_text_reset" /><br /><br />
</td>
</tr>
<tr>
<td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td class="bgr-updatefill"><img src="img/s.gif" width="300" height="1" alt="" /><br /></TD>
</tr>
<tr>
<td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td>
<img src="img/s.gif" width="1" height="5" alt="" /><br />
- <FORM method="POST" NAME="addcat_confirm" ACTION="<inp:m_form_action _Form="m_forgotpw_confirm" />">
- <INPUT type="submit" name="buttons[]" value="<inp:m_language _Phrase="lu_button_ok" />" class="button">
- </FORM>
+
+ <inp2:m_if check="u_TestCodeIsValid">
+ <form method="POST" action="<inp2:m_FormAction />">
+ <input type="submit" name="events[u][OnResetPasswordConfirmed]" value="<inp2:m_Phrase label="lu_button_Ok"/>" class="button" />
+
+ <input type="hidden" name="user_key" value="<inp2:m_Get name="user_key"/>"/>
+ <input type="hidden" name="template_success" value="forgotpw_reset_result" />
+ </form>
+ <inp2:m_else />
+ <span class="error"><inp2:u_Error field="PwResetConfirm"/></span>
+ <br /> <br />
+ <a href="<inp2:c_CategoryLink template="index" module="In-Commerce" cat_id="Root"/>"><inp2:m_Phrase label="lu_ReturnToHome"/></a>
+ </inp2:m_if>
</td>
</tr>
</FORM>
</table>
</td>
- </tr>
+ </tr>
</table>
<!-- confirm \\-->
-
+
</td>
<!-- white line content/right column //-->
<td><img src="img/s.gif" width="1" height="1" alt="" border="1" /><br /></td>
<!-- white line content/right column \\-->
-
+
<!-- right column //-->
<td valign="top" height="100%" class="open-box">
<inp:include _Template="misc/right_searchbox.tpl" />
<inp:include _Template="misc/right_quicklinks" />
</td>
<!-- right column \\-->
</tr>
</table>
</td>
</tr>
<!-- end content -->
<inp:include _Template="common/footer.tpl" />
</table>
</body>
</html>
Property changes on: branches/RC/themes/default/forgotpw_confirm.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.2.70.1
\ No newline at end of property
Index: branches/RC/core/install/upgrades.php
===================================================================
--- branches/RC/core/install/upgrades.php (revision 9126)
+++ branches/RC/core/install/upgrades.php (revision 9127)
@@ -1,162 +1,162 @@
<?php
$upgrade_class = 'CoreUpgrades';
/**
* Class, that holds all upgrade scripts for "Core" module
*
*/
class CoreUpgrades extends kHelper {
/**
* Installator instance
*
* @var kInstallator
*/
var $Installator = null;
function setInstallator(&$instance)
{
$this->Installator =& $instance;
}
/**
* Changes table structure, where multilingual fields of TEXT type are present
*
* @param string $mode when called mode {before, after)
*/
function Upgrade_4_1_0($mode)
{
if ($mode == 'before') {
// don't user after, because In-Portal calls this method too
$this->Installator->SaveConfig();
}
if ($mode == 'after') {
$ml_helper =& $this->Application->recallObject('kMultiLanguageHelper');
/* @var $ml_helper kMultiLanguageHelper */
$lang_count = $ml_helper->getLanguageCount();
$this->Application->UnitConfigReader->iterateConfigs(Array (&$this, 'updateTextFields'), $lang_count);
}
}
/**
* Moves ReplacementTags functionality from EmailMessage to Events table
*
* @param string $mode when called mode {before, after)
*/
function Upgrade_4_1_1($mode)
{
if ($mode == 'after') {
$sql = 'SELECT ReplacementTags, EventId
FROM '.TABLE_PREFIX.'EmailMessage
WHERE (ReplacementTags IS NOT NULL) AND (ReplacementTags <> "") AND (LanguageId = 1)';
$replacement_tags = $this->Conn->GetCol($sql, 'EventId');
foreach ($replacement_tags as $event_id => $replacement_tag) {
$sql = 'UPDATE '.TABLE_PREFIX.'Events
SET ReplacementTags = '.$this->Conn->qstr($replacement_tag).'
WHERE EventId = '.$event_id;
$this->Conn->Query($sql);
}
// drop moved field from source table
$sql = 'ALTER TABLE '.TABLE_PREFIX.'EmailMessage
DROP `ReplacementTags`';
$this->Conn->Query($sql);
}
}
/**
* Callback function, that makes all ml fields of text type null with same default value
*
* @param string $prefix
* @param Array $config_data
* @param int $language_count
* @return bool
*/
function updateTextFields($prefix, &$config_data, $language_count)
{
if (!isset($config_data['TableName']) || !isset($config_data['Fields'])) {
// invalid config found or prefix not found
return false;
}
$table_name = $config_data['TableName'];
$table_structure = $this->Conn->Query('DESCRIBE '.$table_name, 'Field');
if (!$table_structure) {
// table not found
return false;
}
$sqls = Array ();
foreach ($config_data['Fields'] as $field => $options) {
if (isset($options['formatter']) && $options['formatter'] == 'kMultiLanguage' && !isset($options['master_field'])) {
// update all l<lang_id>_<field_name> fields (new format)
for ($i = 1; $i <= $language_count; $i++) {
$ml_field = 'l'.$i.'_'.$field;
if ($table_structure[$ml_field]['Type'] == 'text') {
$sqls[] = 'CHANGE '.$ml_field.' '.$ml_field.' TEXT NULL DEFAULT NULL';
}
}
// update <field_name> if found (old format)
if (isset($table_structure[$field]) && $table_structure[$field]['Type'] == 'text') {
$sqls[] = 'CHANGE '.$field.' '.$field.' TEXT NULL DEFAULT NULL';
}
}
}
if ($sqls) {
$sql = 'ALTER TABLE '.$table_name.' '.implode(', ', $sqls);
$this->Conn->Query($sql);
}
return true;
}
/**
* Replaces In-Portal tags in Forgot Password related email events to K4 ones
*
* @param string $mode when called mode {before, after)
*/
function Upgrade_4_2_0($mode)
{
if ($mode == 'after') {
// 1. get event ids based on their name and type combination
$event_names = Array (
'USER.PSWD_'.EVENT_TYPE_ADMIN,
'USER.PSWD_'.EVENT_TYPE_FRONTEND,
'USER.PSWDC_'.EVENT_TYPE_FRONTEND,
);
$event_sql = Array ();
foreach ($event_names as $mixed_event) {
list ($event_name, $event_type) = explode('_', $mixed_event, 2);
$event_sql[] = 'Event = "'.$event_name.'" AND Type = '.$event_type;
}
$sql = 'SELECT EventId
FROM '.TABLE_PREFIX.'Events
WHERE ('.implode(') OR (', $event_sql).')';
$event_ids = implode(',', $this->Conn->GetCol($sql));
// 2. replace In-Portal tags to K4 tags
$replacements = Array (
'<inp:touser _Field="Password" />' => '<inp2:u_ForgottenPassword />',
- '<inp:m_confirm_password_link />' => '<inp2:u_ConfirmPasswordLink/>',
+ '<inp:m_confirm_password_link />' => '<inp2:u_ConfirmPasswordLink no_amp="1"/>',
);
foreach ($replacements as $old_tag => $new_tag) {
$sql = 'UPDATE '.TABLE_PREFIX.'EmailMessage
SET Template = REPLACE(Template, '.$this->Conn->qstr($old_tag).', '.$this->Conn->qstr($new_tag).')
WHERE EventId IN ('.$event_ids.')';
$this->Conn->Query($sql);
}
}
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/core/install/upgrades.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.7.2.1
\ No newline at end of property
+1.7.2.2
\ No newline at end of property

Event Timeline