<?xml version='1.0' encoding='UTF-8'?><uidget><metadata><name>Contact</name><description>Add a contact form</description><help><![CDATA[
			With the Contact Block, visitors can send you emails directly from your Website. &lt;br&gt; You can choose if the fields are required, optional or hidden.&lt;br&gt; The emails are sent directly to your email address. 
		]]></help><api_version>1.0</api_version><size height='200' width='340' /><server>local://ContactCptServer</server><blog en='53' /><deprecated /></metadata><view><content>&lt;div class=&quot;form&quot;&gt;
	&lt;div class=&quot;result&quot;&gt;&lt;/div&gt;
	&lt;table&gt;
		&lt;tr class=&apos;uicf_f uicf_f_n&apos;&gt;&lt;td&gt;Name&lt;span class=&quot;uicf_or&quot;&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;name&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr class=&apos;uicf_f uicf_f_c&apos;&gt;&lt;td&gt;Company&lt;span class=&quot;uicf_or&quot;&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;company&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr class=&apos;uicf_f uicf_f_f&apos;&gt;&lt;td&gt;First name&lt;span class=&quot;uicf_or&quot;&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;firstname&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr class=&apos;uicf_f uicf_f_a&apos;&gt;&lt;td&gt;Address&lt;span class=&quot;uicf_or&quot;&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;address&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr class=&apos;uicf_f uicf_f_z&apos;&gt;&lt;td&gt;Zip&lt;span class=&quot;uicf_or&quot;&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;zip&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr class=&apos;uicf_f uicf_f_t&apos;&gt;&lt;td&gt;City&lt;span class=&quot;uicf_or&quot;&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;city&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr class=&apos;uicf_f uicf_f_p&apos;&gt;&lt;td&gt;Phone&lt;span class=&quot;uicf_or&quot;&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;phone&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr class=&apos;uicf_f uicf_f_s&apos;&gt;&lt;td&gt;Subject&lt;span class=&quot;uicf_or&quot;&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;subject&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr&gt;&lt;td class=&apos;uicf_f&apos;&gt;Email&lt;span class=&quot;uicf_or&quot;&gt;*&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; class=&quot;uicf_tf&quot; name=&quot;email&quot; value=&quot;&quot;/&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr&gt;&lt;td class=&apos;uicf_f&apos;&gt;Message&lt;span class=&quot;uicf_or&quot;&gt;*&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;textarea name=&quot;text&quot;&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr class=&apos;uicf_f  uicf_f_at&apos;&gt;&lt;td&gt;Attachments&lt;span class=&quot;uicf_or&quot;&gt;*&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class=file_list&gt;&lt;/span&gt; &lt;a href=&quot;#&quot;&gt;Add&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr&gt;&lt;td class=&apos;uicf_f&apos;&gt;Type this code&lt;span class=&quot;uicf_or&quot;&gt;*&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;div uitype=&quot;captcha&quot; name=&quot;captcha&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
		&lt;tr&gt;&lt;td class=&quot;uicf_or&quot;&gt;* Field is required&lt;/td&gt;
		&lt;td style=&quot;text-align:center&quot;&gt;
			&lt;input class=&quot;uicf_b_c&quot; type=&quot;submit&quot; value=&quot;Cancel&quot;/&gt;
			&lt;input class=&quot;uicf_b_s&quot; type=&quot;submit&quot; value=&quot;Send email&quot; /&gt;
			&lt;img src=&quot;/assets/loadingAnimation.gif&quot; class=&quot;loading&quot;&gt;
		&lt;/td&gt;&lt;/tr&gt;
	&lt;/table&gt;
