Issue 2106 Mobile support for Member module fix and apply Mobile member module identity as CSS written.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10810 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2012-06-30 17:46:48 +00:00
parent bdd2b37b6c
commit b297e9eeee
15 changed files with 212 additions and 31 deletions

View file

@ -933,6 +933,14 @@
<value xml:lang="tr"><![CDATA[Hesap Bilgisi Bul]]></value>
<value xml:lang="vi"><![CDATA[Lấy lại thông tin]]></value>
</item>
<item name="cmd_find_member_account_with_email">
<value xml:lang="ko"><![CDATA[이메일 주소로 계정 찾기]]></value>
<value xml:lang="en"><![CDATA[Find Account with Email address]]></value>
</item>
<item name="cmd_find_member_account_with_email_question">
<value xml:lang="ko"><![CDATA[질문/답변으로 계정 찾기]]></value>
<value xml:lang="en"><![CDATA[Find Account with Q&amp;A]]></value>
</item>
<item name="cmd_resend_auth_mail">
<value xml:lang="ko"><![CDATA[인증 메일 재발송]]></value>
<value xml:lang="en"><![CDATA[Request for Activation Mail]]></value>

View file

@ -253,7 +253,7 @@
,zdate($memberInfo['birthday'], 'Y-m-d', false)
,$lang->cmd_delete);
}elseif($formInfo->name == 'find_account_question'){
$inputTag = '<select name="find_account_question" style="width:290px">%s</select><br />';
$inputTag = '<select name="find_account_question" style="width:290px; display:block;">%s</select>';
$optionTag = array();
foreach($lang->find_account_question_items as $key=>$val){
if($key == $memberInfo['find_account_question']) $selected = 'selected="selected"';
@ -264,7 +264,7 @@
,$val);
}
$inputTag = sprintf($inputTag, implode('', $optionTag));
$inputTag .= '<br /><input type="text" name="find_account_answer" value="'.$memberInfo['find_account_answer'].'" class="inputText long tall" />';
$inputTag .= '<input type="text" name="find_account_answer" title="'.Context::getLang('find_account_answer').'" value="'.$memberInfo['find_account_answer'].'" class="inputText long tall" />';
}else{
$inputTag = sprintf('<input type="text" name="%s" value="%s" class="inputText long tall" />'
,$formInfo->name

View file

@ -1081,7 +1081,11 @@
$oMail->send();
// Return message
$msg = sprintf(Context::getLang('msg_auth_mail_sent'), $member_info->email_address);
return new Object(0,$msg);
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
$this->setRedirectUrl($returnUrl.'&user_id='.$user_id);
}
return new Object(0,$msg);
}

View file

@ -99,6 +99,39 @@ class memberMobile extends member
$this->setTemplateFile('member_info_mobile');
}
/**
* @brief Find user ID and password
**/
function dispMemberFindAccount() {
if(Context::get('is_logged')) return $this->stop('already_logged');
$oMemberModel = &getModel('member');
$config = $oMemberModel->getMemberConfig();
Context::set('identifier', $config->identifier);
$this->setTemplateFile('find_member_account');
}
/**
* @brief Generate a temporary password
**/
function dispMemberGetTempPassword() {
if(Context::get('is_logged')) return $this->stop('already_logged');
$oMemberModel = &getModel('member');
$config = $oMemberModel->getMemberConfig();
Context::set('identifier', $config->identifier);
$user_id = Context::get('user_id');
$temp_password = $_SESSION['xe_temp_password_'.$user_id];
unset($_SESSION['xe_temp_password_'.$user_id]);
if(!$user_id||!$temp_password) return new Object(-1,'msg_invaild_request');
Context::set('temp_password', $temp_password);
$this->setTemplateFile('find_temp_password');
}
/**
* @brief Edit member profile
**/
@ -153,6 +186,9 @@ class memberMobile extends member
// A message appears if the user is not logged-in
if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
$config = $oMemberModel->getMemberConfig();
Context::set('identifier', $config->identifier);
$logged_info = Context::get('logged_info');
$member_srl = $logged_info->member_srl;

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset version="1.5.0">
<customrules>
</customrules>
<fields>
<field name="email_address" required="true" length="1:200" rule="email" />
</fields>
</ruleset>

