|
|
|
@ -149,18 +149,33 @@
|
|
|
|
|
if ($("#subfield_name").val().trim() != "")
|
|
|
|
|
$("#add_subfield_form").submit();
|
|
|
|
|
}
|
|
|
|
|
var $is_exist = false;
|
|
|
|
|
function apply_subdomain(id, domain){
|
|
|
|
|
var reg = new RegExp("^[a-zA-Z0-9_]{1,}$");
|
|
|
|
|
if (reg.exec(domain)){
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:"<%= apply_subdomain_organization_path %>",
|
|
|
|
|
type:'post',
|
|
|
|
|
url: "<%= check_uniq_domain_organizations_path %>",
|
|
|
|
|
type: 'get',
|
|
|
|
|
data:{
|
|
|
|
|
id:id,
|
|
|
|
|
domain:domain
|
|
|
|
|
org_domain:domain
|
|
|
|
|
},
|
|
|
|
|
success:function(){
|
|
|
|
|
$("#apply_hint").text("您的申请已提交,系统会以消息的形式通知您结果");
|
|
|
|
|
if(!$is_exist){
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:"<%= apply_subdomain_organization_path %>",
|
|
|
|
|
type:'post',
|
|
|
|
|
data:{
|
|
|
|
|
id:id,
|
|
|
|
|
domain:domain
|
|
|
|
|
},
|
|
|
|
|
success:function(){
|
|
|
|
|
$("#apply_hint").text("您的申请已提交,系统会以消息的形式通知您结果");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$("#apply_hint").text("您申请的子域名已存在,请重新输入");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|