- Tarea #829 -> Nueva sección de tasación de obras de arte
- Ajuste de estilos en sección de contacto. git-svn-id: https://192.168.0.254/svn/Proyectos.IRFineArts_Web/trunk@44 88734cd7-4cec-0b49-a19b-cefba6b9d6f8
This commit is contained in:
parent
9eaa3d59a8
commit
65ddc0eda5
@ -37,6 +37,11 @@
|
|||||||
</a>
|
</a>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
</li>
|
</li>
|
||||||
|
<li><a class="hide" href="/tasacion.php">Tasación</a>
|
||||||
|
<!--[if lte IE 6]>
|
||||||
|
<a href="tasacion.php">Tasación</a>
|
||||||
|
<![endif]-->
|
||||||
|
</li>
|
||||||
|
|
||||||
<li><a class="hide" href="/prensa.php">Prensa</a>
|
<li><a class="hide" href="/prensa.php">Prensa</a>
|
||||||
<!--[if lte IE 6]>
|
<!--[if lte IE 6]>
|
||||||
|
|||||||
41
confirmacion.php
Normal file
41
confirmacion.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<?php include("_cabecera.php"); ?>
|
||||||
|
<title>Recepción confirmada | Galería de Arte Ignacio Redondo, Madrid</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
/* <![CDATA[ */
|
||||||
|
var google_conversion_id = 1025698930;
|
||||||
|
var google_conversion_language = "en";
|
||||||
|
var google_conversion_format = "3";
|
||||||
|
var google_conversion_color = "ffffff";
|
||||||
|
var google_conversion_label = "KNNMCMaX3QIQ8tiL6QM";
|
||||||
|
var google_conversion_value = 0;
|
||||||
|
if (10) {
|
||||||
|
google_conversion_value = 10;
|
||||||
|
}
|
||||||
|
/* ]]> */
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="vertical"></div>
|
||||||
|
<div id="container">
|
||||||
|
<div id="header">
|
||||||
|
<h1>Ignacio Redondo</h1>
|
||||||
|
<h2>Galería de Arte</h2>
|
||||||
|
|
||||||
|
<?php include("_menu.php"); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content">
|
||||||
|
<div class="confirmacion">
|
||||||
|
<p>Gracias, hemos recibido correctamente su solicitud.<br/>
|
||||||
|
En breve nos pondremos en contacto con usted.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php include("_pie.php"); ?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
41
estilos.css
41
estilos.css
@ -152,6 +152,20 @@ div.quienes-somos p {
|
|||||||
padding: 10px 70px 10px 0;
|
padding: 10px 70px 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.confirmacion {
|
||||||
|
text-align: center;
|
||||||
|
margin: 125px auto 0 auto;
|
||||||
|
width: 450px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.confirmacion p {
|
||||||
|
border-top: 1px solid #FFBA00;
|
||||||
|
border-bottom: 1px solid #FFBA00;
|
||||||
|
line-height: 1.5em;
|
||||||
|
margin: 0;
|
||||||
|
padding: 60px 0;
|
||||||
|
}
|
||||||
|
|
||||||
div.pintores {
|
div.pintores {
|
||||||
padding: 10px 40px;
|
padding: 10px 40px;
|
||||||
font-size:90%;
|
font-size:90%;
|
||||||
@ -172,7 +186,7 @@ div.contacto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.direccion {
|
div.direccion {
|
||||||
width: 345px;
|
width: 355px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.direccion p {
|
div.direccion p {
|
||||||
@ -191,6 +205,31 @@ div.direccion h2 {
|
|||||||
font-size: 135%;
|
font-size: 135%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.tasacion {
|
||||||
|
padding: 10px 15px;
|
||||||
|
font-size: 85%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.tasacion .descripcion {
|
||||||
|
width: 435px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.tasacion .formulario {
|
||||||
|
width: 435px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.tasacion h2 {
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.tasacion p {
|
||||||
|
line-height: 1.3em;
|
||||||
|
margin: 0 0 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
div.prensa {
|
div.prensa {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|||||||
110
form.css
Normal file
110
form.css
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
@charset "utf-8";
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin: 5px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
legend {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #64AAD0;
|
||||||
|
margin: 10px 0 5px 0;
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, textarea {
|
||||||
|
width: 300px;
|
||||||
|
color: #fff;
|
||||||
|
border: 1px solid #64AAD0;
|
||||||
|
background-color: #2B4A5B;
|
||||||
|
font-size:12px;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.checkbox {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
width: 95px;
|
||||||
|
display: inline-block;
|
||||||
|
color: #FFBA00;
|
||||||
|
margin: 4px 0;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
label.error {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
label.agree_label {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label.agree_label a {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.error {
|
||||||
|
border: 1px dotted red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: red;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
#condiciones {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file_input_textbox {
|
||||||
|
width: 220px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file_input_div {
|
||||||
|
float: right;
|
||||||
|
position:relative;
|
||||||
|
margin-right: 30px;
|
||||||
|
width: 75px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file_input_hidden {
|
||||||
|
font-size: 23px;
|
||||||
|
position: absolute;
|
||||||
|
right: 30px;
|
||||||
|
top: 0px;
|
||||||
|
opacity: 0;
|
||||||
|
filter: alpha(opacity=0);
|
||||||
|
-ms-filter: "alpha(opacity=0)";
|
||||||
|
-khtml-opacity: 0;
|
||||||
|
-moz-opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file_input_button, .boton {
|
||||||
|
width: 75px;
|
||||||
|
background-color: #FFBA00;
|
||||||
|
color: #4D3800;
|
||||||
|
border-style: 1px solid #4D3800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boton {
|
||||||
|
margin-right: 30px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.simplemodal-data {
|
||||||
|
width: 650px;
|
||||||
|
background-color: #032E45;
|
||||||
|
border: 10px solid #2B4A5B;
|
||||||
|
padding: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
26
js/jquery.simplemodal.1.4.2.min.js
vendored
Normal file
26
js/jquery.simplemodal.1.4.2.min.js
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* SimpleModal 1.4.2 - jQuery Plugin
|
||||||
|
* http://simplemodal.com/
|
||||||
|
* Copyright (c) 2011 Eric Martin
|
||||||
|
* Licensed under MIT and GPL
|
||||||
|
* Date: Sat, Dec 17 2011 15:35:38 -0800
|
||||||
|
*/
|
||||||
|
(function(b){"function"===typeof define&&define.amd?define(["jquery"],b):b(jQuery)})(function(b){var j=[],k=b(document),l=b.browser.msie&&6===parseInt(b.browser.version)&&"object"!==typeof window.XMLHttpRequest,n=b.browser.msie&&7===parseInt(b.browser.version),m=null,h=b(window),i=[];b.modal=function(a,d){return b.modal.impl.init(a,d)};b.modal.close=function(){b.modal.impl.close()};b.modal.focus=function(a){b.modal.impl.focus(a)};b.modal.setContainerDimensions=function(){b.modal.impl.setContainerDimensions()};
|
||||||
|
b.modal.setPosition=function(){b.modal.impl.setPosition()};b.modal.update=function(a,d){b.modal.impl.update(a,d)};b.fn.modal=function(a){return b.modal.impl.init(this,a)};b.modal.defaults={appendTo:"body",focus:!0,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:!1,autoPosition:!0,zIndex:1E3,close:!0,closeHTML:'<a class="modalCloseImg" title="Close"></a>',
|
||||||
|
closeClass:"simplemodal-close",escClose:!0,overlayClose:!1,fixed:!0,position:null,persist:!1,modal:!0,onOpen:null,onShow:null,onClose:null};b.modal.impl={d:{},init:function(a,d){if(this.d.data)return!1;m=b.browser.msie&&!b.boxModel;this.o=b.extend({},b.modal.defaults,d);this.zIndex=this.o.zIndex;this.occb=!1;if("object"===typeof a){if(a=a instanceof jQuery?a:b(a),this.d.placeholder=!1,0<a.parent().parent().size()&&(a.before(b("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"})),
|
||||||
|
this.d.placeholder=!0,this.display=a.css("display"),!this.o.persist))this.d.orig=a.clone(!0)}else if("string"===typeof a||"number"===typeof a)a=b("<div></div>").html(a);else return alert("SimpleModal Error: Unsupported data type: "+typeof a),this;this.create(a);this.open();b.isFunction(this.o.onShow)&&this.o.onShow.apply(this,[this.d]);return this},create:function(a){this.getDimensions();if(this.o.modal&&l)this.d.iframe=b('<iframe src="javascript:false;"></iframe>').css(b.extend(this.o.iframeCss,
|
||||||
|
{display:"none",opacity:0,position:"fixed",height:i[0],width:i[1],zIndex:this.o.zIndex,top:0,left:0})).appendTo(this.o.appendTo);this.d.overlay=b("<div></div>").attr("id",this.o.overlayId).addClass("simplemodal-overlay").css(b.extend(this.o.overlayCss,{display:"none",opacity:this.o.opacity/100,height:this.o.modal?j[0]:0,width:this.o.modal?j[1]:0,position:"fixed",left:0,top:0,zIndex:this.o.zIndex+1})).appendTo(this.o.appendTo);this.d.container=b("<div></div>").attr("id",this.o.containerId).addClass("simplemodal-container").css(b.extend({position:this.o.fixed?
|
||||||
|
"fixed":"absolute"},this.o.containerCss,{display:"none",zIndex:this.o.zIndex+2})).append(this.o.close&&this.o.closeHTML?b(this.o.closeHTML).addClass(this.o.closeClass):"").appendTo(this.o.appendTo);this.d.wrap=b("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(this.d.container);this.d.data=a.attr("id",a.attr("id")||this.o.dataId).addClass("simplemodal-data").css(b.extend(this.o.dataCss,{display:"none"})).appendTo("body");this.setContainerDimensions();
|
||||||
|
this.d.data.appendTo(this.d.wrap);(l||m)&&this.fixIE()},bindEvents:function(){var a=this;b("."+a.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();a.close()});a.o.modal&&a.o.close&&a.o.overlayClose&&a.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();a.close()});k.bind("keydown.simplemodal",function(b){a.o.modal&&9===b.keyCode?a.watchTab(b):a.o.close&&a.o.escClose&&27===b.keyCode&&(b.preventDefault(),a.close())});h.bind("resize.simplemodal orientationchange.simplemodal",
|
||||||
|
function(){a.getDimensions();a.o.autoResize?a.setContainerDimensions():a.o.autoPosition&&a.setPosition();l||m?a.fixIE():a.o.modal&&(a.d.iframe&&a.d.iframe.css({height:i[0],width:i[1]}),a.d.overlay.css({height:j[0],width:j[1]}))})},unbindEvents:function(){b("."+this.o.closeClass).unbind("click.simplemodal");k.unbind("keydown.simplemodal");h.unbind(".simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var a=this.o.position;b.each([this.d.iframe||null,!this.o.modal?null:this.d.overlay,
|
||||||
|
"fixed"===this.d.container.css("position")?this.d.container:null],function(b,f){if(f){var g=f[0].style;g.position="absolute";if(2>b)g.removeExpression("height"),g.removeExpression("width"),g.setExpression("height",'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"'),g.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"');else{var c,e;a&&a.constructor===
|
||||||
|
Array?(c=a[0]?"number"===typeof a[0]?a[0].toString():a[0].replace(/px/,""):f.css("top").replace(/px/,""),c=-1===c.indexOf("%")?c+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':parseInt(c.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',a[1]&&(e="number"===typeof a[1]?
|
||||||
|
a[1].toString():a[1].replace(/px/,""),e=-1===e.indexOf("%")?e+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(e.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"')):(c='(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',
|
||||||
|
e='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"');g.removeExpression("top");g.removeExpression("left");g.setExpression("top",c);g.setExpression("left",e)}}})},focus:function(a){var d=this,a=a&&-1!==b.inArray(a,["first","last"])?a:"first",f=b(":input:enabled:visible:"+a,d.d.wrap);setTimeout(function(){0<f.length?f.focus():d.d.wrap.focus()},
|
||||||
|
10)},getDimensions:function(){var a=b.browser.opera&&"9.5"<b.browser.version&&"1.3">b.fn.jquery||b.browser.opera&&"9.5">b.browser.version&&"1.2.6"<b.fn.jquery?h[0].innerHeight:h.height();j=[k.height(),k.width()];i=[a,h.width()]},getVal:function(a,b){return a?"number"===typeof a?a:"auto"===a?0:0<a.indexOf("%")?parseInt(a.replace(/%/,""))/100*("h"===b?i[0]:i[1]):parseInt(a.replace(/px/,"")):null},update:function(a,b){if(!this.d.data)return!1;this.d.origHeight=this.getVal(a,"h");this.d.origWidth=this.getVal(b,
|
||||||
|
"w");this.d.data.hide();a&&this.d.container.css("height",a);b&&this.d.container.css("width",b);this.setContainerDimensions();this.d.data.show();this.o.focus&&this.focus();this.unbindEvents();this.bindEvents()},setContainerDimensions:function(){var a=l||n,d=this.d.origHeight?this.d.origHeight:b.browser.opera?this.d.container.height():this.getVal(a?this.d.container[0].currentStyle.height:this.d.container.css("height"),"h"),a=this.d.origWidth?this.d.origWidth:b.browser.opera?this.d.container.width():
|
||||||
|
this.getVal(a?this.d.container[0].currentStyle.width:this.d.container.css("width"),"w"),f=this.d.data.outerHeight(!0),g=this.d.data.outerWidth(!0);this.d.origHeight=this.d.origHeight||d;this.d.origWidth=this.d.origWidth||a;var c=this.o.maxHeight?this.getVal(this.o.maxHeight,"h"):null,e=this.o.maxWidth?this.getVal(this.o.maxWidth,"w"):null,c=c&&c<i[0]?c:i[0],e=e&&e<i[1]?e:i[1],h=this.o.minHeight?this.getVal(this.o.minHeight,"h"):"auto",d=d?this.o.autoResize&&d>c?c:d<h?h:d:f?f>c?c:this.o.minHeight&&
|
||||||
|
"auto"!==h&&f<h?h:f:h,c=this.o.minWidth?this.getVal(this.o.minWidth,"w"):"auto",a=a?this.o.autoResize&&a>e?e:a<c?c:a:g?g>e?e:this.o.minWidth&&"auto"!==c&&g<c?c:g:c;this.d.container.css({height:d,width:a});this.d.wrap.css({overflow:f>d||g>a?"auto":"visible"});this.o.autoPosition&&this.setPosition()},setPosition:function(){var a,b;a=i[0]/2-this.d.container.outerHeight(!0)/2;b=i[1]/2-this.d.container.outerWidth(!0)/2;var f="fixed"!==this.d.container.css("position")?h.scrollTop():0;this.o.position&&"[object Array]"===
|
||||||
|
Object.prototype.toString.call(this.o.position)?(a=f+(this.o.position[0]||a),b=this.o.position[1]||b):a=f+a;this.d.container.css({left:b,top:a})},watchTab:function(a){if(0<b(a.target).parents(".simplemodal-container").length){if(this.inputs=b(":input:enabled:visible:first, :input:enabled:visible:last",this.d.data[0]),!a.shiftKey&&a.target===this.inputs[this.inputs.length-1]||a.shiftKey&&a.target===this.inputs[0]||0===this.inputs.length)a.preventDefault(),this.focus(a.shiftKey?"last":"first")}else a.preventDefault(),
|
||||||
|
this.focus()},open:function(){this.d.iframe&&this.d.iframe.show();b.isFunction(this.o.onOpen)?this.o.onOpen.apply(this,[this.d]):(this.d.overlay.show(),this.d.container.show(),this.d.data.show());this.o.focus&&this.focus();this.bindEvents()},close:function(){if(!this.d.data)return!1;this.unbindEvents();if(b.isFunction(this.o.onClose)&&!this.occb)this.occb=!0,this.o.onClose.apply(this,[this.d]);else{if(this.d.placeholder){var a=b("#simplemodal-placeholder");this.o.persist?a.replaceWith(this.d.data.removeClass("simplemodal-data").css("display",
|
||||||
|
this.display)):(this.d.data.hide().remove(),a.replaceWith(this.d.orig))}else this.d.data.hide().remove();this.d.container.hide().remove();this.d.overlay.hide();this.d.iframe&&this.d.iframe.hide().remove();this.d.overlay.remove();this.d={}}}}});
|
||||||
51
js/jquery.validate.min.js
vendored
Normal file
51
js/jquery.validate.min.js
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* jQuery Validation Plugin 1.9.0
|
||||||
|
*
|
||||||
|
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
|
||||||
|
* http://docs.jquery.com/Plugins/Validation
|
||||||
|
*
|
||||||
|
* Copyright (c) 2006 - 2011 Jörn Zaefferer
|
||||||
|
*
|
||||||
|
* Dual licensed under the MIT and GPL licenses:
|
||||||
|
* http://www.opensource.org/licenses/mit-license.php
|
||||||
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
|
*/
|
||||||
|
(function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;this.attr("novalidate","novalidate");b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){a=this.find("input, button");a.filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&a.filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("<input type='hidden'/>").attr("name",
|
||||||
|
b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form();
|
||||||
|
else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name];
|
||||||
|
return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a,
|
||||||
|
b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
|
||||||
|
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)},
|
||||||
|
onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults,
|
||||||
|
a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."),
|
||||||
|
minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator"),g="on"+e.type.replace(/^validate/,
|
||||||
|
"");f.settings[g]&&f.settings[g].call(f,this[0],e)}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=
|
||||||
|
this.settings.rules;c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate("[type='text'], [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",a).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",
|
||||||
|
a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=
|
||||||
|
a=this.validationTargetFor(this.clean(a));this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap,a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?
|
||||||
|
this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==
|
||||||
|
0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name==a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
|
||||||
|
a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
|
||||||
|
prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.validationTargetFor(this.clean(a));var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g=c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+
|
||||||
|
a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d=this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(arguments[a]!==undefined)return arguments[a]},defaultMessage:function(a,
|
||||||
|
b){return this.findDefined(this.customMessage(a.name,b),this.customMetaMessage(a,b),!this.settings.ignoreTitle&&a.title||undefined,c.validator.messages[b],"<strong>Warning: No message defined for "+a.name+"</strong>")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=
|
||||||
|
d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);
|
||||||
|
if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass(this.settings.validClass).addClass(this.settings.errorClass);
|
||||||
|
d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b||"");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=
|
||||||
|
this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(a){if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];return a},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,
|
||||||
|
e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,
|
||||||
|
c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
|
||||||
|
false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,
|
||||||
|
a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b={};a=c(a);for(var d in c.validator.methods){var e;if(e=d==="required"&&typeof c.fn.prop==="function"?a.prop(d):a.attr(d))b[d]=e;else if(a[0].getAttribute("type")===d)b[d]=true}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};
|
||||||
|
var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e===false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?
|
||||||
|
e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&&a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;
|
||||||
|
return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))},methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,
|
||||||
|
b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote=e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,
|
||||||
|
mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]=e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,
|
||||||
|
b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)||a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(a)},
|
||||||
|
url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},
|
||||||
|
date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 -]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>=
|
||||||
|
0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery);
|
||||||
|
(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery);
|
||||||
|
(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a,
|
||||||
|
b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery);
|
||||||
19
js/tasacion.js
Normal file
19
js/tasacion.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
jQuery(function ($) {
|
||||||
|
$('#form .modal').click(function (e) {
|
||||||
|
$('#condiciones').modal();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$.extend($.validator.messages, {
|
||||||
|
required: "Este campo es obligatorio",
|
||||||
|
email: "Indique una dirección de email válida"
|
||||||
|
});
|
||||||
|
|
||||||
|
$().ready(function() {
|
||||||
|
$("#form").validate({
|
||||||
|
messages: {
|
||||||
|
agree: "Para continuar, acepte las condiciones legales"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
243
tasacion.php
Normal file
243
tasacion.php
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
<?php
|
||||||
|
// Pear library includes
|
||||||
|
// You should have the pear lib installed
|
||||||
|
|
||||||
|
include_once('Mail.php');
|
||||||
|
include_once('Mail/mime.php');
|
||||||
|
|
||||||
|
//Settings
|
||||||
|
$max_allowed_file_size = 10000; // size in KB
|
||||||
|
$allowed_extensions = array("pdf", "jpg", "jpeg", "png");
|
||||||
|
$your_email = 'info@irfinearts.com';
|
||||||
|
$ip=$_SERVER['REMOTE_ADDR'];
|
||||||
|
$today=date('Y.m.d');
|
||||||
|
$now=date('H.i.s');
|
||||||
|
$upload_folder = '/home/finearts/public_html/tmp/tasacion-' . $today . '-' . $now . '-' . $ip . '/';
|
||||||
|
$errors = '';
|
||||||
|
|
||||||
|
if(isset($_POST['submit']))
|
||||||
|
{
|
||||||
|
//Get the uploaded file information
|
||||||
|
$name_of_uploaded_file = basename($_FILES['uploaded_file']['name']);
|
||||||
|
|
||||||
|
//get the file extension of the file
|
||||||
|
$type_of_uploaded_file = substr($name_of_uploaded_file, strrpos($name_of_uploaded_file, '.') + 1);
|
||||||
|
|
||||||
|
$size_of_uploaded_file = $_FILES["uploaded_file"]["size"]/1024;
|
||||||
|
|
||||||
|
///------------Do Validations-------------
|
||||||
|
if(empty($_POST['nombre']) || empty($_POST['apellidos']) || empty($_POST['telefono']) ||
|
||||||
|
empty($_POST['pais']) || empty($_POST['email']))
|
||||||
|
{
|
||||||
|
$errors .= "\n Faltan campos obligatorios. ";
|
||||||
|
}
|
||||||
|
|
||||||
|
$nombre = $_POST['nombre'];
|
||||||
|
$apellidos = $_POST['apellidos'];
|
||||||
|
$telefono = $_POST['telefono'];
|
||||||
|
$pais = $_POST['pais'];
|
||||||
|
$email = $_POST['email'];
|
||||||
|
$autor = $_POST['autor'];
|
||||||
|
$tecnica = $_POST['tecnica'];
|
||||||
|
$observaciones = $_POST['observaciones'];
|
||||||
|
|
||||||
|
if(IsInjected($email))
|
||||||
|
{
|
||||||
|
$errors .= "\n Email no válido.";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($size_of_uploaded_file > $max_allowed_file_size )
|
||||||
|
{
|
||||||
|
$errors .= "\n El fichero no debe tener como máximo un tamaño de $max_allowed_file_size";
|
||||||
|
}
|
||||||
|
|
||||||
|
//------ Validate the file extension -----
|
||||||
|
$allowed_ext = false;
|
||||||
|
for($i=0; $i<sizeof($allowed_extensions); $i++)
|
||||||
|
{
|
||||||
|
if(strcasecmp($allowed_extensions[$i],$type_of_uploaded_file) == 0)
|
||||||
|
{
|
||||||
|
$allowed_ext = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$allowed_ext)
|
||||||
|
{
|
||||||
|
$errors .= "\n El tipo de fichero no está permitido. ".
|
||||||
|
" Sólo se permiten ficheros con las extensiones : ".implode(',',$allowed_extensions);
|
||||||
|
}
|
||||||
|
|
||||||
|
//send the email
|
||||||
|
if(empty($errors))
|
||||||
|
{
|
||||||
|
if (!mkdir($upload_folder, 0777, true)) {
|
||||||
|
die('Fallo al crear carpeta '.$upload_folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
//copy the temp. uploaded file to uploads folder
|
||||||
|
$path_of_uploaded_file = $upload_folder . $name_of_uploaded_file;
|
||||||
|
$tmp_path = $_FILES["uploaded_file"]["tmp_name"];
|
||||||
|
|
||||||
|
if(is_uploaded_file($tmp_path))
|
||||||
|
{
|
||||||
|
if(!copy($tmp_path,$path_of_uploaded_file))
|
||||||
|
{
|
||||||
|
$errors .= '\n error mientras se transfería el archivo.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//send the email
|
||||||
|
$to = $your_email;
|
||||||
|
$subject="Nueva solicitud de tasación de obra";
|
||||||
|
$from = $email;
|
||||||
|
|
||||||
|
$text = "<html><body>";
|
||||||
|
$text .= "<p>Se ha recibido una solicitud de tasación a través del formulario de la web www.irfinearts.com</p>";
|
||||||
|
$text .= "<p>";
|
||||||
|
$text .= "Nombre: ".$nombre."<br/>";
|
||||||
|
$text .= "Apellidos: ".$apellidos."<br/>";
|
||||||
|
$text .= "Teléfono: ".$telefono."<br/>";
|
||||||
|
$text .= "País: ".$pais."<br/>";
|
||||||
|
$text .= "Email: ".$email."<br/>";
|
||||||
|
$text .= "<br/>Datos de la obra<br/>";
|
||||||
|
$text .= "Autor: ".$autor."<br/>";
|
||||||
|
$text .= "Técnica: ".$tecnica."<br/>";
|
||||||
|
$text .= "Observaciones: ".$observaciones."<br/>";
|
||||||
|
$text .= "</p>";
|
||||||
|
$text .= "</body></html>";
|
||||||
|
|
||||||
|
$message = new Mail_mime();
|
||||||
|
$message->setTXTBody(strip_tags($text));
|
||||||
|
$message->setHTMLBody($text);
|
||||||
|
$message->addAttachment($path_of_uploaded_file);
|
||||||
|
|
||||||
|
$body = $message->get(array('text_charset' => 'utf-8'));
|
||||||
|
|
||||||
|
$extraheaders = array("From"=>$from, "Subject"=>$subject,"Reply-To"=>$email);
|
||||||
|
$headers = $message->headers($extraheaders);
|
||||||
|
|
||||||
|
$mail = Mail::factory("mail");
|
||||||
|
$mail->send($to, $headers, $body);
|
||||||
|
//redirect
|
||||||
|
sleep(1);
|
||||||
|
header('Location: confirmacion.php');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
///////////////////////////Functions/////////////////
|
||||||
|
// Function to validate against any email injection attempts
|
||||||
|
function IsInjected($str)
|
||||||
|
{
|
||||||
|
$injections = array('(\n+)',
|
||||||
|
'(\r+)',
|
||||||
|
'(\t+)',
|
||||||
|
'(%0A+)',
|
||||||
|
'(%0D+)',
|
||||||
|
'(%08+)',
|
||||||
|
'(%09+)'
|
||||||
|
);
|
||||||
|
$inject = join('|', $injections);
|
||||||
|
$inject = "/$inject/i";
|
||||||
|
if(preg_match($inject,$str))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<?php include("_cabecera.php"); ?>
|
||||||
|
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/jquery.simplemodal.1.4.2.min.js"></script>
|
||||||
|
<script type="text/javascript" src="js/tasacion.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" media="all" href="/form.css" />
|
||||||
|
<title>Tasación y venta de obras de arte | Galería de Arte Ignacio Redondo, Madrid</title>
|
||||||
|
</head>
|
||||||
|
<body onload="initialize()">
|
||||||
|
<div id="vertical"></div>
|
||||||
|
<div id="container">
|
||||||
|
<div id="header">
|
||||||
|
<h1>Ignacio Redondo</h1>
|
||||||
|
<h2>Galería de Arte</h2>
|
||||||
|
|
||||||
|
<?php include("_menu.php"); ?>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<div class="tasacion">
|
||||||
|
<div class="descripcion float-left">
|
||||||
|
<h2>Tasación de obras de arte</h2>
|
||||||
|
<strong>Profesionalidad. Discreción. Independencia</strong>
|
||||||
|
<p>Somos expertos en la <strong>valoración, peritaje y tasación de obras de arte</strong>.
|
||||||
|
Más concretamente en la pintura, escultura y artes decorativas. Trabajamos para las principales instituciones, empresas y coleccionistas privados de España, Francia, Inglaterra y Estados Unidos.
|
||||||
|
Nuestra discreción y total independencia de criterio son intrínsecos a nuestra calidad de servicio.</p>
|
||||||
|
<p>Realizamos estimaciones de valor, informes de tasación y peritajes de bienes de valor artístico. Como expertos también ofrecemos la gestión de certificados de autenticación para aquellas obras que lo precisen.</p>
|
||||||
|
<p>Asesoramos las principales operaciones de compra de instituciones culturales y de inversión. Actuamos como consultores independientes de los mayores coleccionistas privados. Valoramos obra para incluirla en el activo de empresas y como garantía en operaciones crediticias con entidades financieras. Nuestros informes son también solicitados por compañías aseguradoras y por particulares en reclamaciones de daños.</p>
|
||||||
|
<p>La valoración de activos artísticos es una necesidad muy común para resolver sin conflictos herencias, sucesiones, donaciones, el pago del impuesto de transmisiones, para distribuir bienes en caso de separación o como paso previo antes de una subasta.</p>
|
||||||
|
<p>También nos ocupamos por encargo de la <strong>comercialización y venta en exclusiva de obras de arte</strong> tanto en nuestro país como en los mercados internacionales en los que la obra puede tener un mayor valor. Los principales actores del mercado del arte mundial conocen la excelente calidad y singularidad de las obras que representamos: coleccionistas privados (particulares y empresas), museos e instituciones, ferias especializadas, galeristas y casas de subastas. No lo dude, con nuestra galería multiplicará sus oportunidades de venta en un tiempo récord.</p>
|
||||||
|
</div>
|
||||||
|
<div class="formulario float-right">
|
||||||
|
|
||||||
|
<p><strong>FORMULARIO DE CONTACTO.</strong>
|
||||||
|
<?php
|
||||||
|
if(!empty($errors)) {
|
||||||
|
echo "<span class='error'>";
|
||||||
|
echo nl2br($errors);
|
||||||
|
echo "</span>";
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
Llámenos o rellene por favor el formulario.
|
||||||
|
Le garantizamos la máxima discreción y confidencialidad de los datos que nos precise.
|
||||||
|
Seleccione una imagen de la obra de arte para la que requiere tasación.
|
||||||
|
Admitimos documentos de <strong>hasta 10 MB</strong> en formato <strong>PDF, JPEG, JPG y PNG</strong>.
|
||||||
|
<?php } ?>
|
||||||
|
</p>
|
||||||
|
<form id="form" method="post" name="tasacion" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" enctype="multipart/form-data">
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>Datos de la obra</legend>
|
||||||
|
<label for='uploaded_file'>Archivo*</label>
|
||||||
|
<input id="fileName" class="file_input_textbox required" readonly />
|
||||||
|
<div class="file_input_div">
|
||||||
|
<input type="button" value="Examinar..." class="file_input_button" />
|
||||||
|
<input type="file" class="file_input_hidden" name="uploaded_file" onchange="javascript: document.getElementById('fileName').value = this.value"/>
|
||||||
|
</div><br/>
|
||||||
|
<label for='autor'>Autor </label>
|
||||||
|
<input type="text" name="autor" value="<?php echo $autor; ?>"/><br/>
|
||||||
|
<label for='tecnica'>Técnica </label>
|
||||||
|
<input type="text" name="tecnica" value="<?php echo $tecnica; ?>"/><br/>
|
||||||
|
<label for='observaciones'>Observaciones</label>
|
||||||
|
<textarea name="observaciones"><?php echo $observaciones; ?></textarea><br/>
|
||||||
|
<legend>Datos del autor</legend>
|
||||||
|
<label for='nombre'>Nombre*</label>
|
||||||
|
<input type="text" name="nombre" class="required" value="<?php echo $nombre; ?>"/><br/>
|
||||||
|
<label for='apellidos'>Apellidos*</label>
|
||||||
|
<input type="text" name="apellidos" class="required" value="<?php echo $apellidos; ?>"/><br/>
|
||||||
|
<label for='telefono'>Teléfono*</label>
|
||||||
|
<input type="text" name="telefono" class="required" value="<?php echo $telefono; ?>"/><br/>
|
||||||
|
<label for='pais'>País*</label>
|
||||||
|
<input type="text" name="pais" class="required" value="<?php echo $pais; ?>"/><br/>
|
||||||
|
<label for='email'>Email*</label>
|
||||||
|
<input type="email" name="email" class="required email" value="<?php echo $email; ?>"><br/>
|
||||||
|
<input type="checkbox" name="agree" id="agree" class="required checkbox"><label class="agree_label" for="agree">* He leído y acepto <a class="modal" href="#">las condiciones legales.</a></label><br/>
|
||||||
|
<input type="submit" value="Enviar" name='submit' class="boton float-right">
|
||||||
|
<p class="float-left error">Los campos marcados con * son obligatorios.</p>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id="condiciones">
|
||||||
|
<strong>CONDICIONES LEGALES</strong>
|
||||||
|
<p>El interesado consiente expresamente que los datos facilitados en este cuestionario, incluyendo su dirección de correo electrónico y teléfono móvil, sean introducidos en la base de datos de IGNACIO REDONDO FINE ARTS, SL, pudiendo ser utilizados para facilitarle la información o servicios solicitados y para futuras acciones publicitarias, promocionales o de marketing de la galería. Los datos marcados como obligatorios son necesarios para poder atender a su solicitud, el resto de datos son voluntarios y su solicitud será atendida aunque no se hayan cumplimentado. IGNACIO REDONDO FINE ARTS, SL garantiza la confidencialidad de sus datos personales y se compromete a no cederlos a ninguna persona o entidad ajena a la galería. De acuerdo con la Ley Orgánica 15/1.999 de 13 de diciembre de Protección de Datos de Carácter Personal, podrá dirigirse en cualquier momento por escrito, a IGNACIO REDONDO FINE ARTS, SL (Orellana, 4; 28004 Madrid) para acceder a sus datos, rectificarlos, cancelarlos u oponerse a su utilización o cesión, así como para revocar su consentimiento para la recepción de comunicaciones comerciales por correo electrónico o mensajes SMS, de conformidad con la Ley de Servicios de la Sociedad de la Información y de Comercio Electrónico.<br/>
|
||||||
|
<center><input type="button" value="Aceptar" class="simplemodal-close" /></center></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php include("_pie.php"); ?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue
Block a user