服务协议 忘记密码

This commit is contained in:
lizanle 2015-08-26 17:52:23 +08:00
parent 9e9de44397
commit 733876743e
5 changed files with 18 additions and 28 deletions

View File

@ -79,7 +79,7 @@ class AccountController < ApplicationController
return
end
end
render :template => "account/password_recovery"
render :layout => 'static_base', :template => "account/password_recovery"
return
else
if request.post?
@ -87,6 +87,7 @@ class AccountController < ApplicationController
# user not found or not active
unless user && user.active?
flash.now[:error] = l(:notice_account_unknown_email)
render :layout => 'static_base'
return
end
# user cannot change its password
@ -99,10 +100,11 @@ class AccountController < ApplicationController
if token.save
Mailer.run.lost_password(token)
flash[:notice] = l(:notice_account_lost_email_sent)
redirect_to signin_url
redirect_to lost_password_path
return
end
end
render :layout => 'static_base'
end
end

View File

@ -1,5 +1,5 @@
<%= stylesheet_link_tag 'new_user'%>
<div class="homepageContentContainer " style="margin-top:20px;">
<!--<div class="homepageContentContainer mb20" >-->
<div class="homepageContent BgBox">
<h2 class="BgBox_h2">Trustie服务协议</h2>
<div class="AgreementBox">
@ -28,7 +28,7 @@
</div><!---BgBox end--->
</div><!---homepageContentContainer end--->
<!--</div>&lt;!&ndash;-homepageContentContainer end-&ndash;&gt;-->
<script>
$(".resourcesList").mousedown(function(e) {
if (3 == e.which) {

View File

@ -172,7 +172,7 @@
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginSignAlert" style="color: red"><%= flash.empty? ? "" : flash[:error].html_safe %></div>
<div class="loginSignAlert" style="color: red"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></div>
</div>
<div class="loginIn">

View File

@ -4,33 +4,21 @@
<div class="homepageContent BgBox">
<h2 class="BgBox_h2">忘记密码</h2>
<div class="BgBoxCon">
<%= form_tag(lost_password_path) do %>
<p class="BgBoxConP mb5">通过注册邮箱链接重设密码</p>
<input type="text" class="NomalInput mb20 " value="请输入登录邮箱地址" />
<div class="LoginButton"><a href="javascript:void(0);" class="c_white db">提交</a></div>
<!--<input type="text" class="NomalInput mb20 " value="请输入登录邮箱地址" />-->
<%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱',:class=>'NomalInput mb20'%>
<% if flash[:error] %>
<div style="color: red" class="mb5" ><%= flash[:error]%></div>
<% elsif flash[:notice] %>
<div style="color: green" class="mb5" ><%= flash[:notice]%></div>
<% end %>
<div class="LoginButton"><a href="javascript:void(0);" class="c_white db" onclick="$(this).parent().parent().submit();">提交</a></div>
<% end %>
</div>
</div><!---BgBox end--->
</div><!---homepageContentContainer end--->
<script>
$(".resourcesList").mousedown(function(e) {
if (3 == e.which) {
document.oncontextmenu = function() {return false;}
$("#contextMenu").hide();
$("#contextMenu").attr("style","display: block; position: fixed; top:"
+ e.pageY
+ "px; left:"
+ e.pageX
+ "px; width: 80px;");
$("#contextMenu").show();
}
});
$(".resourcesList").click(function(e) {
$("#contextMenu").hide();
document.oncontextmenu = function() {return true;}
});
</script>
</body>
</html>

View File

@ -635,7 +635,7 @@ ul.list_watch{
/*20150826忘记密码 LB*/
.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px;}
.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px;margin: 20px auto}
.BgBox_h2{ font-size:16px; color:#484848; width:968px;border-bottom:1px solid #e3e3e3; padding-bottom:5px;}
.NomalInput{width:308px; height:38px; border:1px solid #98a1a6; outline:none; color:#888888; font-size:14px;}
.BgBoxCon{ width:310px; margin:80px auto;}