Merge branch 'yuanke_org' into develop
This commit is contained in:
commit
a7ecfba23b
|
@ -239,17 +239,18 @@ class AccountController < ApplicationController
|
|||
|
||||
end
|
||||
def resendmail
|
||||
status = 1
|
||||
result = {:status=>1, :email=>""}
|
||||
user = User.find(params[:user]) if params[:user]
|
||||
result[:email] = user.mail
|
||||
token = Token.new(:user => user, :action => "register")
|
||||
if token.save
|
||||
# Mailer.run.register(token)
|
||||
Mailer.register(token).deliver
|
||||
else
|
||||
yield if block_given?
|
||||
status = 0
|
||||
result[:status] = 0
|
||||
end
|
||||
render :json => status
|
||||
render :json => result
|
||||
end
|
||||
|
||||
def email_activation
|
||||
|
|
|
@ -23,7 +23,7 @@ module OrganizationsHelper
|
|||
when 'activity' then
|
||||
return '动态'
|
||||
when 'course' then
|
||||
return '课程'
|
||||
return '班级'
|
||||
when 'project' then
|
||||
return '项目'
|
||||
end
|
||||
|
|
|
@ -23,9 +23,15 @@
|
|||
url,
|
||||
{user: id },
|
||||
function (data) {
|
||||
console.log("1111111111");
|
||||
console.log(data);
|
||||
$(".email_verify_btn").replaceWith("<p class='email_verify_p mt30 ml30'>激活邮件已发送至您的注册邮箱,请及时登录邮箱进行验证。</p>");
|
||||
//邮箱@之前用a**b格式显示
|
||||
var mail = data.email;
|
||||
var pos = mail.indexOf("@");
|
||||
var restr = mail.substring(1,pos-1);
|
||||
if( mail.split("@")[0].length > 2 ){
|
||||
mail = mail.replace(restr,"***");
|
||||
}
|
||||
|
||||
$(".email_verify_btn").replaceWith("<p class='email_verify_p mt30 ml30'>激活邮件已发送至您的注册邮箱("+mail+"),请及时登录邮箱进行验证。</p>");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -37,16 +43,16 @@
|
|||
pop_up_box(htmlvalue,580,30,50);
|
||||
return;
|
||||
}
|
||||
$.get(
|
||||
url,
|
||||
{user:user,text:$(".email_prompt_mes").val() },
|
||||
function (data) {
|
||||
console.log("2222222");
|
||||
console.log(data);
|
||||
var htmlvalue = "<div class='email_tancon'><h2 class='email_tan_title'>您的留言已发送</h2><p class='email_tan_p'>我们将尽快处理好,并通过邮件通知您。感谢您的反馈!</p></div>"
|
||||
pop_up_box(htmlvalue,580,30,50);
|
||||
$(".email_prompt_mes").val("");
|
||||
}
|
||||
);
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: {user: user, text: $(".email_prompt_mes").val() },
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
var htmlvalue = "<div class='email_tancon'><h2 class='email_tan_title'>您的留言已发送</h2><p class='email_tan_p'>我们将尽快处理好,并通过邮件通知您。感谢您的反馈!</p></div>"
|
||||
pop_up_box(htmlvalue, 580, 30, 45);
|
||||
$(".email_prompt_mes").val("");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
<body>
|
||||
<!--<div class="resourceSharePopup">-->
|
||||
<div>
|
||||
<div class="relateText">请选择关联到组织的课程</div>
|
||||
<div class="c_red">您的私有课程不能被关联到组织</div>
|
||||
<div class="relateText">请选择关联到组织的班级</div>
|
||||
<div class="c_red">您的私有班级不能被关联到组织</div>
|
||||
</div>
|
||||
<div class="fl">
|
||||
<%=form_tag url_for(:controller => 'organizations', :action => 'join_courses', :organization_id => organization_id),:method => 'post', :id => 'join_courses_form', :remote => true,:class=>"resourcesSearchBox" do %>
|
||||
<input type="text" name="courses" placeholder="搜索您已加入的课程的名称" class="searchCourse" />
|
||||
<input type="text" name="courses" placeholder="搜索您已加入的班级的名称" class="searchCourse" />
|
||||
<div id="search_courses_result_list" class="mb8 maxHeight100" style="overflow:auto;"></div>
|
||||
<div class="courseSendSubmit">
|
||||
<a href="javascript:void(0);" onclick="org_join_courses(<%= organization_id %>);" class="sendSourceText">关联</a>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<% if is_default_field?(field) %>
|
||||
<% case field.name %>
|
||||
<% when 'course' %>
|
||||
<h2 class="por_h2_index clear">课程动态</h2>
|
||||
<h2 class="por_h2_index clear">班级动态</h2>
|
||||
<% if @course_acts.blank? %>
|
||||
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||
<% else %>
|
||||
|
|
|
@ -63,9 +63,9 @@
|
|||
<% when 'course' %>
|
||||
<div style="display:<%= field.hide == 0 ? 'block':'none' %>;" id="org_subfield_<%= field.id %>">
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a>
|
||||
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">班级</a>
|
||||
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
|
||||
<%=link_to "", join_course_menu_organization_path(organization),:remote => true, :method => "post", :class => "homepageMenuSetting fr", :title => "关联课程"%>
|
||||
<%=link_to "", join_course_menu_organization_path(organization),:remote => true, :method => "post", :class => "homepageMenuSetting fr", :title => "关联班级"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepageLeftMenuCourses" id="homepageLeftMenuCourses" style="display:<%= organization.courses.count == 0 ?'none':'' %>">
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
var last_name = $.trim($('#last_name').val());
|
||||
if(last_name.length > 30)
|
||||
{
|
||||
$("#valid_email").text("用户姓氏过长,最长为30个字符");
|
||||
$("#valid_email").text("用户姓名过长,最长为30个字符");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -37,7 +37,7 @@ zh:
|
|||
field_firstname: 名字或组织名
|
||||
firstname_empty: 名字不能为空
|
||||
field_firstname_eg: '(例:张三丰,请填写[三丰])'
|
||||
field_lastname: 姓氏
|
||||
field_lastname: 姓名
|
||||
lastname_empty: 姓氏不能为空
|
||||
enterprise_empty: 企业名不能为空
|
||||
field_lastname_eg: '(例:张三丰,请填写[张])'
|
||||
|
|
|
@ -496,7 +496,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
||||
|
||||
#激活邮箱反馈问题
|
||||
match 'users/:id/leave_email_activation_message', :to => 'words#leave_email_activation_message', :via => :get, :as => "leave_email_activation_message"
|
||||
match 'users/:id/leave_email_activation_message', :to => 'words#leave_email_activation_message', :via => :post, :as => "leave_email_activation_message"
|
||||
|
||||
# boards
|
||||
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
|
||||
|
|
Loading…
Reference in New Issue