组织二级域名对一些关键做限制
This commit is contained in:
parent
d98b1e17cc
commit
50a4db24ec
|
@ -143,7 +143,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="undis ml15 mr15" id="orgContent_3">
|
||||
<!--新增二级栏目-->
|
||||
<!--新增二级栏目-->
|
||||
<div>
|
||||
<%= form_tag url_for(:controller => 'org_subfields', :action => 'create', :organization_id => @organization.id), :id => 'add_subfield_form',:remote => true do %>
|
||||
<span class="fontGrey3 fb mb5 mr10" >新增一级栏目</span>
|
||||
|
@ -155,6 +155,7 @@
|
|||
<% else %>
|
||||
<span class="fontGrey2">(用户自定义url,可选) 您还没有子域名,请先在左侧信息栏申请子域名</span>
|
||||
<% end %>
|
||||
<div id="sub_dir_tip" class="mt10 c_red" style="display: none;">您输入的域名目录是关键字,不能使用</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<ul class="orgAddRole mb10">
|
||||
|
@ -183,8 +184,24 @@
|
|||
|
||||
</div>
|
||||
<script>
|
||||
function regex_domain_name()
|
||||
{
|
||||
var name = $.trim($("#sub_dir").val());
|
||||
var domain = ["members","more_org_submains","more_org_projects","more_org_courses","search_courses","teachers","students","projects","courses","acts","search_projects"]
|
||||
if(domain.indexOf(name) > 0)
|
||||
{
|
||||
$("#sub_dir_tip").show();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#sub_dir_tip").hide();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function add_org_subfield(){
|
||||
if ($("#subfield_name").val().trim() != "")
|
||||
if ($("#subfield_name").val().trim() != "" && regex_domain_name())
|
||||
$("#add_subfield_form").submit();
|
||||
}
|
||||
function add_org_subfield_subdomain(){
|
||||
|
|
Loading…
Reference in New Issue