var DomainForm=function(){};DomainForm.prototype={domain_id:null,showForm:function(b){this.domain_id=b;var a=$("#domainForm");document.location="#"+b;a.html('
').modal().load("/user/domainform.html?id="+b)},setPrivatePerson:function(b){var a=$(b).parents("toggle");a.prop("disabled",true).find(".btn").prop("disabled",true);$.ajax({url:"/user/changeprivate.html?domain="+this.domain_id+"&flag="+(b.checked?1:0),complete:function(){a.prop("disabled",false).find(".btn").prop("disabled",false)}})},setAutoRenew:function(b){var a=$(b).parents("toggle");a.prop("disabled",true).find(".btn").prop("disabled",true);$.ajax({url:"/user/changeautorenew.html?domain="+this.domain_id+"&renew="+(b.checked?1:0),complete:function(){a.prop("disabled",false).find(".btn").prop("disabled",false)}})},setParkingpage:function(b){var a=$(b).parents("toggle");a.prop("disabled",true).find(".btn").prop("disabled",true);$.ajax({url:"/user/setparking.html?domain="+this.domain_id+"&status="+(b.checked?1:0),complete:function(){a.prop("disabled",false).find(".btn").prop("disabled",false);var c=$("#domainFormParking");c.find("[data-parking=1]").css("display",b.checked?"inline":"none");c.find("[data-parking=0]").css("display",b.checked?"none":"inline")}})}};$(function(){$.domainform=new DomainForm()});