Version Description
- Fixed: Add the additional headers only when they are not empty.
- Fixed: Don't load hidden files in the modules folder.
- The jQuery Form Plugin (jquery.form.js) has been updated to 3.23.
- Irish translation has been created by Vikas Arora.
- Translations for German, Thai, Hungarian and Tagalog have been updated.
Download this release
Release Info
Developer | takayukister |
Plugin | Contact Form 7 |
Version | 3.3.2 |
Comparing to | |
See all releases |
Code changes from version 3.3.1 to 3.3.2
- includes/classes.php +4 -1
- includes/controller.php +1 -1
- includes/functions.php +1 -0
- includes/js/jquery.form.js +28 -13
- includes/js/jquery.form.min.js +2 -2
- languages/wpcf7-de_DE.mo +0 -0
- languages/wpcf7-ga_IE.mo +0 -0
- languages/wpcf7-hu_HU.mo +0 -0
- languages/wpcf7-ja.mo +0 -0
- languages/wpcf7-th.mo +0 -0
- languages/wpcf7-tl.mo +0 -0
- languages/wpcf7.pot +34 -30
- readme.txt +25 -8
- settings.php +1 -1
- wp-contact-form-7.php +2 -2
includes/classes.php
CHANGED
@@ -541,7 +541,10 @@ class WPCF7_ContactForm {
|
|
541 |
if ( $use_html )
|
542 |
$headers .= "Content-Type: text/html\n";
|
543 |
|
544 |
-
$
|
|
|
|
|
|
|
545 |
|
546 |
if ( $send )
|
547 |
return @wp_mail( $recipient, $subject, $body, $headers, $attachments );
|
541 |
if ( $use_html )
|
542 |
$headers .= "Content-Type: text/html\n";
|
543 |
|
544 |
+
$additional_headers = trim( $additional_headers );
|
545 |
+
|
546 |
+
if ( $additional_headers )
|
547 |
+
$headers .= $additional_headers . "\n";
|
548 |
|
549 |
if ( $send )
|
550 |
return @wp_mail( $recipient, $subject, $body, $headers, $attachments );
|
includes/controller.php
CHANGED
@@ -228,7 +228,7 @@ function wpcf7_enqueue_scripts() {
|
|
228 |
wp_deregister_script( 'jquery-form' );
|
229 |
wp_register_script( 'jquery-form',
|
230 |
wpcf7_plugin_url( 'includes/js/jquery.form.min.js' ),
|
231 |
-
array( 'jquery' ), '3.
|
232 |
|
233 |
$in_footer = true;
|
234 |
if ( 'header' === WPCF7_LOAD_JS )
|
228 |
wp_deregister_script( 'jquery-form' );
|
229 |
wp_register_script( 'jquery-form',
|
230 |
wpcf7_plugin_url( 'includes/js/jquery.form.min.js' ),
|
231 |
+
array( 'jquery' ), '3.23', true );
|
232 |
|
233 |
$in_footer = true;
|
234 |
if ( 'header' === WPCF7_LOAD_JS )
|
includes/functions.php
CHANGED
@@ -222,6 +222,7 @@ function wpcf7_l10n() {
|
|
222 |
'hi_IN' => __( 'Hindi', 'wpcf7' ),
|
223 |
'hu_HU' => __( 'Hungarian', 'wpcf7' ),
|
224 |
'id_ID' => __( 'Indonesian', 'wpcf7' ),
|
|
|
225 |
'it_IT' => __( 'Italian', 'wpcf7' ),
|
226 |
'ja' => __( 'Japanese', 'wpcf7' ),
|
227 |
'ko_KR' => __( 'Korean', 'wpcf7' ),
|
222 |
'hi_IN' => __( 'Hindi', 'wpcf7' ),
|
223 |
'hu_HU' => __( 'Hungarian', 'wpcf7' ),
|
224 |
'id_ID' => __( 'Indonesian', 'wpcf7' ),
|
225 |
+
'ga_IE' => __( 'Irish', 'wpcf7' ),
|
226 |
'it_IT' => __( 'Italian', 'wpcf7' ),
|
227 |
'ja' => __( 'Japanese', 'wpcf7' ),
|
228 |
'ko_KR' => __( 'Korean', 'wpcf7' ),
|
includes/js/jquery.form.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* jQuery Form Plugin
|
3 |
-
* version: 3.
|
4 |
* @requires jQuery v1.5 or later
|
5 |
*
|
6 |
* Examples and documentation at: http://malsup.com/jquery/form/
|
@@ -172,7 +172,11 @@ $.fn.ajaxSubmit = function(options) {
|
|
172 |
};
|
173 |
|
174 |
// are there files to upload?
|
175 |
-
|
|
|
|
|
|
|
|
|
176 |
var hasFileInputs = fileInputs.length > 0;
|
177 |
var mp = 'multipart/form-data';
|
178 |
var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
|
@@ -221,6 +225,8 @@ $.fn.ajaxSubmit = function(options) {
|
|
221 |
var result = {};
|
222 |
var i, part;
|
223 |
for (i=0; i < len; i++) {
|
|
|
|
|
224 |
part = serialized[i].split('=');
|
225 |
result[decodeURIComponent(part[0])] = decodeURIComponent(part[1]);
|
226 |
}
|
@@ -286,7 +292,7 @@ $.fn.ajaxSubmit = function(options) {
|
|
286 |
var useProp = !!$.fn.prop;
|
287 |
var deferred = $.Deferred();
|
288 |
|
289 |
-
if ($('
|
290 |
// if there is an input with a name or id of 'submit' then we won't be
|
291 |
// able to invoke the submit fn on the form (at least not x-browser)
|
292 |
alert('Error: Form elements must not have name or id of "submit".');
|
@@ -336,12 +342,14 @@ $.fn.ajaxSubmit = function(options) {
|
|
336 |
var e = (status === 'timeout' ? 'timeout' : 'aborted');
|
337 |
log('aborting upload... ' + e);
|
338 |
this.aborted = 1;
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
io.contentWindow.document.execCommand('Stop');
|
343 |
-
}
|
344 |
-
}
|
|
|
|
|
345 |
$io.attr('src', s.iframeSrc); // abort op in progress
|
346 |
xhr.error = e;
|
347 |
if (s.error)
|
@@ -764,9 +772,9 @@ function captureSubmittingElement(e) {
|
|
764 |
/*jshint validthis:true */
|
765 |
var target = e.target;
|
766 |
var $el = $(target);
|
767 |
-
if (!($el.is("
|
768 |
// is this a child element of the submit el? (ex: a span within a button)
|
769 |
-
var t = $el.closest('
|
770 |
if (t.length === 0) {
|
771 |
return;
|
772 |
}
|
@@ -924,19 +932,19 @@ $.fn.fieldSerialize = function(successful) {
|
|
924 |
* <input name="C" type="radio" value="C2" />
|
925 |
* </fieldset></form>
|
926 |
*
|
927 |
-
* var v = $('
|
928 |
* // if no values are entered into the text inputs
|
929 |
* v == ['','']
|
930 |
* // if values entered into the text inputs are 'foo' and 'bar'
|
931 |
* v == ['foo','bar']
|
932 |
*
|
933 |
-
* var v = $('
|
934 |
* // if neither checkbox is checked
|
935 |
* v === undefined
|
936 |
* // if both checkboxes are checked
|
937 |
* v == ['B1', 'B2']
|
938 |
*
|
939 |
-
* var v = $('
|
940 |
* // if neither radio is checked
|
941 |
* v === undefined
|
942 |
* // if first radio is checked
|
@@ -1037,6 +1045,13 @@ $.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
|
|
1037 |
else if (tag == 'select') {
|
1038 |
this.selectedIndex = -1;
|
1039 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1040 |
else if (includeHidden) {
|
1041 |
// includeHidden can be the value true, or it can be a selector string
|
1042 |
// indicating a special test; for example:
|
1 |
/*!
|
2 |
* jQuery Form Plugin
|
3 |
+
* version: 3.23 (11-DEC-2012)
|
4 |
* @requires jQuery v1.5 or later
|
5 |
*
|
6 |
* Examples and documentation at: http://malsup.com/jquery/form/
|
172 |
};
|
173 |
|
174 |
// are there files to upload?
|
175 |
+
|
176 |
+
// [value] (issue #113), also see comment:
|
177 |
+
// https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
|
178 |
+
var fileInputs = $('input[type=file]:enabled[value!=""]', this);
|
179 |
+
|
180 |
var hasFileInputs = fileInputs.length > 0;
|
181 |
var mp = 'multipart/form-data';
|
182 |
var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
|
225 |
var result = {};
|
226 |
var i, part;
|
227 |
for (i=0; i < len; i++) {
|
228 |
+
// #252; undo param space replacement
|
229 |
+
serialized[i] = serialized[i].replace(/\+/g,' ');
|
230 |
part = serialized[i].split('=');
|
231 |
result[decodeURIComponent(part[0])] = decodeURIComponent(part[1]);
|
232 |
}
|
292 |
var useProp = !!$.fn.prop;
|
293 |
var deferred = $.Deferred();
|
294 |
|
295 |
+
if ($('[name=submit],[id=submit]', form).length) {
|
296 |
// if there is an input with a name or id of 'submit' then we won't be
|
297 |
// able to invoke the submit fn on the form (at least not x-browser)
|
298 |
alert('Error: Form elements must not have name or id of "submit".');
|
342 |
var e = (status === 'timeout' ? 'timeout' : 'aborted');
|
343 |
log('aborting upload... ' + e);
|
344 |
this.aborted = 1;
|
345 |
+
|
346 |
+
try { // #214, #257
|
347 |
+
if (io.contentWindow.document.execCommand) {
|
348 |
io.contentWindow.document.execCommand('Stop');
|
349 |
+
}
|
350 |
+
}
|
351 |
+
catch(ignore) {}
|
352 |
+
|
353 |
$io.attr('src', s.iframeSrc); // abort op in progress
|
354 |
xhr.error = e;
|
355 |
if (s.error)
|
772 |
/*jshint validthis:true */
|
773 |
var target = e.target;
|
774 |
var $el = $(target);
|
775 |
+
if (!($el.is("[type=submit],[type=image]"))) {
|
776 |
// is this a child element of the submit el? (ex: a span within a button)
|
777 |
+
var t = $el.closest('[type=submit]');
|
778 |
if (t.length === 0) {
|
779 |
return;
|
780 |
}
|
932 |
* <input name="C" type="radio" value="C2" />
|
933 |
* </fieldset></form>
|
934 |
*
|
935 |
+
* var v = $('input[type=text]').fieldValue();
|
936 |
* // if no values are entered into the text inputs
|
937 |
* v == ['','']
|
938 |
* // if values entered into the text inputs are 'foo' and 'bar'
|
939 |
* v == ['foo','bar']
|
940 |
*
|
941 |
+
* var v = $('input[type=checkbox]').fieldValue();
|
942 |
* // if neither checkbox is checked
|
943 |
* v === undefined
|
944 |
* // if both checkboxes are checked
|
945 |
* v == ['B1', 'B2']
|
946 |
*
|
947 |
+
* var v = $('input[type=radio]').fieldValue();
|
948 |
* // if neither radio is checked
|
949 |
* v === undefined
|
950 |
* // if first radio is checked
|
1045 |
else if (tag == 'select') {
|
1046 |
this.selectedIndex = -1;
|
1047 |
}
|
1048 |
+
else if (t == "file") {
|
1049 |
+
if ($.browser.msie) {
|
1050 |
+
$(this).replaceWith($(this).clone());
|
1051 |
+
} else {
|
1052 |
+
$(this).val('');
|
1053 |
+
}
|
1054 |
+
}
|
1055 |
else if (includeHidden) {
|
1056 |
// includeHidden can be the value true, or it can be a selector string
|
1057 |
// indicating a special test; for example:
|
includes/js/jquery.form.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* jQuery Form Plugin
|
3 |
-
* version: 3.
|
4 |
* @requires jQuery v1.5 or later
|
5 |
*
|
6 |
* Examples and documentation at: http://malsup.com/jquery/form/
|
@@ -9,4 +9,4 @@
|
|
9 |
* http://malsup.github.com/mit-license.txt
|
10 |
* http://malsup.github.com/gpl-license-v2.txt
|
11 |
*/
|
12 |
-
(function(e){var c={};c.fileapi=e("<input type='file'/>").get(0).files!==undefined;c.formdata=window.FormData!==undefined;e.fn.ajaxSubmit=function(h){if(!this.length){d("ajaxSubmit: skipping submit process - no element selected");return this}var g,y,j,m=this;if(typeof h=="function"){h={success:h}}g=this.attr("method");y=this.attr("action");j=(typeof y==="string")?e.trim(y):"";j=j||window.location.href||"";if(j){j=(j.match(/^([^#]+)/)||[])[1]}h=e.extend(true,{url:j,success:e.ajaxSettings.success,type:g||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},h);var s={};this.trigger("form-pre-serialize",[this,h,s]);if(s.veto){d("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(h.beforeSerialize&&h.beforeSerialize(this,h)===false){d("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var l=h.traditional;if(l===undefined){l=e.ajaxSettings.traditional}var p=[];var B,C=this.formToArray(h.semantic,p);if(h.data){h.extraData=h.data;B=e.param(h.data,l)}if(h.beforeSubmit&&h.beforeSubmit(C,this,h)===false){d("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[C,this,h,s]);if(s.veto){d("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var w=e.param(C,l);if(B){w=(w?(w+"&"+B):B)}if(h.type.toUpperCase()=="GET"){h.url+=(h.url.indexOf("?")>=0?"&":"?")+w;h.data=null}else{h.data=w}var E=[];if(h.resetForm){E.push(function(){m.resetForm()})}if(h.clearForm){E.push(function(){m.clearForm(h.includeHidden)})}if(!h.dataType&&h.target){var i=h.success||function(){};E.push(function(q){var k=h.replaceTarget?"replaceWith":"html";e(h.target)[k](q).each(i,arguments)})}else{if(h.success){E.push(h.success)}}h.success=function(H,q,I){var G=h.context||this;for(var F=0,k=E.length;F<k;F++){E[F].apply(G,[H,q,I||m,m])}};var A=e("input:file:enabled[value]",this);var n=A.length>0;var z="multipart/form-data";var v=(m.attr("enctype")==z||m.attr("encoding")==z);var u=c.fileapi&&c.formdata;d("fileAPI :"+u);var o=(n||v)&&!u;var t;if(h.iframe!==false&&(h.iframe||o)){if(h.closeKeepAlive){e.get(h.closeKeepAlive,function(){t=D(C)})}else{t=D(C)}}else{if((n||v)&&u){t=r(C)}else{t=e.ajax(h)}}m.removeData("jqxhr").data("jqxhr",t);for(var x=0;x<p.length;x++){p[x]=null}this.trigger("form-submit-notify",[this,h]);return this;function f(H){var I=e.param(H).split("&");var q=I.length;var k={};var G,F;for(G=0;G<q;G++){F=I[G].split("=");k[decodeURIComponent(F[0])]=decodeURIComponent(F[1])}return k}function r(q){var k=new FormData();for(var F=0;F<q.length;F++){k.append(q[F].name,q[F].value)}if(h.extraData){var I=f(h.extraData);for(var J in I){if(I.hasOwnProperty(J)){k.append(J,I[J])}}}h.data=null;var H=e.extend(true,{},e.ajaxSettings,h,{contentType:false,processData:false,cache:false,type:g||"POST"});if(h.uploadProgress){H.xhr=function(){var K=jQuery.ajaxSettings.xhr();if(K.upload){K.upload.onprogress=function(O){var N=0;var L=O.loaded||O.position;var M=O.total;if(O.lengthComputable){N=Math.ceil(L/M*100)}h.uploadProgress(O,L,M,N)}}return K}}H.data=null;var G=H.beforeSend;H.beforeSend=function(L,K){K.data=k;if(G){G.call(this,L,K)}};return e.ajax(H)}function D(ad){var I=m[0],H,Z,T,ab,W,K,O,M,N,X,aa,R;var L=!!e.fn.prop;var ag=e.Deferred();if(e(":input[name=submit],:input[id=submit]",I).length){alert('Error: Form elements must not have name or id of "submit".');ag.reject();return ag}if(ad){for(Z=0;Z<p.length;Z++){H=e(p[Z]);if(L){H.prop("disabled",false)}else{H.removeAttr("disabled")}}}T=e.extend(true,{},e.ajaxSettings,h);T.context=T.context||T;W="jqFormIO"+(new Date().getTime());if(T.iframeTarget){K=e(T.iframeTarget);X=K.attr("name");if(!X){K.attr("name",W)}else{W=X}}else{K=e('<iframe name="'+W+'" src="'+T.iframeSrc+'" />');K.css({position:"absolute",top:"-1000px",left:"-1000px"})}O=K[0];M={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(ah){var ai=(ah==="timeout"?"timeout":"aborted");d("aborting upload... "+ai);this.aborted=1;if(O.contentWindow.document.execCommand){try{O.contentWindow.document.execCommand("Stop")}catch(aj){}}K.attr("src",T.iframeSrc);M.error=ai;if(T.error){T.error.call(T.context,M,ai,ah)}if(ab){e.event.trigger("ajaxError",[M,T,ai])}if(T.complete){T.complete.call(T.context,M,ai)}}};ab=T.global;if(ab&&0===e.active++){e.event.trigger("ajaxStart")}if(ab){e.event.trigger("ajaxSend",[M,T])}if(T.beforeSend&&T.beforeSend.call(T.context,M,T)===false){if(T.global){e.active--}ag.reject();return ag}if(M.aborted){ag.reject();return ag}N=I.clk;if(N){X=N.name;if(X&&!N.disabled){T.extraData=T.extraData||{};T.extraData[X]=N.value;if(N.type=="image"){T.extraData[X+".x"]=I.clk_x;T.extraData[X+".y"]=I.clk_y}}}var S=1;var P=2;function Q(ai){var ah=ai.contentWindow?ai.contentWindow.document:ai.contentDocument?ai.contentDocument:ai.document;return ah}var G=e("meta[name=csrf-token]").attr("content");var F=e("meta[name=csrf-param]").attr("content");if(F&&G){T.extraData=T.extraData||{};T.extraData[F]=G}function Y(){var aj=m.attr("target"),ah=m.attr("action");I.setAttribute("target",W);if(!g){I.setAttribute("method","POST")}if(ah!=T.url){I.setAttribute("action",T.url)}if(!T.skipEncodingOverride&&(!g||/post/i.test(g))){m.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(T.timeout){R=setTimeout(function(){aa=true;V(S)},T.timeout)}function ak(){try{var am=Q(O).readyState;d("state = "+am);if(am&&am.toLowerCase()=="uninitialized"){setTimeout(ak,50)}}catch(an){d("Server abort: ",an," (",an.name,")");V(P);if(R){clearTimeout(R)}R=undefined}}var ai=[];try{if(T.extraData){for(var al in T.extraData){if(T.extraData.hasOwnProperty(al)){if(e.isPlainObject(T.extraData[al])&&T.extraData[al].hasOwnProperty("name")&&T.extraData[al].hasOwnProperty("value")){ai.push(e('<input type="hidden" name="'+T.extraData[al].name+'">').attr("value",T.extraData[al].value).appendTo(I)[0])}else{ai.push(e('<input type="hidden" name="'+al+'">').attr("value",T.extraData[al]).appendTo(I)[0])}}}}if(!T.iframeTarget){K.appendTo("body");if(O.attachEvent){O.attachEvent("onload",V)}else{O.addEventListener("load",V,false)}}setTimeout(ak,15);I.submit()}finally{I.setAttribute("action",ah);if(aj){I.setAttribute("target",aj)}else{m.removeAttr("target")}e(ai).remove()}}if(T.forceSync){Y()}else{setTimeout(Y,10)}var ae,af,ac=50,J;function V(am){if(M.aborted||J){return}try{af=Q(O)}catch(ap){d("cannot access response document: ",ap);am=P}if(am===S&&M){M.abort("timeout");ag.reject(M,"timeout");return}else{if(am==P&&M){M.abort("server abort");ag.reject(M,"error","server abort");return}}if(!af||af.location.href==T.iframeSrc){if(!aa){return}}if(O.detachEvent){O.detachEvent("onload",V)}else{O.removeEventListener("load",V,false)}var ak="success",ao;try{if(aa){throw"timeout"}var aj=T.dataType=="xml"||af.XMLDocument||e.isXMLDoc(af);d("isXml="+aj);if(!aj&&window.opera&&(af.body===null||!af.body.innerHTML)){if(--ac){d("requeing onLoad callback, DOM not available");setTimeout(V,250);return}}var aq=af.body?af.body:af.documentElement;M.responseText=aq?aq.innerHTML:null;M.responseXML=af.XMLDocument?af.XMLDocument:af;if(aj){T.dataType="xml"}M.getResponseHeader=function(au){var at={"content-type":T.dataType};return at[au]};if(aq){M.status=Number(aq.getAttribute("status"))||M.status;M.statusText=aq.getAttribute("statusText")||M.statusText}var ah=(T.dataType||"").toLowerCase();var an=/(json|script|text)/.test(ah);if(an||T.textarea){var al=af.getElementsByTagName("textarea")[0];if(al){M.responseText=al.value;M.status=Number(al.getAttribute("status"))||M.status;M.statusText=al.getAttribute("statusText")||M.statusText}else{if(an){var ai=af.getElementsByTagName("pre")[0];var ar=af.getElementsByTagName("body")[0];if(ai){M.responseText=ai.textContent?ai.textContent:ai.innerText}else{if(ar){M.responseText=ar.textContent?ar.textContent:ar.innerText}}}}}else{if(ah=="xml"&&!M.responseXML&&M.responseText){M.responseXML=U(M.responseText)}}try{ae=k(M,ah,T)}catch(am){ak="parsererror";M.error=ao=(am||ak)}}catch(am){d("error caught: ",am);ak="error";M.error=ao=(am||ak)}if(M.aborted){d("upload aborted");ak=null}if(M.status){ak=(M.status>=200&&M.status<300||M.status===304)?"success":"error"}if(ak==="success"){if(T.success){T.success.call(T.context,ae,"success",M)}ag.resolve(M.responseText,"success",M);if(ab){e.event.trigger("ajaxSuccess",[M,T])}}else{if(ak){if(ao===undefined){ao=M.statusText}if(T.error){T.error.call(T.context,M,ak,ao)}ag.reject(M,"error",ao);if(ab){e.event.trigger("ajaxError",[M,T,ao])}}}if(ab){e.event.trigger("ajaxComplete",[M,T])}if(ab&&!--e.active){e.event.trigger("ajaxStop")}if(T.complete){T.complete.call(T.context,M,ak)}J=true;if(T.timeout){clearTimeout(R)}setTimeout(function(){if(!T.iframeTarget){K.remove()}M.responseXML=null},100)}var U=e.parseXML||function(ah,ai){if(window.ActiveXObject){ai=new ActiveXObject("Microsoft.XMLDOM");ai.async="false";ai.loadXML(ah)}else{ai=(new DOMParser()).parseFromString(ah,"text/xml")}return(ai&&ai.documentElement&&ai.documentElement.nodeName!="parsererror")?ai:null};var q=e.parseJSON||function(ah){return window["eval"]("("+ah+")")};var k=function(am,ak,aj){var ai=am.getResponseHeader("content-type")||"",ah=ak==="xml"||!ak&&ai.indexOf("xml")>=0,al=ah?am.responseXML:am.responseText;if(ah&&al.documentElement.nodeName==="parsererror"){if(e.error){e.error("parsererror")}}if(aj&&aj.dataFilter){al=aj.dataFilter(al,ak)}if(typeof al==="string"){if(ak==="json"||!ak&&ai.indexOf("json")>=0){al=q(al)}else{if(ak==="script"||!ak&&ai.indexOf("javascript")>=0){e.globalEval(al)}}}return al};return ag}};e.fn.ajaxForm=function(f){f=f||{};f.delegation=f.delegation&&e.isFunction(e.fn.on);if(!f.delegation&&this.length===0){var g={s:this.selector,c:this.context};if(!e.isReady&&g.s){d("DOM not ready, queuing ajaxForm");e(function(){e(g.s,g.c).ajaxForm(f)});return this}d("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)"));return this}if(f.delegation){e(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,a).on("submit.form-plugin",this.selector,f,b).on("click.form-plugin",this.selector,f,a);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",f,b).bind("click.form-plugin",f,a)};function b(g){var f=g.data;if(!g.isDefaultPrevented()){g.preventDefault();e(this).ajaxSubmit(f)}}function a(j){var i=j.target;var g=e(i);if(!(g.is(":submit,input:image"))){var f=g.closest(":submit");if(f.length===0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!==undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof e.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)}e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};e.fn.formToArray=function(w,f){var u=[];if(this.length===0){return u}var k=this[0];var o=w?k.getElementsByTagName("*"):k.elements;if(!o){return u}var q,p,m,x,l,s,h;for(q=0,s=o.length;q<s;q++){l=o[q];m=l.name;if(!m){continue}if(w&&k.clk&&l.type=="image"){if(!l.disabled&&k.clk==l){u.push({name:m,value:e(l).val(),type:l.type});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}continue}x=e.fieldValue(l,true);if(x&&x.constructor==Array){if(f){f.push(l)}for(p=0,h=x.length;p<h;p++){u.push({name:m,value:x[p]})}}else{if(c.fileapi&&l.type=="file"&&!l.disabled){if(f){f.push(l)}var g=l.files;if(g.length){for(p=0;p<g.length;p++){u.push({name:m,value:g[p],type:l.type})}}else{u.push({name:m,value:"",type:l.type})}}else{if(x!==null&&typeof x!="undefined"){if(f){f.push(l)}u.push({name:m,value:x,type:l.type,required:l.required})}}}}if(!w&&k.clk){var r=e(k.clk),t=r[0];m=t.name;if(m&&!t.disabled&&t.type=="image"){u.push({name:m,value:r.val()});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}}return u};e.fn.formSerialize=function(f){return e.param(this.formToArray(f))};e.fn.fieldSerialize=function(g){var f=[];this.each(function(){var l=this.name;if(!l){return}var j=e.fieldValue(this,g);if(j&&j.constructor==Array){for(var k=0,h=j.length;k<h;k++){f.push({name:l,value:j[k]})}}else{if(j!==null&&typeof j!="undefined"){f.push({name:this.name,value:j})}}});return e.param(f)};e.fn.fieldValue=function(l){for(var k=[],h=0,f=this.length;h<f;h++){var j=this[h];var g=e.fieldValue(j,l);if(g===null||typeof g=="undefined"||(g.constructor==Array&&!g.length)){continue}if(g.constructor==Array){e.merge(k,g)}else{k.push(g)}}return k};e.fieldValue=function(f,m){var h=f.name,s=f.type,u=f.tagName.toLowerCase();if(m===undefined){m=true}if(m&&(!h||f.disabled||s=="reset"||s=="button"||(s=="checkbox"||s=="radio")&&!f.checked||(s=="submit"||s=="image")&&f.form&&f.form.clk!=f||u=="select"&&f.selectedIndex==-1)){return null}if(u=="select"){var o=f.selectedIndex;if(o<0){return null}var q=[],g=f.options;var k=(s=="select-one");var p=(k?o+1:g.length);for(var j=(k?o:0);j<p;j++){var l=g[j];if(l.selected){var r=l.value;if(!r){r=(l.attributes&&l.attributes.value&&!(l.attributes.value.specified))?l.text:l.value}if(k){return r}q.push(r)}}return q}return e(f).val()};e.fn.clearForm=function(f){return this.each(function(){e("input,select,textarea",this).clearFields(f)})};e.fn.clearFields=e.fn.clearInputs=function(f){var g=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var i=this.type,h=this.tagName.toLowerCase();if(g.test(i)||h=="textarea"){this.value=""}else{if(i=="checkbox"||i=="radio"){this.checked=false}else{if(h=="select"){this.selectedIndex=-1}else{if(f){if((f===true&&/hidden/.test(i))||(typeof f=="string"&&e(this).is(f))){this.value=""}}}}}})};e.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};e.fn.enable=function(f){if(f===undefined){f=true}return this.each(function(){this.disabled=!f})};e.fn.selected=function(f){if(f===undefined){f=true}return this.each(function(){var g=this.type;if(g=="checkbox"||g=="radio"){this.checked=f}else{if(this.tagName.toLowerCase()=="option"){var h=e(this).parent("select");if(f&&h[0]&&h[0].type=="select-one"){h.find("option").selected(false)}this.selected=f}}})};e.fn.ajaxSubmit.debug=false;function d(){if(!e.fn.ajaxSubmit.debug){return}var f="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(f)}else{if(window.opera&&window.opera.postError){window.opera.postError(f)}}}})(jQuery);
|
1 |
/*!
|
2 |
* jQuery Form Plugin
|
3 |
+
* version: 3.23 (11-DEC-2012)
|
4 |
* @requires jQuery v1.5 or later
|
5 |
*
|
6 |
* Examples and documentation at: http://malsup.com/jquery/form/
|
9 |
* http://malsup.github.com/mit-license.txt
|
10 |
* http://malsup.github.com/gpl-license-v2.txt
|
11 |
*/
|
12 |
+
(function(e){var c={};c.fileapi=e("<input type='file'/>").get(0).files!==undefined;c.formdata=window.FormData!==undefined;e.fn.ajaxSubmit=function(h){if(!this.length){d("ajaxSubmit: skipping submit process - no element selected");return this}var g,y,j,m=this;if(typeof h=="function"){h={success:h}}g=this.attr("method");y=this.attr("action");j=(typeof y==="string")?e.trim(y):"";j=j||window.location.href||"";if(j){j=(j.match(/^([^#]+)/)||[])[1]}h=e.extend(true,{url:j,success:e.ajaxSettings.success,type:g||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},h);var s={};this.trigger("form-pre-serialize",[this,h,s]);if(s.veto){d("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(h.beforeSerialize&&h.beforeSerialize(this,h)===false){d("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var l=h.traditional;if(l===undefined){l=e.ajaxSettings.traditional}var p=[];var B,C=this.formToArray(h.semantic,p);if(h.data){h.extraData=h.data;B=e.param(h.data,l)}if(h.beforeSubmit&&h.beforeSubmit(C,this,h)===false){d("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[C,this,h,s]);if(s.veto){d("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var w=e.param(C,l);if(B){w=(w?(w+"&"+B):B)}if(h.type.toUpperCase()=="GET"){h.url+=(h.url.indexOf("?")>=0?"&":"?")+w;h.data=null}else{h.data=w}var E=[];if(h.resetForm){E.push(function(){m.resetForm()})}if(h.clearForm){E.push(function(){m.clearForm(h.includeHidden)})}if(!h.dataType&&h.target){var i=h.success||function(){};E.push(function(q){var k=h.replaceTarget?"replaceWith":"html";e(h.target)[k](q).each(i,arguments)})}else{if(h.success){E.push(h.success)}}h.success=function(H,q,I){var G=h.context||this;for(var F=0,k=E.length;F<k;F++){E[F].apply(G,[H,q,I||m,m])}};var A=e('input[type=file]:enabled[value!=""]',this);var n=A.length>0;var z="multipart/form-data";var v=(m.attr("enctype")==z||m.attr("encoding")==z);var u=c.fileapi&&c.formdata;d("fileAPI :"+u);var o=(n||v)&&!u;var t;if(h.iframe!==false&&(h.iframe||o)){if(h.closeKeepAlive){e.get(h.closeKeepAlive,function(){t=D(C)})}else{t=D(C)}}else{if((n||v)&&u){t=r(C)}else{t=e.ajax(h)}}m.removeData("jqxhr").data("jqxhr",t);for(var x=0;x<p.length;x++){p[x]=null}this.trigger("form-submit-notify",[this,h]);return this;function f(H){var I=e.param(H).split("&");var q=I.length;var k={};var G,F;for(G=0;G<q;G++){I[G]=I[G].replace(/\+/g," ");F=I[G].split("=");k[decodeURIComponent(F[0])]=decodeURIComponent(F[1])}return k}function r(q){var k=new FormData();for(var F=0;F<q.length;F++){k.append(q[F].name,q[F].value)}if(h.extraData){var I=f(h.extraData);for(var J in I){if(I.hasOwnProperty(J)){k.append(J,I[J])}}}h.data=null;var H=e.extend(true,{},e.ajaxSettings,h,{contentType:false,processData:false,cache:false,type:g||"POST"});if(h.uploadProgress){H.xhr=function(){var K=jQuery.ajaxSettings.xhr();if(K.upload){K.upload.onprogress=function(O){var N=0;var L=O.loaded||O.position;var M=O.total;if(O.lengthComputable){N=Math.ceil(L/M*100)}h.uploadProgress(O,L,M,N)}}return K}}H.data=null;var G=H.beforeSend;H.beforeSend=function(L,K){K.data=k;if(G){G.call(this,L,K)}};return e.ajax(H)}function D(ad){var I=m[0],H,Z,T,ab,W,K,O,M,N,X,aa,R;var L=!!e.fn.prop;var ag=e.Deferred();if(e("[name=submit],[id=submit]",I).length){alert('Error: Form elements must not have name or id of "submit".');ag.reject();return ag}if(ad){for(Z=0;Z<p.length;Z++){H=e(p[Z]);if(L){H.prop("disabled",false)}else{H.removeAttr("disabled")}}}T=e.extend(true,{},e.ajaxSettings,h);T.context=T.context||T;W="jqFormIO"+(new Date().getTime());if(T.iframeTarget){K=e(T.iframeTarget);X=K.attr("name");if(!X){K.attr("name",W)}else{W=X}}else{K=e('<iframe name="'+W+'" src="'+T.iframeSrc+'" />');K.css({position:"absolute",top:"-1000px",left:"-1000px"})}O=K[0];M={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(ah){var ai=(ah==="timeout"?"timeout":"aborted");d("aborting upload... "+ai);this.aborted=1;try{if(O.contentWindow.document.execCommand){O.contentWindow.document.execCommand("Stop")}}catch(aj){}K.attr("src",T.iframeSrc);M.error=ai;if(T.error){T.error.call(T.context,M,ai,ah)}if(ab){e.event.trigger("ajaxError",[M,T,ai])}if(T.complete){T.complete.call(T.context,M,ai)}}};ab=T.global;if(ab&&0===e.active++){e.event.trigger("ajaxStart")}if(ab){e.event.trigger("ajaxSend",[M,T])}if(T.beforeSend&&T.beforeSend.call(T.context,M,T)===false){if(T.global){e.active--}ag.reject();return ag}if(M.aborted){ag.reject();return ag}N=I.clk;if(N){X=N.name;if(X&&!N.disabled){T.extraData=T.extraData||{};T.extraData[X]=N.value;if(N.type=="image"){T.extraData[X+".x"]=I.clk_x;T.extraData[X+".y"]=I.clk_y}}}var S=1;var P=2;function Q(ai){var ah=ai.contentWindow?ai.contentWindow.document:ai.contentDocument?ai.contentDocument:ai.document;return ah}var G=e("meta[name=csrf-token]").attr("content");var F=e("meta[name=csrf-param]").attr("content");if(F&&G){T.extraData=T.extraData||{};T.extraData[F]=G}function Y(){var aj=m.attr("target"),ah=m.attr("action");I.setAttribute("target",W);if(!g){I.setAttribute("method","POST")}if(ah!=T.url){I.setAttribute("action",T.url)}if(!T.skipEncodingOverride&&(!g||/post/i.test(g))){m.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(T.timeout){R=setTimeout(function(){aa=true;V(S)},T.timeout)}function ak(){try{var am=Q(O).readyState;d("state = "+am);if(am&&am.toLowerCase()=="uninitialized"){setTimeout(ak,50)}}catch(an){d("Server abort: ",an," (",an.name,")");V(P);if(R){clearTimeout(R)}R=undefined}}var ai=[];try{if(T.extraData){for(var al in T.extraData){if(T.extraData.hasOwnProperty(al)){if(e.isPlainObject(T.extraData[al])&&T.extraData[al].hasOwnProperty("name")&&T.extraData[al].hasOwnProperty("value")){ai.push(e('<input type="hidden" name="'+T.extraData[al].name+'">').attr("value",T.extraData[al].value).appendTo(I)[0])}else{ai.push(e('<input type="hidden" name="'+al+'">').attr("value",T.extraData[al]).appendTo(I)[0])}}}}if(!T.iframeTarget){K.appendTo("body");if(O.attachEvent){O.attachEvent("onload",V)}else{O.addEventListener("load",V,false)}}setTimeout(ak,15);I.submit()}finally{I.setAttribute("action",ah);if(aj){I.setAttribute("target",aj)}else{m.removeAttr("target")}e(ai).remove()}}if(T.forceSync){Y()}else{setTimeout(Y,10)}var ae,af,ac=50,J;function V(am){if(M.aborted||J){return}try{af=Q(O)}catch(ap){d("cannot access response document: ",ap);am=P}if(am===S&&M){M.abort("timeout");ag.reject(M,"timeout");return}else{if(am==P&&M){M.abort("server abort");ag.reject(M,"error","server abort");return}}if(!af||af.location.href==T.iframeSrc){if(!aa){return}}if(O.detachEvent){O.detachEvent("onload",V)}else{O.removeEventListener("load",V,false)}var ak="success",ao;try{if(aa){throw"timeout"}var aj=T.dataType=="xml"||af.XMLDocument||e.isXMLDoc(af);d("isXml="+aj);if(!aj&&window.opera&&(af.body===null||!af.body.innerHTML)){if(--ac){d("requeing onLoad callback, DOM not available");setTimeout(V,250);return}}var aq=af.body?af.body:af.documentElement;M.responseText=aq?aq.innerHTML:null;M.responseXML=af.XMLDocument?af.XMLDocument:af;if(aj){T.dataType="xml"}M.getResponseHeader=function(au){var at={"content-type":T.dataType};return at[au]};if(aq){M.status=Number(aq.getAttribute("status"))||M.status;M.statusText=aq.getAttribute("statusText")||M.statusText}var ah=(T.dataType||"").toLowerCase();var an=/(json|script|text)/.test(ah);if(an||T.textarea){var al=af.getElementsByTagName("textarea")[0];if(al){M.responseText=al.value;M.status=Number(al.getAttribute("status"))||M.status;M.statusText=al.getAttribute("statusText")||M.statusText}else{if(an){var ai=af.getElementsByTagName("pre")[0];var ar=af.getElementsByTagName("body")[0];if(ai){M.responseText=ai.textContent?ai.textContent:ai.innerText}else{if(ar){M.responseText=ar.textContent?ar.textContent:ar.innerText}}}}}else{if(ah=="xml"&&!M.responseXML&&M.responseText){M.responseXML=U(M.responseText)}}try{ae=k(M,ah,T)}catch(am){ak="parsererror";M.error=ao=(am||ak)}}catch(am){d("error caught: ",am);ak="error";M.error=ao=(am||ak)}if(M.aborted){d("upload aborted");ak=null}if(M.status){ak=(M.status>=200&&M.status<300||M.status===304)?"success":"error"}if(ak==="success"){if(T.success){T.success.call(T.context,ae,"success",M)}ag.resolve(M.responseText,"success",M);if(ab){e.event.trigger("ajaxSuccess",[M,T])}}else{if(ak){if(ao===undefined){ao=M.statusText}if(T.error){T.error.call(T.context,M,ak,ao)}ag.reject(M,"error",ao);if(ab){e.event.trigger("ajaxError",[M,T,ao])}}}if(ab){e.event.trigger("ajaxComplete",[M,T])}if(ab&&!--e.active){e.event.trigger("ajaxStop")}if(T.complete){T.complete.call(T.context,M,ak)}J=true;if(T.timeout){clearTimeout(R)}setTimeout(function(){if(!T.iframeTarget){K.remove()}M.responseXML=null},100)}var U=e.parseXML||function(ah,ai){if(window.ActiveXObject){ai=new ActiveXObject("Microsoft.XMLDOM");ai.async="false";ai.loadXML(ah)}else{ai=(new DOMParser()).parseFromString(ah,"text/xml")}return(ai&&ai.documentElement&&ai.documentElement.nodeName!="parsererror")?ai:null};var q=e.parseJSON||function(ah){return window["eval"]("("+ah+")")};var k=function(am,ak,aj){var ai=am.getResponseHeader("content-type")||"",ah=ak==="xml"||!ak&&ai.indexOf("xml")>=0,al=ah?am.responseXML:am.responseText;if(ah&&al.documentElement.nodeName==="parsererror"){if(e.error){e.error("parsererror")}}if(aj&&aj.dataFilter){al=aj.dataFilter(al,ak)}if(typeof al==="string"){if(ak==="json"||!ak&&ai.indexOf("json")>=0){al=q(al)}else{if(ak==="script"||!ak&&ai.indexOf("javascript")>=0){e.globalEval(al)}}}return al};return ag}};e.fn.ajaxForm=function(f){f=f||{};f.delegation=f.delegation&&e.isFunction(e.fn.on);if(!f.delegation&&this.length===0){var g={s:this.selector,c:this.context};if(!e.isReady&&g.s){d("DOM not ready, queuing ajaxForm");e(function(){e(g.s,g.c).ajaxForm(f)});return this}d("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)"));return this}if(f.delegation){e(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,a).on("submit.form-plugin",this.selector,f,b).on("click.form-plugin",this.selector,f,a);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",f,b).bind("click.form-plugin",f,a)};function b(g){var f=g.data;if(!g.isDefaultPrevented()){g.preventDefault();e(this).ajaxSubmit(f)}}function a(j){var i=j.target;var g=e(i);if(!(g.is("[type=submit],[type=image]"))){var f=g.closest("[type=submit]");if(f.length===0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!==undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof e.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)}e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};e.fn.formToArray=function(w,f){var u=[];if(this.length===0){return u}var k=this[0];var o=w?k.getElementsByTagName("*"):k.elements;if(!o){return u}var q,p,m,x,l,s,h;for(q=0,s=o.length;q<s;q++){l=o[q];m=l.name;if(!m){continue}if(w&&k.clk&&l.type=="image"){if(!l.disabled&&k.clk==l){u.push({name:m,value:e(l).val(),type:l.type});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}continue}x=e.fieldValue(l,true);if(x&&x.constructor==Array){if(f){f.push(l)}for(p=0,h=x.length;p<h;p++){u.push({name:m,value:x[p]})}}else{if(c.fileapi&&l.type=="file"&&!l.disabled){if(f){f.push(l)}var g=l.files;if(g.length){for(p=0;p<g.length;p++){u.push({name:m,value:g[p],type:l.type})}}else{u.push({name:m,value:"",type:l.type})}}else{if(x!==null&&typeof x!="undefined"){if(f){f.push(l)}u.push({name:m,value:x,type:l.type,required:l.required})}}}}if(!w&&k.clk){var r=e(k.clk),t=r[0];m=t.name;if(m&&!t.disabled&&t.type=="image"){u.push({name:m,value:r.val()});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}}return u};e.fn.formSerialize=function(f){return e.param(this.formToArray(f))};e.fn.fieldSerialize=function(g){var f=[];this.each(function(){var l=this.name;if(!l){return}var j=e.fieldValue(this,g);if(j&&j.constructor==Array){for(var k=0,h=j.length;k<h;k++){f.push({name:l,value:j[k]})}}else{if(j!==null&&typeof j!="undefined"){f.push({name:this.name,value:j})}}});return e.param(f)};e.fn.fieldValue=function(l){for(var k=[],h=0,f=this.length;h<f;h++){var j=this[h];var g=e.fieldValue(j,l);if(g===null||typeof g=="undefined"||(g.constructor==Array&&!g.length)){continue}if(g.constructor==Array){e.merge(k,g)}else{k.push(g)}}return k};e.fieldValue=function(f,m){var h=f.name,s=f.type,u=f.tagName.toLowerCase();if(m===undefined){m=true}if(m&&(!h||f.disabled||s=="reset"||s=="button"||(s=="checkbox"||s=="radio")&&!f.checked||(s=="submit"||s=="image")&&f.form&&f.form.clk!=f||u=="select"&&f.selectedIndex==-1)){return null}if(u=="select"){var o=f.selectedIndex;if(o<0){return null}var q=[],g=f.options;var k=(s=="select-one");var p=(k?o+1:g.length);for(var j=(k?o:0);j<p;j++){var l=g[j];if(l.selected){var r=l.value;if(!r){r=(l.attributes&&l.attributes.value&&!(l.attributes.value.specified))?l.text:l.value}if(k){return r}q.push(r)}}return q}return e(f).val()};e.fn.clearForm=function(f){return this.each(function(){e("input,select,textarea",this).clearFields(f)})};e.fn.clearFields=e.fn.clearInputs=function(f){var g=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var i=this.type,h=this.tagName.toLowerCase();if(g.test(i)||h=="textarea"){this.value=""}else{if(i=="checkbox"||i=="radio"){this.checked=false}else{if(h=="select"){this.selectedIndex=-1}else{if(i=="file"){if(e.browser.msie){e(this).replaceWith(e(this).clone())}else{e(this).val("")}}else{if(f){if((f===true&&/hidden/.test(i))||(typeof f=="string"&&e(this).is(f))){this.value=""}}}}}}})};e.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};e.fn.enable=function(f){if(f===undefined){f=true}return this.each(function(){this.disabled=!f})};e.fn.selected=function(f){if(f===undefined){f=true}return this.each(function(){var g=this.type;if(g=="checkbox"||g=="radio"){this.checked=f}else{if(this.tagName.toLowerCase()=="option"){var h=e(this).parent("select");if(f&&h[0]&&h[0].type=="select-one"){h.find("option").selected(false)}this.selected=f}}})};e.fn.ajaxSubmit.debug=false;function d(){if(!e.fn.ajaxSubmit.debug){return}var f="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(f)}else{if(window.opera&&window.opera.postError){window.opera.postError(f)}}}})(jQuery);
|
languages/wpcf7-de_DE.mo
CHANGED
Binary file
|
languages/wpcf7-ga_IE.mo
ADDED
Binary file
|
languages/wpcf7-hu_HU.mo
CHANGED
Binary file
|
languages/wpcf7-ja.mo
CHANGED
Binary file
|
languages/wpcf7-th.mo
CHANGED
Binary file
|
languages/wpcf7-tl.mo
CHANGED
Binary file
|
languages/wpcf7.pot
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contact Form 7\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-
|
6 |
-
"PO-Revision-Date: 2012-
|
7 |
"Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_c\n"
|
14 |
"X-Poedit-Basepath: ../..\n"
|
15 |
"Plural-Forms: nplurals=1; plural=0;\n"
|
16 |
-
"X-Generator: Poedit 1.5.
|
17 |
"X-Poedit-SearchPath-0: contact-form-7\n"
|
18 |
|
19 |
#: contact-form-7/wp-contact-form-7.php:5
|
@@ -275,7 +275,7 @@ msgstr ""
|
|
275 |
msgid "Contact Form"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: contact-form-7/includes/classes.php:
|
279 |
msgid "Untitled"
|
280 |
msgstr ""
|
281 |
|
@@ -524,110 +524,114 @@ msgid "Indonesian"
|
|
524 |
msgstr ""
|
525 |
|
526 |
#: contact-form-7/includes/functions.php:225
|
527 |
-
msgid "
|
528 |
msgstr ""
|
529 |
|
530 |
#: contact-form-7/includes/functions.php:226
|
531 |
-
msgid "
|
532 |
msgstr ""
|
533 |
|
534 |
#: contact-form-7/includes/functions.php:227
|
535 |
-
msgid "
|
536 |
msgstr ""
|
537 |
|
538 |
#: contact-form-7/includes/functions.php:228
|
539 |
-
msgid "
|
540 |
msgstr ""
|
541 |
|
542 |
#: contact-form-7/includes/functions.php:229
|
543 |
-
msgid "
|
544 |
msgstr ""
|
545 |
|
546 |
#: contact-form-7/includes/functions.php:230
|
547 |
-
msgid "
|
548 |
msgstr ""
|
549 |
|
550 |
#: contact-form-7/includes/functions.php:231
|
551 |
-
msgid "
|
552 |
msgstr ""
|
553 |
|
554 |
#: contact-form-7/includes/functions.php:232
|
555 |
-
msgid "
|
556 |
msgstr ""
|
557 |
|
558 |
#: contact-form-7/includes/functions.php:233
|
559 |
-
msgid "
|
560 |
msgstr ""
|
561 |
|
562 |
#: contact-form-7/includes/functions.php:234
|
563 |
-
msgid "
|
564 |
msgstr ""
|
565 |
|
566 |
#: contact-form-7/includes/functions.php:235
|
567 |
-
msgid "
|
568 |
msgstr ""
|
569 |
|
570 |
#: contact-form-7/includes/functions.php:236
|
571 |
-
msgid "
|
572 |
msgstr ""
|
573 |
|
574 |
#: contact-form-7/includes/functions.php:237
|
575 |
-
msgid "
|
576 |
msgstr ""
|
577 |
|
578 |
#: contact-form-7/includes/functions.php:238
|
579 |
-
msgid "
|
580 |
msgstr ""
|
581 |
|
582 |
#: contact-form-7/includes/functions.php:239
|
583 |
-
msgid "
|
584 |
msgstr ""
|
585 |
|
586 |
#: contact-form-7/includes/functions.php:240
|
587 |
-
msgid "
|
588 |
msgstr ""
|
589 |
|
590 |
#: contact-form-7/includes/functions.php:241
|
591 |
-
msgid "
|
592 |
msgstr ""
|
593 |
|
594 |
#: contact-form-7/includes/functions.php:242
|
595 |
-
msgid "
|
596 |
msgstr ""
|
597 |
|
598 |
#: contact-form-7/includes/functions.php:243
|
599 |
-
msgid "
|
600 |
msgstr ""
|
601 |
|
602 |
#: contact-form-7/includes/functions.php:244
|
603 |
-
msgid "
|
604 |
msgstr ""
|
605 |
|
606 |
#: contact-form-7/includes/functions.php:245
|
607 |
-
msgid "
|
608 |
msgstr ""
|
609 |
|
610 |
#: contact-form-7/includes/functions.php:246
|
611 |
-
msgid "
|
612 |
msgstr ""
|
613 |
|
614 |
#: contact-form-7/includes/functions.php:247
|
615 |
-
msgid "
|
616 |
msgstr ""
|
617 |
|
618 |
#: contact-form-7/includes/functions.php:248
|
619 |
-
msgid "
|
620 |
msgstr ""
|
621 |
|
622 |
#: contact-form-7/includes/functions.php:249
|
623 |
-
msgid "
|
624 |
msgstr ""
|
625 |
|
626 |
#: contact-form-7/includes/functions.php:250
|
627 |
-
msgid "
|
628 |
msgstr ""
|
629 |
|
630 |
#: contact-form-7/includes/functions.php:251
|
|
|
|
|
|
|
|
|
631 |
msgid "Vietnamese"
|
632 |
msgstr ""
|
633 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contact Form 7\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-12-04 11:43+0900\n"
|
6 |
+
"PO-Revision-Date: 2012-12-04 11:43+0900\n"
|
7 |
"Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
13 |
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_c\n"
|
14 |
"X-Poedit-Basepath: ../..\n"
|
15 |
"Plural-Forms: nplurals=1; plural=0;\n"
|
16 |
+
"X-Generator: Poedit 1.5.4\n"
|
17 |
"X-Poedit-SearchPath-0: contact-form-7\n"
|
18 |
|
19 |
#: contact-form-7/wp-contact-form-7.php:5
|
275 |
msgid "Contact Form"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: contact-form-7/includes/classes.php:782
|
279 |
msgid "Untitled"
|
280 |
msgstr ""
|
281 |
|
524 |
msgstr ""
|
525 |
|
526 |
#: contact-form-7/includes/functions.php:225
|
527 |
+
msgid "Irish"
|
528 |
msgstr ""
|
529 |
|
530 |
#: contact-form-7/includes/functions.php:226
|
531 |
+
msgid "Italian"
|
532 |
msgstr ""
|
533 |
|
534 |
#: contact-form-7/includes/functions.php:227
|
535 |
+
msgid "Japanese"
|
536 |
msgstr ""
|
537 |
|
538 |
#: contact-form-7/includes/functions.php:228
|
539 |
+
msgid "Korean"
|
540 |
msgstr ""
|
541 |
|
542 |
#: contact-form-7/includes/functions.php:229
|
543 |
+
msgid "Latvian"
|
544 |
msgstr ""
|
545 |
|
546 |
#: contact-form-7/includes/functions.php:230
|
547 |
+
msgid "Lithuanian"
|
548 |
msgstr ""
|
549 |
|
550 |
#: contact-form-7/includes/functions.php:231
|
551 |
+
msgid "Macedonian"
|
552 |
msgstr ""
|
553 |
|
554 |
#: contact-form-7/includes/functions.php:232
|
555 |
+
msgid "Malay"
|
556 |
msgstr ""
|
557 |
|
558 |
#: contact-form-7/includes/functions.php:233
|
559 |
+
msgid "Malayalam"
|
560 |
msgstr ""
|
561 |
|
562 |
#: contact-form-7/includes/functions.php:234
|
563 |
+
msgid "Maltese"
|
564 |
msgstr ""
|
565 |
|
566 |
#: contact-form-7/includes/functions.php:235
|
567 |
+
msgid "Norwegian"
|
568 |
msgstr ""
|
569 |
|
570 |
#: contact-form-7/includes/functions.php:236
|
571 |
+
msgid "Persian"
|
572 |
msgstr ""
|
573 |
|
574 |
#: contact-form-7/includes/functions.php:237
|
575 |
+
msgid "Polish"
|
576 |
msgstr ""
|
577 |
|
578 |
#: contact-form-7/includes/functions.php:238
|
579 |
+
msgid "Portuguese"
|
580 |
msgstr ""
|
581 |
|
582 |
#: contact-form-7/includes/functions.php:239
|
583 |
+
msgid "Russian"
|
584 |
msgstr ""
|
585 |
|
586 |
#: contact-form-7/includes/functions.php:240
|
587 |
+
msgid "Romanian"
|
588 |
msgstr ""
|
589 |
|
590 |
#: contact-form-7/includes/functions.php:241
|
591 |
+
msgid "Serbian"
|
592 |
msgstr ""
|
593 |
|
594 |
#: contact-form-7/includes/functions.php:242
|
595 |
+
msgid "Sinhala"
|
596 |
msgstr ""
|
597 |
|
598 |
#: contact-form-7/includes/functions.php:243
|
599 |
+
msgid "Slovak"
|
600 |
msgstr ""
|
601 |
|
602 |
#: contact-form-7/includes/functions.php:244
|
603 |
+
msgid "Slovene"
|
604 |
msgstr ""
|
605 |
|
606 |
#: contact-form-7/includes/functions.php:245
|
607 |
+
msgid "Spanish"
|
608 |
msgstr ""
|
609 |
|
610 |
#: contact-form-7/includes/functions.php:246
|
611 |
+
msgid "Swedish"
|
612 |
msgstr ""
|
613 |
|
614 |
#: contact-form-7/includes/functions.php:247
|
615 |
+
msgid "Tamil"
|
616 |
msgstr ""
|
617 |
|
618 |
#: contact-form-7/includes/functions.php:248
|
619 |
+
msgid "Thai"
|
620 |
msgstr ""
|
621 |
|
622 |
#: contact-form-7/includes/functions.php:249
|
623 |
+
msgid "Tagalog"
|
624 |
msgstr ""
|
625 |
|
626 |
#: contact-form-7/includes/functions.php:250
|
627 |
+
msgid "Turkish"
|
628 |
msgstr ""
|
629 |
|
630 |
#: contact-form-7/includes/functions.php:251
|
631 |
+
msgid "Ukrainian"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: contact-form-7/includes/functions.php:252
|
635 |
msgid "Vietnamese"
|
636 |
msgstr ""
|
637 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: takayukister
|
|
3 |
Donate link: http://contactform7.com/donate/
|
4 |
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 3.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -14,13 +14,21 @@ Just another contact form plugin. Simple but flexible.
|
|
14 |
|
15 |
Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
= Contact Form 7 Needs Your Support =
|
22 |
|
23 |
-
It is hard to continue development and support for this plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider [__making a donation__](http://contactform7.com/donate/). Your donation will help encourage and support the plugin's continued development and better user support.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
= Translators =
|
26 |
|
@@ -54,6 +62,7 @@ It is hard to continue development and support for this plugin without contribut
|
|
54 |
* Hindi (hi_IN) - [Tarun Joshi](http://www.readers-cafe.net/), [Ashish](http://outshinesolutions.com/)
|
55 |
* Hungarian (hu_HU) - [Andras Hirschler](http://hia.itblog.hu/), [János Csárdi-Braunstein](http://blogocska.org/), [Farkas Győző](http://www.sakraft.hu/)
|
56 |
* Indonesian (Bahasa Indonesia; id_ID) - [Hendry Lee](http://blogbuildingu.com/), [Belajar Seo Indonesia](http://dhany.web.id/panduan-seo)
|
|
|
57 |
* Italian (it_IT) - [Bruno](http://www.brunosalzano.com), [Gianni Diurno](http://gidibao.net/)
|
58 |
* Japanese (ja) - [Takayuki Miyoshi](http://ideasilo.wordpress.com)
|
59 |
* Korean (ko_KR) - Seong Eun Lee, [Jong-In Kim](http://incommunity.codex.kr/wordpress/)
|
@@ -75,9 +84,9 @@ It is hard to continue development and support for this plugin without contribut
|
|
75 |
* Slovene (sl_SI) - [Mihael Simonič](http://smihael.bplaced.net), Jani Roskar
|
76 |
* Spanish (es_ES) - [Jordi Sancho](http://www.qasolutions.net/blog), [Vladimir Prieto](http://vladimir.prie.to/), [Federico Mikaelian](http://www.fedemika.com.ar/), [Matias Baldanza](http://matiasbaldanza.com/), [Carlos Agnese](http://albumdecarlitos.com.ar/)
|
77 |
* Swedish (sv_SE) - [Fredrik Jonsson](http://www.fredda-o-ac.se/), [the Swedish community](http://wp-support.se/)
|
78 |
-
* Tagalog (tl) - [Rupert Agnew Lanuza](http://wheretobuy.com.ph/)
|
79 |
* Tamil (ta) - [Nitin Aggarwal](http://offshoreally.com/)
|
80 |
-
* Thai (th) - [
|
81 |
* Turkish (tr_TR) - [Roman Neumuller](http://katpatuka.wordpress.com), [Hasan Yılmaz](http://hedefturkce.com/), [Emin Buğra Saral](http://www.rahmetli.info/)
|
82 |
* Ukrainian (uk) - [Andrey Kovba](http://myserver.com.ua/), [Ukrainian WordPress localization team](http://wordpress.co.ua/plugins/contact-form-7.html)
|
83 |
* Vietnamese (vi) - Thanh Hải, Hà, [Khang Minh](http://betterwp.net/)
|
@@ -113,6 +122,14 @@ Do you have questions or issues with Contact Form 7? Use these support channels
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
= 3.3.1 =
|
117 |
|
118 |
* Fixed: Apply esc_html() to response outputs. In the case it is necessary to use HTML tags in the response messages, new wpcf7_form_response_output filter is available.
|
3 |
Donate link: http://contactform7.com/donate/
|
4 |
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 3.5
|
7 |
+
Stable tag: 3.3.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
14 |
|
15 |
Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
|
16 |
|
17 |
+
= Docs & Support =
|
18 |
+
|
19 |
+
You can find [docs](http://contactform7.com/docs/), [FAQ](http://contactform7.com/faq/) and more detailed information about Contact Form 7 on [contactform7.com](http://contactform7.com/). If you were unable to find the answer to your question on the FAQ or in any of the documentation, you should check the [support forum](http://wordpress.org/support/plugin/contact-form-7) on WordPress.org. If you can't locate any topics that pertain to your particular issue, post a new topic for it.
|
20 |
|
21 |
= Contact Form 7 Needs Your Support =
|
22 |
|
23 |
+
It is hard to continue development and support for this free plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider [__making a donation__](http://contactform7.com/donate/). Your donation will help encourage and support the plugin's continued development and better user support.
|
24 |
+
|
25 |
+
= Recommended Plugins =
|
26 |
+
|
27 |
+
The following are other recommended plugins by the author of Contact Form 7.
|
28 |
+
|
29 |
+
* [Flamingo](http://wordpress.org/extend/plugins/flamingo/) - With Flamingo, you can save submitted messages via contact forms in the database.
|
30 |
+
* [Really Simple CAPTCHA](http://wordpress.org/extend/plugins/really-simple-captcha/) - Really Simple CAPTCHA is a simple CAPTCHA module which works well with Contact Form 7.
|
31 |
+
* [Bogo](http://wordpress.org/extend/plugins/bogo/) - Bogo is a straight-forward multilingual plugin that doesn't cause headaches.
|
32 |
|
33 |
= Translators =
|
34 |
|
62 |
* Hindi (hi_IN) - [Tarun Joshi](http://www.readers-cafe.net/), [Ashish](http://outshinesolutions.com/)
|
63 |
* Hungarian (hu_HU) - [Andras Hirschler](http://hia.itblog.hu/), [János Csárdi-Braunstein](http://blogocska.org/), [Farkas Győző](http://www.sakraft.hu/)
|
64 |
* Indonesian (Bahasa Indonesia; id_ID) - [Hendry Lee](http://blogbuildingu.com/), [Belajar Seo Indonesia](http://dhany.web.id/panduan-seo)
|
65 |
+
* Irish (ga_IE) - [Vikas Arora](http://www.wiznicworld.com/)
|
66 |
* Italian (it_IT) - [Bruno](http://www.brunosalzano.com), [Gianni Diurno](http://gidibao.net/)
|
67 |
* Japanese (ja) - [Takayuki Miyoshi](http://ideasilo.wordpress.com)
|
68 |
* Korean (ko_KR) - Seong Eun Lee, [Jong-In Kim](http://incommunity.codex.kr/wordpress/)
|
84 |
* Slovene (sl_SI) - [Mihael Simonič](http://smihael.bplaced.net), Jani Roskar
|
85 |
* Spanish (es_ES) - [Jordi Sancho](http://www.qasolutions.net/blog), [Vladimir Prieto](http://vladimir.prie.to/), [Federico Mikaelian](http://www.fedemika.com.ar/), [Matias Baldanza](http://matiasbaldanza.com/), [Carlos Agnese](http://albumdecarlitos.com.ar/)
|
86 |
* Swedish (sv_SE) - [Fredrik Jonsson](http://www.fredda-o-ac.se/), [the Swedish community](http://wp-support.se/)
|
87 |
+
* Tagalog (tl) - [Rupert Agnew Lanuza](http://wheretobuy.com.ph/), [Hanne](http://pointen.dk/)
|
88 |
* Tamil (ta) - [Nitin Aggarwal](http://offshoreally.com/)
|
89 |
+
* Thai (th) - [ToshiK](http://www.tuntikorn.com/), [kazama](http://blog.wordthai.com/)
|
90 |
* Turkish (tr_TR) - [Roman Neumuller](http://katpatuka.wordpress.com), [Hasan Yılmaz](http://hedefturkce.com/), [Emin Buğra Saral](http://www.rahmetli.info/)
|
91 |
* Ukrainian (uk) - [Andrey Kovba](http://myserver.com.ua/), [Ukrainian WordPress localization team](http://wordpress.co.ua/plugins/contact-form-7.html)
|
92 |
* Vietnamese (vi) - Thanh Hải, Hà, [Khang Minh](http://betterwp.net/)
|
122 |
|
123 |
== Changelog ==
|
124 |
|
125 |
+
= 3.3.2 =
|
126 |
+
|
127 |
+
* Fixed: Add the additional headers only when they are not empty.
|
128 |
+
* Fixed: Don't load hidden files in the modules folder.
|
129 |
+
* The jQuery Form Plugin (jquery.form.js) has been updated to 3.23.
|
130 |
+
* Irish translation has been created by Vikas Arora.
|
131 |
+
* Translations for German, Thai, Hungarian and Tagalog have been updated.
|
132 |
+
|
133 |
= 3.3.1 =
|
134 |
|
135 |
* Fixed: Apply esc_html() to response outputs. In the case it is necessary to use HTML tags in the response messages, new wpcf7_form_response_output filter is available.
|
settings.php
CHANGED
@@ -24,7 +24,7 @@ function wpcf7_load_modules() {
|
|
24 |
return false;
|
25 |
|
26 |
while ( ( $module = readdir( $dh ) ) !== false ) {
|
27 |
-
if ( substr( $module, -4 ) == '.php' )
|
28 |
include_once $dir . '/' . $module;
|
29 |
}
|
30 |
}
|
24 |
return false;
|
25 |
|
26 |
while ( ( $module = readdir( $dh ) ) !== false ) {
|
27 |
+
if ( substr( $module, -4 ) == '.php' && substr( $module, 0, 1 ) != '.' )
|
28 |
include_once $dir . '/' . $module;
|
29 |
}
|
30 |
}
|
wp-contact-form-7.php
CHANGED
@@ -7,7 +7,7 @@ Author: Takayuki Miyoshi
|
|
7 |
Author URI: http://ideasilo.wordpress.com/
|
8 |
Text Domain: wpcf7
|
9 |
Domain Path: /languages/
|
10 |
-
Version: 3.3.
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2007-2012 Takayuki Miyoshi (email: takayukister at gmail.com)
|
@@ -27,7 +27,7 @@ Version: 3.3.1
|
|
27 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
*/
|
29 |
|
30 |
-
define( 'WPCF7_VERSION', '3.3.
|
31 |
|
32 |
define( 'WPCF7_REQUIRED_WP_VERSION', '3.3' );
|
33 |
|
7 |
Author URI: http://ideasilo.wordpress.com/
|
8 |
Text Domain: wpcf7
|
9 |
Domain Path: /languages/
|
10 |
+
Version: 3.3.2
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2007-2012 Takayuki Miyoshi (email: takayukister at gmail.com)
|
27 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
*/
|
29 |
|
30 |
+
define( 'WPCF7_VERSION', '3.3.2' );
|
31 |
|
32 |
define( 'WPCF7_REQUIRED_WP_VERSION', '3.3' );
|
33 |
|