&lt;/div&gt;
</content><properties><select default='&apos;r&apos;' display='Required|Optional|Hidden' name='name' title='Name' values='r|o|h' /><select default='&apos;h&apos;' display='Required|Optional|Hidden' name='company' title='Company' values='r|o|h' /><select default='&apos;h&apos;' display='Required|Optional|Hidden' name='firstname' title='First name' values='r|o|h' /><select default='&apos;o&apos;' display='Required|Optional|Hidden' name='address' title='Address' values='r|o|h' /><select default='&apos;h&apos;' display='Required|Optional|Hidden' name='zip' title='Zip' values='r|o|h' /><select default='&apos;h&apos;' display='Required|Optional|Hidden' name='city' title='City' values='r|o|h' /><select default='&apos;o&apos;' display='Required|Optional|Hidden' name='phone' title='Phone' values='r|o|h' /><select default='&apos;r&apos;' display='Required|Optional|Hidden' name='subject' title='Subject' values='r|o|h' /><select default='&apos;h&apos;' display='Required|Optional|Hidden' name='attachments' title='Attachments' values='r|o|h' /></properties></view><script>UI_List.UI_Contact={initialize:function(a){this.cpt=a;
a.setOptions([&quot;locked&quot;,&quot;footer&quot;,&quot;sticky&quot;])
},onDisplay:function(e){this.node=e;
this.size_getter_el=$(&quot;&lt;div&gt;&lt;/div&gt;&quot;).appendTo(e)[0];
this.afields=[&quot;name&quot;,&quot;firstname&quot;,&quot;company&quot;,&quot;address&quot;,&quot;zip&quot;,&quot;city&quot;,&quot;phone&quot;,&quot;subject&quot;,&quot;attachments&quot;];
this.hfields={name:$(&quot;.uicf_f_n&quot;,this.node),company:$(&quot;.uicf_f_c&quot;,this.node),firstname:$(&quot;.uicf_f_f&quot;,this.node),address:$(&quot;.uicf_f_a&quot;,this.node),zip:$(&quot;.uicf_f_z&quot;,this.node),city:$(&quot;.uicf_f_t&quot;,this.node),phone:$(&quot;.uicf_f_p&quot;,this.node),subject:$(&quot;.uicf_f_s&quot;,this.node),attachments:$(&quot;.uicf_f_at&quot;,this.node)};
var d=$(&quot;.form&quot;,e);
var h=d.find(&quot;.loading&quot;).hide();
var a=d.find(&quot;.result&quot;).hide();
var c=d.find(&quot;.uicf_b_c&quot;);
var f=d.find(&quot;.uicf_b_s&quot;);
var g=&quot;&lt;div class=&apos;close&apos;&gt;Close&lt;/div&gt;&quot;;
var b=this;
this.attachments=[];
$(&quot;a&quot;,this.hfields.attachments).click(function(){var i=$(&quot;&lt;input type=file style=&apos;display:none&apos; name=&apos;attachments[]&apos; multiple=1&gt;&quot;).appendTo(d);
i[0].click();
i.change(function(){$.each(this.files,function(j,m){var n=$(&quot;&lt;span&gt;&quot;).appendTo($(&quot;.file_list&quot;,b.hfields.attachments));
$(&quot;&lt;span class=filename&gt;&quot;).text(m.name+&quot; (&quot;+Math.round(m.size/1024/1024*10)/10+&quot;M)&quot;).appendTo(n);
var k=$(&quot;&lt;span class=percent&gt; 0%&lt;/span&gt;&quot;).appendTo(n);
$(&quot;&lt;span class=&apos;file_remove fonticon&apos;&gt;&quot;).html($.fn.fonticon(&quot;remove&quot;)).click(function(){b.attachments.slice().each(function(o){if(o[1]==m){b.attachments.remove(o);
o[0].abort();
n.remove()
}})
}).appendTo(n);
$(&quot;&lt;span class=comma&gt;&quot;).text(&quot;, &quot;).appendTo(n);
var l=new FormData();
l.append(&quot;attachment&quot;,m);
b.attachments.push([$.ajax({url:&quot;/cpt_contact/upload&quot;,type:&quot;POST&quot;,dataType:&quot;json&quot;,cache:false,data:l,timeout:0,processData:false,contentType:false,autoretry:false,noretry:true,filename:m.name,progressUpload:function(o){k.text(&quot; &quot;+Math.round(o.loaded/o.total*99)+&quot;%&quot;)
},success:function(){k.html(&quot; &quot;);
b.updateCptSize()
}}),m])
});
$(&quot;.comma:last&quot;,b.hfields.attachments).remove();
b.updateCptSize()
});
return false
});
f.bind(&quot;click&quot;,function(){a.hide().unbind(&quot;click&quot;);
c.hide();
f.hide();
h.show();
var k={request:&quot;send_mail&quot;,content:{}};
var i=$.Deferred().resolve();
k.attachments=[];
var j=[];
b.attachments.each(function(l){i=i.then(function(){return l[0]
},function(){return l[0]
}).then(function(m){k.attachments.push([l[1].name,l[1].size,m.url])
},function(m,n){j.push(&quot;Error sending attached file &quot;+this.filename+&quot; (&quot;+n+&quot;)&quot;);
return j
})
});
i.then(function(){d.find(&quot;:text,textarea&quot;).each(function(l,m){k.content[m.name]=m.value
});
return b.cpt.ask(k)
}).then(function(){h.hide();
c.show();
a.show().html(&quot;&lt;div&gt;&lt;b&gt;Message sent!&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&quot;).removeClass(&quot;uicf_nok&quot;).addClass(&quot;uicf_ok&quot;)
},function(l){h.hide();
f.show();
c.show();
a.show().html(&quot;&lt;div&gt;&lt;b&gt;&lt;u&gt;Message not sent:&lt;/u&gt;&lt;/b&gt;&lt;br/&gt; - &quot;+l.join(&quot;&lt;br/&gt; - &quot;)+&quot;&lt;/div&gt;&quot;+g).removeClass(&quot;uicf_ok&quot;).addClass(&quot;uicf_nok&quot;).one(&quot;click&quot;,function(){a.hide()
})
})
});
c.bind(&quot;click&quot;,function(){if(confirm(&quot;Do you really want to reset the form?&quot;)){d.find(&quot;:text,textarea&quot;).each(function(j,k){$(k).val(&quot;&quot;)
})
}return false
});
this.onPropertyChanged(this.afields);
var b=this;
sigCtl.connect(&quot;Theme.changed&quot;,function(){b.updateCptSize()
});
this.updateCptSize()
},onPropertyChanged:function(a){var b=this;
a.each(function(c){if(b.afields.include(c)){if(b.cpt.data[c]==&quot;o&quot;){b.hfields[c].show().find(&quot;.uicf_or&quot;).empty()
}else{if(b.cpt.data[c]==&quot;r&quot;){b.hfields[c].show().find(&quot;.uicf_or&quot;).html(&quot;*&quot;)
}else{b.hfields[c].hide()
}}}});
this.updateCptSize()
},updateCptSize:function(){this.cpt.setSize({h:10000});
this.cpt.setSize({h:this.size_getter_el.offsetTop,w:this.cpt.W()&gt;280?null:280})
},onShow:function(){this.updateCptSize()
},onResizeStop:function(){this.updateCptSize()
},onFontFamilyUpdate:function(){this.updateCptSize()
}};</script><style>div.UI_Contact textarea{height:100px}
div.UI_Contact input.uicf_tf{width:97%}
div.UI_Contact table{width:100%}
div.UI_Contact .result{left:5%;position:absolute;top:20%;width:90%;z-index:10}
div.UI_Contact .result div{padding:5px 5px 5px 40px}
div.UI_Contact .result .close{text-decoration:underline;cursor:pointer;margin-top:10px;text-align:center;padding:0 0 5px}
div.UI_Contact .uicf_ok{background:#DBE6DE url(/assets/icons/status_success.png) no-repeat scroll 5px 5px;border:1px solid #C6D7CF}
div.UI_Contact .uicf_nok{background:#FFFFD9 url(/assets/icons/status_warning.png) no-repeat scroll 5px 5px;border:1px solid #A7A772}
div.UI_Contact .uicf_f{font-weight:700}
div.UI_Contact input.uicf_tf,div.UI_Contact textarea{width:calc(100% - 8px)}</style></uidget>