View file

@ -1,6 +1,6 @@
<include target="./common_header.html" />
<load target="filter/find_member_account.xml" />
<h1 class="h1">{$lang->cmd_find_member_account}</h1>
<h2 class="h2">{$lang->cmd_find_member_account_with_email}</h2>
<p>{$lang->about_find_member_account}</p>
<form action="./" method="get" class="form" onsubmit="return procFilter(this, find_member_account)">
<input type="hidden" name="mid" value="{$mid}" />
@ -17,7 +17,7 @@
</div>
</form>
<!--@if(count($lang->find_account_question_items)>1)-->
<h1 class="h1">{$lang->cmd_find_member_account}</h1>
<h2 class="h2">{$lang->cmd_find_member_account_with_email_question}</h2>
<p>{$lang->about_find_account_question}</p>
<form action="./" method="get" class="form" ruleset="@find_member_account_by_question">
<input type="hidden" name="module" value="member" />

View file

@ -31,6 +31,11 @@ input[type=radio]{width:13px;height:13px;margin:0;padding:0}
.ff label+input[type=text],
.ff label+input[type=password],
.ff label+textarea{padding:5px}
/* Help */
.hp{background:#eee;border-top:1px solid #ddd;padding:12px 10px !important;margin:10px -10px !important;}
.hp li{margin:0;display:inline;border-left:1px solid #ccc;padding:0 4px 0 8px;}
.hp li:first-child{border:0;}
.hp a{color:#333;text-decoration:none}
/* Button Area */
.bna{text-align:center;padding:0 10px;margin:10px 0}
.bna:after{content:"";display:block;clear:both}

View file

@ -51,3 +51,4 @@ input[type=radio]{width:13px;height:13px;margin:0;padding:0}
.bn[href]{height:26px}
.bn.dark{border-color:#666;background:#777 -webkit-gradient(linear,0% 0%,0% 100%,from(#7e7c78),to(#5c5b58));background:#777 -moz-linear-gradient(top,#7e7c78,#5c5b58);background-color:#777;color:#fff;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset}
.bn.white{border-color:#b5b5b5;background:#1b1b1b -webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#f6f6f6),color-stop(0.5,#f0f0f0),color-stop(0.5,#e4e4e4));background:#1b1b1b -moz-linear-gradient(top,#fff,#e4e4e4);background-color:#fff;color:#000}
.message{border:1px solid #ddd;background:#f8f8f8;margin:1em 0;padding:0 1em;border-radius:5px;line-height:1.4;font-size:12px}.message p{margin:1em 0!important}.message em{font-style:normal;color:#e00}.message.info,.message.error,.message.update{padding-left:55px}.message.info{border-color:#e0e8ec;background:#edf9ff url(../../../../common/img/msg.Info.png) no-repeat 1em .5em}.message.error{border-color:#efdcdc;background:#ffecec url(../../../../common/img/msg.error.png) no-repeat 1em .5em}.message.update{border-color:#eae9dc;background:#fffdef url(../../../../common/img/msg.update.png) no-repeat 1em .5em}

View file

@ -0,0 +1,59 @@
<load target="./../../../common/js/jquery.min.js" usecdn="true" index="-1000000" />
<load target="./../../../common/js/xe.min.js" usecdn="true" index="-1000000" />
<load target="css/msignup.css" usecdn="true" />
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<h2 class="hx h2">{$lang->cmd_find_member_account_with_email}</h2>
<form action="./" ruleset="findAccount" method="post" class="ff">
<input type="hidden" name="module" value="member" />
<input type="hidden" name="act" value="procMemberFindAccount" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$document_srl}" />
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="success_return_url" value="{getUrl('act', 'dispMemberFindAccount')}" />
<ul>
<li>
<label for="email_address1">{$lang->email_address}</label>
<input id="email_address1" type="text" name="email_address" />
</li>
</ul>
<div class="bna">
<input type="submit" class="bn dark" value="{$lang->cmd_send_mail}" />
</div>
</form>
<!--@if(count($lang->find_account_question_items)>1)-->
<h2 class="hx h2">{$lang->cmd_find_member_account_with_email_question}</h2>
<p>{$lang->about_find_account_question}</p>
<form action="./" method="post" class="ff" ruleset="@find_member_account_by_question">
<input type="hidden" name="module" value="member" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$document_srl}" />
<input type="hidden" name="act" value="procMemberFindAccountByQuestion" />
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', 'dispMemberGetTempPassword')}" />
<input type="hidden" name="page" value="{$page}" />
<ul>
<li cond="$identifier == 'user_id'">
<label for="user_id2">{$lang->user_id}</label>
<input type="text" name="user_id" id="user_id2" />
</li>
<li>
<label for="email_address2">{$lang->email_address}</label>
<input type="text" name="email_address" id="email_address2" />
</li>
<li>
<label for="question">{$lang->find_account_question}</label>
<select id="question" name="find_account_question" style="width:290px;display:block;">
<!--@for($i=1,$c=count($lang->find_account_question_items);$i<$c;$i++)-->
<option value="{$i}">{$lang->find_account_question_items[$i]}</option>
<!--@end-->
</select>
<input type="text" name="find_account_answer" value="" />
</li>
</ul>
<div class="bna">
<input type="submit" class="bn dark" value="{$lang->cmd_get_temp_password}" />
</div>
</form>
<!--@end-->

View file

@ -0,0 +1,7 @@
<load target="css/msignup.css" usecdn="true" />
<div>
<h2 class="hx h2">{$lang->cmd_find_member_account}</h2>
<p>{$lang->about_temp_password}</p>
<p><!--@if($identifier == 'user_id')-->{$lang->user_id}<!--@else-->{$lang->email_address}<!--@end-->: {$user_id}</p>
<p>{$lang->temp_password}: {$temp_password}</p>
</div>

View file

@ -1,3 +1,4 @@
<load target="./../../../common/js/jquery.min.js" usecdn="true" index="-1000000" />
<load target="css/mlogin.css" usecdn="true" />
<div class="bd">
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
@ -14,9 +15,30 @@
<li><label for="id"><!--@if($identifier == 'user_id')-->{$lang->user_id}<!--@else-->{$lang->email_address}<!--@end--></label><input name="user_id" type="text" id="id" value="" /></li>
<li><label for="pw">{$lang->password}</label><input name="password" type="password" id="pw" value="" /></li>
</ul>
<div class="message info" id="keep_msg" style="display:none;">
<p>{$lang->about_keep_warning}</p>
</div>
<div class="bna">
<div class="fl"><input name="keep_signed" type="checkbox" value="Y" id="autoLogin" /> <label for="autoLogin">{$lang->keep_signed}</label></div>
<div class="fr"><button type="submit" class="bn dark">{$lang->cmd_login}</button></div>
</div>
<ul class="hp">
<li><a href="{getUrl('','act','dispMemberFindAccount')}"><span>{$lang->cmd_find_member_account}</span></a></li>
<li><a href="{getUrl('','act','dispMemberSignUpForm')}"><span>{$lang->cmd_signup}</span></a></li>
</ul>
</form>
</div>
<script type="text/javascript">
jQuery(function($){
var keep_msg = $('#keep_msg');
keep_msg.hide();
$('#autoLogin').change(function(){
if($(this).is(':checked')){
keep_msg.slideDown(200);
} else {
keep_msg.slideUp(200);
}
});
});
</script>

View file

@ -1,30 +1,38 @@
{@ Context::loadFile(array("./common/js/jquery.js", 'head', '', -100000), true) }
{@ Context::loadFile(array("./common/js/js_app.js", 'head', '', -100000), true) }
{@ Context::loadFile(array("./common/js/common.js", 'head', '', -100000), true) }
{@ Context::loadFile(array("./common/js/xml_handler.js", 'head', '', -100000), true) }
{@ Context::loadFile(array("./common/js/xml_js_filter.js", 'head', '', -100000), true) }
<load target="css/msignup.css" usecdn="true" />
<!--%import("../skins/default/filter/modify_password.xml")-->
<load target="./../../../common/js/jquery.min.js" usecdn="true" index="-1000000" />
<load target="./../../../common/js/xe.min.js" usecdn="true" index="-1000000" />
<load target="../skins/default/js/member.js" usecdn="true" />
<div class="bd">
<h2 class="h2">{$member_title = $lang->cmd_modify_member_password}</h2>
<form id="fo_insert_member" action="./" method="get" onsubmit="return procFilter(this, modify_password)">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$document_srl}" />
<input type="hidden" name="page" value="{$page}" />
<fieldset class="sn">
<ul>
<li><label for="uid" class="db fb al">{$lang->user_id}</label><div id="uid">{htmlspecialchars($member_info->user_id)}</div></li>
<li><label for="cpw" class="db fb al">{$lang->current_password}</label><input type="password" name="current_password" id="cpw" class="itx" /></li>
<li><div><label for="npw1" class="db fb al">{$lang->password1}</label><input type="password" name="password1" id="npw1" class="itx" /></div>
<div><label for="npw1" class="db fb al">{$lang->password2}</label><input type="password" name="password2" id="npw2" class="itx" /></div>
<p style="color:#666">{$lang->about_password}</p></li>
</ul>
</fieldset>
<div class="cm">
<input type="submit" value="{$lang->cmd_registration}" class="bn"/><a href="{getUrl('act','dispMemberInfo','member_srl','')}" class="bn"><span>{$lang->cmd_back}</span></a>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<h2 class="h2">{$member_title = $lang->cmd_modify_member_password}</h2>
<form id="fo_insert_member" action="./" method="post" class="ff" ruleset="modifyPassword">
<input type="hidden" name="module" value="member" />
<input type="hidden" name="act" value="procMemberModifyPassword" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$document_srl}" />
<input type="hidden" name="page" value="{$page}" />
<fieldset class="sn">
<ul>
<li>
<label for="uid" class="db fb al"><!--@if($identifier == 'user_id')-->{$lang->user_id}<!--@else-->{$lang->email_address}<!--@end--></label>
<div id="uid"><!--@if($identifier == 'user_id')-->{htmlspecialchars($member_info->user_id)}<!--@else-->{htmlspecialchars($member_info->email_address)}<!--@end--></div>
</li>
<li>
<label for="cpw" class="db fb al">{$lang->current_password}</label>
<input type="password" name="current_password" id="cpw" class="itx" />
</li>
<li>
<div><label for="npw1" class="db fb al">{$lang->password1}</label><input type="password" name="password1" id="npw1" class="itx" /></div>
<div><label for="npw1" class="db fb al">{$lang->password2}</label><input type="password" name="password2" id="npw2" class="itx" /></div>
<p style="color:#666">{$lang->about_password}</p>
</li>
</ul>
</fieldset>
<div class="cm">
<input type="submit" value="{$lang->cmd_registration}" class="bn dark" />
</div>
</form>
</div>

View file

@ -1,3 +1,5 @@
<load target="./../../../common/js/jquery.min.js" usecdn="true" index="-1000000" />
<load target="./../../../common/js/xe.min.js" usecdn="true" index="-1000000" />
<load target="css/msignup.css" usecdn="true" />
<load target="js/signup_check.js" usecdn="true" />
<!--%load_js_plugin("ui")-->
@ -9,7 +11,7 @@
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<form ruleset="@insertMember" id="fo_insert_member" class="ff" action="./" method="post" enctype="multipart/form-data">
<form ruleset="@insertMember" id="fo_insert_member" class="ff" action="./" method="post" enctype="multipart/form-data">
<input type="hidden" name="module" value="member" />
<input type="hidden" name="act" value="procMemberInsert" />
<!--@if(!$is_logged && $member_config->agreement)-->

View file

@ -58,3 +58,4 @@ input[type=radio]{width:13px;height:13px;margin:0;padding:0}
.bn[href]{height:26px}
.bn.dark{border-color:#666;background:#777 -webkit-gradient(linear,0% 0%,0% 100%,from(#7e7c78),to(#5c5b58));background:#777 -moz-linear-gradient(top,#7e7c78,#5c5b58);background-color:#777;color:#fff;box-shadow:0 0 1px #fff inset;-moz-box-shadow:0 0 1px #fff inset;-webkit-box-shadow:0 0 1px #fff inset}
.bn.white{border-color:#b5b5b5;background:#1b1b1b -webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#f6f6f6),color-stop(0.5,#f0f0f0),color-stop(0.5,#e4e4e4));background:#1b1b1b -moz-linear-gradient(top,#fff,#e4e4e4);background-color:#fff;color:#000}
.message{border:1px solid #ddd;background:#f8f8f8;margin:1em 0;padding:0 1em;border-radius:5px;line-height:1.4;font-size:12px}.message p{margin:1em 0!important}.message em{font-style:normal;color:#e00}.message.info,.message.error,.message.update{padding-left:55px}.message.info{border-color:#e0e8ec;background:#edf9ff url(../../../../common/img/msg.Info.png) no-repeat 1em .5em}.message.error{border-color:#efdcdc;background:#ffecec url(../../../../common/img/msg.error.png) no-repeat 1em .5em}.message.update{border-color:#eae9dc;background:#fffdef url(../../../../common/img/msg.update.png) no-repeat 1em .5em}

View file

@ -3,6 +3,9 @@
<div class="hx h2">
<h2>{$system_message}</h2>
</div>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<div class="co">
<!--@if(!$is_logged)-->
{@ Context::addJsFile("./common/js/jquery.js", true, '', -100000) }
@ -18,13 +21,16 @@
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
<fieldset>
<ul>
<li><label for="uid">{$lang->user_id}</label><input type="text" name="user_id" id="uid" value="" /></li>
<li><label for="uid"><!--@if($member_config->identifier == 'user_id')-->{$lang->user_id}<!--@else-->{$lang->email_address}<!--@end--></label><input type="text" name="user_id" id="uid" value="" /></li>
<li><label for="upw">{$lang->password}</label><input type="password" name="password" id="upw" value="" /></li>
</ul>
<p>
<input type="checkbox" name="keep_signed" id="keepid" value="Y" />
<input type="checkbox" name="keep_signed" id="keepid" value="Y" />
<label for="keepid">{$lang->keep_signed}</label>
</p>
<div class="message info" id="keep_msg" style="display:none;">
<p>{$lang->about_keep_warning}</p>
</div>
<input type="submit" value="{$lang->cmd_login}" class="bn dark" />
<ul class="hp">
<li><a href="{getUrl('','act','dispMemberFindAccount')}"><span>{$lang->cmd_find_member_account}</span></a></li>
@ -62,3 +68,17 @@
<!--@end-->
</div>
</div>
<script type="text/javascript">
jQuery(function($){
var keep_msg = $('#keep_msg');
keep_msg.hide();
$('#keepid').change(function(){
if($(this).is(':checked')){
keep_msg.slideDown(200);
} else {
keep_msg.slideUp(200);
}
});
});
</script>