',
component_bgcolor:'inherit',
component_checkBgcolor:'',
component_placeHoldercolor:'',
component_fcolor:'',
component_formStyle:'3',
component_phoenix_form_upload_limit:"Attachment can't exceed 30M",
component_phoenix_from_emptyerror:"This field is required",
component_phoenix_from_mailerror:"invalid email address",
component_phoenix_from_phoneerror:"Please enter the correct phone number",
};
if (phoenixSite.form && phoenixSite.form !== 'undefined' && typeof phoenixSite.form.init == "function") {
phoenixSite.form.init(options);
}
$("#component_ipAUeRgDqvrZ").find("input.timePicker").each(function(){
var this_ = $(this);
this_.attr("placeholder","Select time");
this_.addClass("inited");
this_.datepicker({
dateFormat: 'yyyy/mm/dd',
autoClose: true
});
})
$("#component_ipAUeRgDqvrZ .timePickers .timePicker").on("blur",function(){
if($(this).index() == 0){
var minDate = $(this).val();
if(minDate){
$(this).parent().find(".timePicker").eq(1).datepicker({
minDate:new Date(minDate),
dateFormat: 'yyyy/mm/dd',
autoClose: true
});
}else{
$(this).parent().find(".timePicker").eq(1).datepicker({
dateFormat: 'yyyy/mm/dd',
autoClose: true
});
}
}
if($(this).index() == 1){
var maxDate = $(this).val();
if(maxDate){
$(this).parent().find(".timePicker").eq(0).datepicker({
maxDate:new Date(maxDate),
dateFormat: 'yyyy/mm/dd',
autoClose: true
});
}else{
$(this).parent().find(".timePicker").eq(0).datepicker({
dateFormat: 'yyyy/mm/dd',
autoClose: true
});
}
}
})
$("#component_ipAUeRgDqvrZ .phoneInputprepend").each(function (indexMu,elMu) {
var twoId = $(elMu).find('input:eq(1)').attr("id")
var twoName = $(elMu).find('input:eq(1)').attr("name")
$(elMu).find('input:eq(0)').attr("id",twoId)
$(elMu).find('input:eq(0)').attr("name",twoName)
})
$("#component_ipAUeRgDqvrZ select[multiple]").each(function (indexMu,elMu) {
var thisId = $(elMu).attr("id")
var multipleHtml = ''
multipleHtml += '
'+"Please select"+'
'
multipleHtml += '
'
$(elMu).parent().append(multipleHtml)
$("#component_ipAUeRgDqvrZ .multiple-select."+thisId+" ").on("click",function () {
if ($("#component_ipAUeRgDqvrZ .multiple-parent."+thisId+"").css("display") == "none") {
$("#component_ipAUeRgDqvrZ .multiple-parent."+thisId+"").css("display", "block")
} else {
$("#component_ipAUeRgDqvrZ .multiple-parent."+thisId+"").css("display", "none")
}
})
$("#component_ipAUeRgDqvrZ .multiple-parent."+thisId+"").on("click", "li", function (e) {
e.stopPropagation()
e.preventDefault()
var $label = $(this).children("label")
var input = this.getElementsByTagName("input")[0]
if (input.checked) {
input.checked = false
} else {
input.checked = true
}
//获取所有选项的值
var contents = [];
$("#component_ipAUeRgDqvrZ .multiple-parent."+thisId+" li").each(function (index, elem) {
if (!$(elem).hasClass("group")) {
var ck = $(elem).find("input")[0].checked
if (ck) {
var html = $(elem).children("label").html();
contents.push(html);
}
}
})
if (contents.length > 0) {
$("#component_ipAUeRgDqvrZ .multiple-select."+thisId+"").empty();
for (var i = 0; i < contents.length; i++) {
var span = "
"+contents[i]+"×"
$("#component_ipAUeRgDqvrZ .multiple-select."+thisId+"").append(span)
}
} else {
$("#component_ipAUeRgDqvrZ .multiple-select."+thisId+"").empty();
var span = "
"+"Please select"+""
$("#component_ipAUeRgDqvrZ .multiple-select."+thisId+"").append(span)
}
$(elMu).val(contents)
});
$("#component_ipAUeRgDqvrZ .multiple-select."+thisId+"").on("click", ".select-delete", function (e) {
e.stopPropagation()
var value = $(this).parent().children(".select-value").html();
$("#component_ipAUeRgDqvrZ .multiple-parent."+thisId+" ul li").each(function (index, elem) {
if ($(elem).children("label").html() == value) {
elem.getElementsByTagName("input")[0].checked = false;
}
})
$(this).parent().remove();
var len = $("#component_ipAUeRgDqvrZ .multiple-select."+thisId+"").children().length;
if (len == 0) {
var span = "
"+"Please select"+""
$("#component_ipAUeRgDqvrZ .multiple-select."+thisId+"").append(span)
}
var contents = [];
$("#component_ipAUeRgDqvrZ .multiple-parent."+thisId+" li").each(function (index, elem) {
if (!$(elem).hasClass("group")) {
var ck = $(elem).find("input")[0].checked
if (ck) {
var html = $(elem).children("label").html();
contents.push(html);
}
}
})
$(elMu).val(contents)
})
})
}catch(e){try{console && console.log && console.log(e);}catch(e){}} })(window, $);