Merge branch 'hjq_beidou' of https://git.trustie.net/jacknudt/trustieforge into hjq_beidou

This commit is contained in:
Tim 2016-05-17 09:15:05 +08:00
commit aee56c7eca
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class Organization < ActiveRecord::Base
self.allow_teacher.to_i == 1 ? true : false
end
def secdomain
def secdomain_name
Secdomain.where("sub_type=2 and pid=?", self.id).first.try(:subname)
end
end

View File

@ -114,7 +114,7 @@
<% if @organization.secdomain.nil? %>
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
<% else %>
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain_name) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
<% end %>
<div id="principals_for_new_member">