Version Description
- Fixed: plugin compatibility with Contact Form 7 version 5.0 acceptance checkbox triggering submit button
- Fixed: plugin compatibility with Contact Form 7 after refactor removing jQuery.fn.wpcf7ClearResponseOutput() function
Download this release
Release Info
Developer | flixos90 |
Plugin | Bootstrap for Contact Form 7 |
Version | 1.4.6 |
Comparing to | |
See all releases |
Code changes from version 1.4.5 to 1.4.6
- assets/dist/js/scripts.js +22 -0
- assets/dist/js/scripts.min.js +1 -1
- assets/src/js/scripts.js +22 -0
- bootstrap-for-contact-form-7.php +2 -2
- changelog.txt +4 -0
- modules/acceptance.php +1 -1
- readme.txt +7 -3
assets/dist/js/scripts.js
CHANGED
@@ -39,6 +39,28 @@
|
|
39 |
}
|
40 |
};
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
// add Bootstrap Alert classes to response output
|
43 |
$( function() {
|
44 |
$( 'div.wpcf7' ).on( 'invalid.wpcf7', function() {
|
39 |
}
|
40 |
};
|
41 |
|
42 |
+
window.wpcf7.clearResponse = function( form ) {
|
43 |
+
var $form = $( form );
|
44 |
+
var $close = $form.find( 'div.wpcf7-response-output .close' );
|
45 |
+
|
46 |
+
$form.removeClass( 'invalid spam sent failed' );
|
47 |
+
$form.siblings( '.screen-reader-response' ).html( '' ).attr( 'role', '' );
|
48 |
+
|
49 |
+
$( '.wpcf7-not-valid-tip', $form ).remove();
|
50 |
+
$( '[aria-invalid]', $form ).attr( 'aria-invalid', 'false' );
|
51 |
+
$( '.wpcf7-form-control', $form ).removeClass( 'wpcf7-not-valid' );
|
52 |
+
$( 'div.form-group', $form ).removeClass( 'has-error' );
|
53 |
+
$( 'img.ajax-loader', $form ).removeClass( 'is-active' );
|
54 |
+
|
55 |
+
$( '.wpcf7-response-output', $form )
|
56 |
+
.hide().empty().removeAttr( 'role' )
|
57 |
+
.removeClass( 'wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked alert-warning alert-success alert-danger' );
|
58 |
+
|
59 |
+
if ( 0 < $close.length ) {
|
60 |
+
$form.find( 'div.wpcf7-response-output' ).append( $close );
|
61 |
+
}
|
62 |
+
};
|
63 |
+
|
64 |
// add Bootstrap Alert classes to response output
|
65 |
$( function() {
|
66 |
$( 'div.wpcf7' ).on( 'invalid.wpcf7', function() {
|
assets/dist/js/scripts.min.js
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
* By Felix Arntz (https://leaves-and-love.net)
|
4 |
* Licensed under GNU General Public License v3 (http://www.gnu.org/licenses/gpl-3.0.html)
|
5 |
*/
|
6 |
-
!function(n){"use strict";window.wpcf7.notValidTip=function(i,
|
3 |
* By Felix Arntz (https://leaves-and-love.net)
|
4 |
* Licensed under GNU General Public License v3 (http://www.gnu.org/licenses/gpl-3.0.html)
|
5 |
*/
|
6 |
+
!function(n){"use strict";window.wpcf7.notValidTip=function(i,e){var t=n(i);if(t.addClass("has-error"),n(".wpcf7-not-valid-tip",t).remove(),!t.parents(".wpcf7-form").hasClass("form-inline")&&(t.parents(".wpcf7-form").hasClass("form-horizontal")?t.children("div").append('<span class="help-block wpcf7-not-valid-tip">'+e+"</span>"):t.append('<span class="help-block wpcf7-not-valid-tip">'+e+"</span>"),t.is(".use-floating-validation-tip *"))){var s=function(i){n(i).not(":hidden").animate({opacity:0},"fast",function(){n(this).css({"z-index":-100})})};t.on("mouseover",".wpcf7-not-valid-tip",function(){s(this)}),t.on("focus",":input",function(){s(n(".wpcf7-not-valid-tip",t))})}},window.wpcf7.clearResponse=function(i){var e=n(i),t=e.find("div.wpcf7-response-output .close");e.removeClass("invalid spam sent failed"),e.siblings(".screen-reader-response").html("").attr("role",""),n(".wpcf7-not-valid-tip",e).remove(),n("[aria-invalid]",e).attr("aria-invalid","false"),n(".wpcf7-form-control",e).removeClass("wpcf7-not-valid"),n("div.form-group",e).removeClass("has-error"),n("img.ajax-loader",e).removeClass("is-active"),n(".wpcf7-response-output",e).hide().empty().removeAttr("role").removeClass("wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked alert-warning alert-success alert-danger"),0<t.length&&e.find("div.wpcf7-response-output").append(t)},n(function(){n("div.wpcf7").on("invalid.wpcf7",function(){n(this).find("div.wpcf7-response-output").addClass("alert-warning")}),n("div.wpcf7").on("spam.wpcf7",function(){n(this).find("div.wpcf7-response-output").addClass("alert-warning")}),n("div.wpcf7").on("mailsent.wpcf7",function(){n(this).find("div.wpcf7-response-output").addClass("alert-success")}),n("div.wpcf7").on("mailfailed.wpcf7",function(){n(this).find("div.wpcf7-response-output").addClass("alert-danger")}),n("div.wpcf7").on("click","div.wpcf7-response-output .close",function(i){n(this).parent().hide(),i.preventDefault()})}),n.fn.wpcf7NotValidTip=function(i){return this.each(function(){var e=n(this);e.addClass("has-error"),e.parents(".wpcf7-form").hasClass("form-inline")||(e.find("span.wpcf7-not-valid-tip").remove(),e.parents(".wpcf7-form").hasClass("form-horizontal")?e.children("div").append('<span class="help-block wpcf7-not-valid-tip">'+i+"</span>"):e.append('<span class="help-block wpcf7-not-valid-tip">'+i+"</span>"),e.slideDown("fast"),e.is(".use-floating-validation-tip *")&&(n(".wpcf7-not-valid-tip",e).mouseover(function(){n(this).wpcf7FadeOut()}),n(":input",e).focus(function(){n(".wpcf7-not-valid-tip",e).not(":hidden").wpcf7FadeOut()})))})},n.fn.wpcf7RefillQuiz=function(i){return this.each(function(){var e=n(this);n.each(i,function(n,i){e.find(':input[name="'+n+'"]').clearFields(),e.find(':input[name="'+n+'"]').siblings("p.wpcf7-quiz-label").text(i[0]),e.find('input:hidden[name="_wpcf7_quiz_answer_'+n+'"]').attr("value",i[1])})})},n.fn.wpcf7ClearResponseOutput=function(){return this.each(function(){var i=n(this).find("div.wpcf7-response-output .close");n(this).find("div.wpcf7-response-output").hide().empty().removeClass("wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked alert-warning alert-success alert-danger").removeAttr("role"),0<i.length&&n(this).find("div.wpcf7-response-output").append(i),n(this).find("div.form-group").removeClass("has-error"),n(this).find("span.wpcf7-not-valid-tip").remove(),n(this).find("img.ajax-loader").removeClass("is-active")})}}(jQuery);
|
assets/src/js/scripts.js
CHANGED
@@ -34,6 +34,28 @@
|
|
34 |
}
|
35 |
};
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
// add Bootstrap Alert classes to response output
|
38 |
$( function() {
|
39 |
$( 'div.wpcf7' ).on( 'invalid.wpcf7', function() {
|
34 |
}
|
35 |
};
|
36 |
|
37 |
+
window.wpcf7.clearResponse = function( form ) {
|
38 |
+
var $form = $( form );
|
39 |
+
var $close = $form.find( 'div.wpcf7-response-output .close' );
|
40 |
+
|
41 |
+
$form.removeClass( 'invalid spam sent failed' );
|
42 |
+
$form.siblings( '.screen-reader-response' ).html( '' ).attr( 'role', '' );
|
43 |
+
|
44 |
+
$( '.wpcf7-not-valid-tip', $form ).remove();
|
45 |
+
$( '[aria-invalid]', $form ).attr( 'aria-invalid', 'false' );
|
46 |
+
$( '.wpcf7-form-control', $form ).removeClass( 'wpcf7-not-valid' );
|
47 |
+
$( 'div.form-group', $form ).removeClass( 'has-error' );
|
48 |
+
$( 'img.ajax-loader', $form ).removeClass( 'is-active' );
|
49 |
+
|
50 |
+
$( '.wpcf7-response-output', $form )
|
51 |
+
.hide().empty().removeAttr( 'role' )
|
52 |
+
.removeClass( 'wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked alert-warning alert-success alert-danger' );
|
53 |
+
|
54 |
+
if ( 0 < $close.length ) {
|
55 |
+
$form.find( 'div.wpcf7-response-output' ).append( $close );
|
56 |
+
}
|
57 |
+
};
|
58 |
+
|
59 |
// add Bootstrap Alert classes to response output
|
60 |
$( function() {
|
61 |
$( 'div.wpcf7' ).on( 'invalid.wpcf7', function() {
|
bootstrap-for-contact-form-7.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Bootstrap for Contact Form 7
|
11 |
* Plugin URI: https://wordpress.org/plugins/bootstrap-for-contact-form-7/
|
12 |
* Description: This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework.
|
13 |
-
* Version: 1.4.
|
14 |
* Author: Felix Arntz
|
15 |
* Author URI: https://leaves-and-love.net
|
16 |
* License: GNU General Public License v3
|
@@ -24,7 +24,7 @@ if ( ! defined( 'WPCF7_AUTOP' ) ) {
|
|
24 |
}
|
25 |
|
26 |
function cf7bs_maybe_init() {
|
27 |
-
define( 'CF7BS_VERSION', '1.4.
|
28 |
define( 'CF7BS_MAINFILE', __FILE__ );
|
29 |
define( 'CF7BS_PATH', untrailingslashit( plugin_dir_path( CF7BS_MAINFILE ) ) );
|
30 |
define( 'CF7BS_URL', untrailingslashit( plugin_dir_url( CF7BS_MAINFILE ) ) );
|
10 |
* Plugin Name: Bootstrap for Contact Form 7
|
11 |
* Plugin URI: https://wordpress.org/plugins/bootstrap-for-contact-form-7/
|
12 |
* Description: This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework.
|
13 |
+
* Version: 1.4.6
|
14 |
* Author: Felix Arntz
|
15 |
* Author URI: https://leaves-and-love.net
|
16 |
* License: GNU General Public License v3
|
24 |
}
|
25 |
|
26 |
function cf7bs_maybe_init() {
|
27 |
+
define( 'CF7BS_VERSION', '1.4.6' );
|
28 |
define( 'CF7BS_MAINFILE', __FILE__ );
|
29 |
define( 'CF7BS_PATH', untrailingslashit( plugin_dir_path( CF7BS_MAINFILE ) ) );
|
30 |
define( 'CF7BS_URL', untrailingslashit( plugin_dir_url( CF7BS_MAINFILE ) ) );
|
changelog.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
3 |
= 1.4.5 =
|
4 |
* Fixed: plugin compatibility with Contact Form 7 version 4.9 input type radio default required
|
5 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 1.4.6 =
|
4 |
+
* Fixed: plugin compatibility with Contact Form 7 version 5.0 acceptance checkbox triggering submit button
|
5 |
+
* Fixed: plugin compatibility with Contact Form 7 after refactor removing jQuery.fn.wpcf7ClearResponseOutput() function
|
6 |
+
|
7 |
= 1.4.5 =
|
8 |
* Fixed: plugin compatibility with Contact Form 7 version 4.9 input type radio default required
|
9 |
|
modules/acceptance.php
CHANGED
@@ -69,7 +69,7 @@ function cf7bs_acceptance_shortcode_handler( $tag ) {
|
|
69 |
'mode' => $mode,
|
70 |
'status' => $status,
|
71 |
'tabindex' => $tag_obj->get_option( 'tabindex', 'int', true ),
|
72 |
-
'wrapper_class' => $tag_obj->name,
|
73 |
'label_class' => $tag_obj->get_option( 'label_class', 'class', true ),
|
74 |
), $tag_obj->basetype, $tag_obj->name ) );
|
75 |
|
69 |
'mode' => $mode,
|
70 |
'status' => $status,
|
71 |
'tabindex' => $tag_obj->get_option( 'tabindex', 'int', true ),
|
72 |
+
'wrapper_class' => $tag_obj->name . ' wpcf7-acceptance',
|
73 |
'label_class' => $tag_obj->get_option( 'label_class', 'class', true ),
|
74 |
), $tag_obj->basetype, $tag_obj->name ) );
|
75 |
|
readme.txt
CHANGED
@@ -7,9 +7,9 @@ Author URI: https://leaves-and-love.net
|
|
7 |
Contributors: flixos90
|
8 |
Donate link: https://leaves-and-love.net/wordpress-plugins/
|
9 |
Requires at least: 3.6
|
10 |
-
Tested up to: 4.
|
11 |
-
Stable tag: 1.4.
|
12 |
-
Version: 1.4.
|
13 |
License: GNU General Public License v3
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
Tags: contact form 7, wpcf7, bootstrap, bootstrap 3, bootstrap framework, addon, contact form 7 addon, contact form, cf7bs
|
@@ -111,6 +111,10 @@ You can also contribute to the plugin by translating it. Simply visit [translate
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
|
|
|
|
|
|
|
|
114 |
= 1.4.5 =
|
115 |
* Fixed: plugin compatibility with Contact Form 7 version 4.9 input type radio default required
|
116 |
|
7 |
Contributors: flixos90
|
8 |
Donate link: https://leaves-and-love.net/wordpress-plugins/
|
9 |
Requires at least: 3.6
|
10 |
+
Tested up to: 4.9
|
11 |
+
Stable tag: 1.4.6
|
12 |
+
Version: 1.4.6
|
13 |
License: GNU General Public License v3
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
Tags: contact form 7, wpcf7, bootstrap, bootstrap 3, bootstrap framework, addon, contact form 7 addon, contact form, cf7bs
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 1.4.6 =
|
115 |
+
* Fixed: plugin compatibility with Contact Form 7 version 5.0 acceptance checkbox triggering submit button
|
116 |
+
* Fixed: plugin compatibility with Contact Form 7 after refactor removing jQuery.fn.wpcf7ClearResponseOutput() function
|
117 |
+
|
118 |
= 1.4.5 =
|
119 |
* Fixed: plugin compatibility with Contact Form 7 version 4.9 input type radio default required
|
120 |
|