Version Description
- correct santization
Download this release
Release Info
Developer | fullworks |
Plugin | Contact Form Clean and Simple |
Version | 4.7.4 |
Comparing to | |
See all releases |
Code changes from version 4.7.3 to 4.7.4
- class.cscf_contact.php +15 -15
- class.cscf_filters.php +6 -5
- clean-and-simple-contact-form-by-meg-nicholas.php +2 -2
- readme.txt +6 -3
- views/contact-form.view.php +140 -138
class.cscf_contact.php
CHANGED
@@ -26,35 +26,35 @@ class cscf_Contact {
|
|
26 |
$this->RecaptchaPrivateKey = cscf_PluginSettings::PrivateKey();
|
27 |
}
|
28 |
|
29 |
-
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
|
30 |
if ( isset( $_POST['cscf'] ) ) {
|
31 |
-
$cscf
|
32 |
-
foreach( $cscf as $key
|
33 |
-
switch ($key) {
|
34 |
case 'name':
|
35 |
-
$this->Name = sanitize_text_field($value);
|
36 |
break;
|
37 |
case 'email':
|
38 |
-
$this->Email = sanitize_email($value);
|
39 |
break;
|
40 |
case 'confirm-email':
|
41 |
-
$this->ConfirmEmail = sanitize_email($value);
|
42 |
break;
|
43 |
case 'email-sender':
|
44 |
-
$this->EmailToSender = sanitize_text_field($value);
|
45 |
break;
|
46 |
case 'message':
|
47 |
-
$this->Message = sanitize_textarea_field($value);
|
48 |
break;
|
49 |
case 'contact-consent':
|
50 |
if ( cscf_PluginSettings::ContactConsent() ) {
|
51 |
-
$this->ContactConsent = sanitize_text_field($value);
|
52 |
}
|
53 |
break;
|
54 |
default:
|
55 |
-
$cscf[$key] =
|
56 |
}
|
57 |
-
}
|
58 |
|
59 |
if ( isset( $_POST['post-id'] ) ) {
|
60 |
$this->PostID = sanitize_text_field( $_POST['post-id'] );
|
@@ -157,10 +157,10 @@ class cscf_Contact {
|
|
157 |
$header = "Content-Type: text/plain\r\nReply-To: " . $this->Email . "\r\n";
|
158 |
|
159 |
//message
|
160 |
-
$message = esc_html__( 'From: ', 'clean-and-simple-contact-form-by-meg-nicholas' ) . esc_attr($this->Name). "\r\n";
|
161 |
-
$message .= esc_html__( 'Email: ', 'clean-and-simple-contact-form-by-meg-nicholas' ) . esc_attr($this->Email) . "\r\n";
|
162 |
$message .= esc_html__( 'Page URL: ', 'clean-and-simple-contact-form-by-meg-nicholas' ) . get_permalink( $this->PostID ) . "\r\n";
|
163 |
-
$message .= esc_html__( 'Message:', 'clean-and-simple-contact-form-by-meg-nicholas' ) . "\n\n" . esc_html($this->Message) . "\r\n";
|
164 |
$message .= cscf_PluginSettings::ContactConsentMsg() . ': ' . ( $this->ContactConsent ? esc_html__( 'yes', 'clean-and-simple-contact-form-by-meg-nicholas' ) : esc_html__( 'no', 'clean-and-simple-contact-form-by-meg-nicholas' ) );
|
165 |
|
166 |
|
26 |
$this->RecaptchaPrivateKey = cscf_PluginSettings::PrivateKey();
|
27 |
}
|
28 |
|
29 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
30 |
if ( isset( $_POST['cscf'] ) ) {
|
31 |
+
$cscf = (array) $_POST['cscf'];
|
32 |
+
foreach ( $cscf as $key => $value ) {
|
33 |
+
switch ( $key ) {
|
34 |
case 'name':
|
35 |
+
$this->Name = sanitize_text_field( $value );
|
36 |
break;
|
37 |
case 'email':
|
38 |
+
$this->Email = sanitize_email( $value );
|
39 |
break;
|
40 |
case 'confirm-email':
|
41 |
+
$this->ConfirmEmail = sanitize_email( $value );
|
42 |
break;
|
43 |
case 'email-sender':
|
44 |
+
$this->EmailToSender = sanitize_text_field( $value );
|
45 |
break;
|
46 |
case 'message':
|
47 |
+
$this->Message = sanitize_textarea_field( $value );
|
48 |
break;
|
49 |
case 'contact-consent':
|
50 |
if ( cscf_PluginSettings::ContactConsent() ) {
|
51 |
+
$this->ContactConsent = sanitize_text_field( $value );
|
52 |
}
|
53 |
break;
|
54 |
default:
|
55 |
+
$cscf[ $key ] = null; // should never get this but just in case.
|
56 |
}
|
57 |
+
}
|
58 |
|
59 |
if ( isset( $_POST['post-id'] ) ) {
|
60 |
$this->PostID = sanitize_text_field( $_POST['post-id'] );
|
157 |
$header = "Content-Type: text/plain\r\nReply-To: " . $this->Email . "\r\n";
|
158 |
|
159 |
//message
|
160 |
+
$message = esc_html__( 'From: ', 'clean-and-simple-contact-form-by-meg-nicholas' ) . esc_attr( $this->Name ) . "\r\n";
|
161 |
+
$message .= esc_html__( 'Email: ', 'clean-and-simple-contact-form-by-meg-nicholas' ) . esc_attr( $this->Email ) . "\r\n";
|
162 |
$message .= esc_html__( 'Page URL: ', 'clean-and-simple-contact-form-by-meg-nicholas' ) . get_permalink( $this->PostID ) . "\r\n";
|
163 |
+
$message .= esc_html__( 'Message:', 'clean-and-simple-contact-form-by-meg-nicholas' ) . "\n\n" . esc_html( $this->Message ) . "\r\n";
|
164 |
$message .= cscf_PluginSettings::ContactConsentMsg() . ': ' . ( $this->ContactConsent ? esc_html__( 'yes', 'clean-and-simple-contact-form-by-meg-nicholas' ) : esc_html__( 'no', 'clean-and-simple-contact-form-by-meg-nicholas' ) );
|
165 |
|
166 |
|
class.cscf_filters.php
CHANGED
@@ -12,19 +12,20 @@ class cscf_Filters {
|
|
12 |
|
13 |
function wp_mail_from( $orig ) {
|
14 |
|
15 |
-
// This is copied from pluggable.php
|
|
|
16 |
|
17 |
// Get the site domain and get rid of www.
|
18 |
-
$sitename =
|
19 |
-
if (
|
20 |
$sitename = substr( $sitename, 4 );
|
21 |
}
|
22 |
|
23 |
-
$
|
24 |
// End of copied code
|
25 |
|
26 |
// If the from email is not the default, return it unchanged
|
27 |
-
if ( $orig != $
|
28 |
return $orig;
|
29 |
}
|
30 |
|
12 |
|
13 |
function wp_mail_from( $orig ) {
|
14 |
|
15 |
+
// This is copied from pluggable.php lines 348-354 as at revision 10150
|
16 |
+
// http://trac.wordpress.org/browser/branches/2.7/wp-includes/pluggable.php#L348
|
17 |
|
18 |
// Get the site domain and get rid of www.
|
19 |
+
$sitename = strtolower( $_SERVER['SERVER_NAME'] );
|
20 |
+
if ( substr( $sitename, 0, 4 ) == 'www.' ) {
|
21 |
$sitename = substr( $sitename, 4 );
|
22 |
}
|
23 |
|
24 |
+
$default_from = 'wordpress@' . $sitename;
|
25 |
// End of copied code
|
26 |
|
27 |
// If the from email is not the default, return it unchanged
|
28 |
+
if ( $orig != $default_from ) {
|
29 |
return $orig;
|
30 |
}
|
31 |
|
clean-and-simple-contact-form-by-meg-nicholas.php
CHANGED
@@ -7,8 +7,8 @@
|
|
7 |
Plugin Name: Clean and Simple Contact Form
|
8 |
Plugin URI: https://fullworks.net/productsclean-and-simple-contact-form
|
9 |
Description: A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
|
10 |
-
Version: 4.7.
|
11 |
-
Author:
|
12 |
Author URI: https://fullworks.net
|
13 |
License: GPLv2 or later
|
14 |
Text Domain: clean-and-simple-contact-form
|
7 |
Plugin Name: Clean and Simple Contact Form
|
8 |
Plugin URI: https://fullworks.net/productsclean-and-simple-contact-form
|
9 |
Description: A clean and simple contact form with Google reCAPTCHA and Twitter Bootstrap markup.
|
10 |
+
Version: 4.7.4
|
11 |
+
Author: Fullworks
|
12 |
Author URI: https://fullworks.net
|
13 |
License: GPLv2 or later
|
14 |
Text Domain: clean-and-simple-contact-form
|
readme.txt
CHANGED
@@ -4,9 +4,9 @@ License: GPLv2 or later
|
|
4 |
License URI: http://www.gnu.org/licenses/gpl.html
|
5 |
Tags: simple, contact, form, contact button, contact form, contact form plugin, akismet, contacts, contacts form plugin, contact me, feedback form, bootstrap, twitter, google, reCAPTCHA, ajax, secure
|
6 |
Requires at least: 4.6
|
7 |
-
Tested up to: 5.
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 4.7.
|
10 |
|
11 |
A clean and simple AJAX contact form with Google reCAPTCHA, Twitter Bootstrap markup and Akismet spam filtering.
|
12 |
|
@@ -197,8 +197,11 @@ the reCAPTCHA for the contact form will be displayed correctly but not in the co
|
|
197 |
The comments form will never validate due to no supplied reCAPTCHA code.
|
198 |
|
199 |
== Changelog ==
|
|
|
|
|
|
|
200 |
= 4.7.3 =
|
201 |
-
*
|
202 |
|
203 |
= 4.7.2 =
|
204 |
* Updated santization and escaping to current plugin directory recommendations
|
4 |
License URI: http://www.gnu.org/licenses/gpl.html
|
5 |
Tags: simple, contact, form, contact button, contact form, contact form plugin, akismet, contacts, contacts form plugin, contact me, feedback form, bootstrap, twitter, google, reCAPTCHA, ajax, secure
|
6 |
Requires at least: 4.6
|
7 |
+
Tested up to: 5.7
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 4.7.4
|
10 |
|
11 |
A clean and simple AJAX contact form with Google reCAPTCHA, Twitter Bootstrap markup and Akismet spam filtering.
|
12 |
|
197 |
The comments form will never validate due to no supplied reCAPTCHA code.
|
198 |
|
199 |
== Changelog ==
|
200 |
+
= 4.7.4 =
|
201 |
+
* correct santization
|
202 |
+
|
203 |
= 4.7.3 =
|
204 |
+
* correct from email in certain circumstances
|
205 |
|
206 |
= 4.7.2 =
|
207 |
* Updated santization and escaping to current plugin directory recommendations
|
views/contact-form.view.php
CHANGED
@@ -1,215 +1,216 @@
|
|
1 |
<div id="cscf" class="cscfBlock">
|
2 |
-
|
3 |
-
<?php echo wp_kses_post($messageSentView->Render()); ?>
|
4 |
-
|
5 |
-
|
6 |
-
<?php echo wp_kses_post($messageNotSentView->Render()); ?>
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
<?php wp_nonce_field( 'cscf_contact', 'cscf_nonce' ); ?>
|
13 |
-
|
14 |
|
15 |
<?php if ( isset( $contact->Errors['recaptcha'] ) ) { ?>
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
<?php } ?>
|
20 |
|
21 |
-
|
22 |
-
|
23 |
echo ' error has-error';
|
24 |
} ?>">
|
25 |
-
|
26 |
|
27 |
|
28 |
-
|
29 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
30 |
-
|
31 |
<?php } ?>
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
<span for="cscf_name" class="help-inline help-block error"
|
41 |
style="display:<?php echo isset( $contact->Errors['name'] ) ? 'block' : 'none'; ?>;">
|
42 |
|
43 |
<?php if ( isset( $contact->Errors['name'] ) ) {
|
44 |
-
echo $contact->Errors['name'];
|
45 |
} ?>
|
46 |
</span>
|
47 |
-
|
48 |
|
49 |
|
50 |
-
|
51 |
-
|
52 |
echo ' error has-error';
|
53 |
} ?>">
|
54 |
-
|
55 |
|
56 |
-
|
57 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
58 |
-
|
59 |
<?php } ?>
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
<span for="cscf_email" class="help-inline help-block error"
|
71 |
style="display:<?php echo isset( $contact->Errors['email'] ) ? 'block' : 'none'; ?>;">
|
72 |
<?php if ( isset( $contact->Errors['email'] ) ) {
|
73 |
-
echo esc_html($contact->Errors['email']);
|
74 |
} ?>
|
75 |
</span>
|
76 |
-
|
77 |
|
78 |
<?php if ( $confirmEmail ) { ?>
|
79 |
-
|
80 |
-
|
81 |
echo ' error has-error';
|
82 |
} ?>">
|
83 |
-
|
84 |
-
|
85 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
86 |
-
|
87 |
<?php } ?>
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
<?php if ( isset( $contact->Errors['confirm-email'] ) ) {
|
103 |
-
echo esc_attr($contact->Errors['confirm-email']);
|
104 |
} ?>
|
105 |
</span>
|
106 |
-
|
107 |
<?php } ?>
|
108 |
|
109 |
|
110 |
-
|
111 |
-
|
112 |
echo ' error has-error';
|
113 |
} ?>">
|
114 |
-
|
115 |
-
|
116 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
117 |
-
|
118 |
<?php } ?>
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
<?php if ( isset( $contact->Errors['message'] ) ) {
|
129 |
-
echo esc_attr($contact->Errors['message']);
|
130 |
} ?>
|
131 |
</span>
|
132 |
-
|
133 |
|
134 |
<?php if ( cscf_PluginSettings::EmailToSender() ) { ?>
|
135 |
-
|
136 |
-
|
137 |
echo ' error has-error';
|
138 |
} ?>">
|
139 |
-
|
140 |
-
|
141 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
142 |
-
|
143 |
<?php } ?>
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
<?php if ( isset( $contact->Errors['email-sender'] ) ) {
|
151 |
-
echo esc_attr($contact->Errors['email-sender']);
|
152 |
} ?>
|
153 |
</span>
|
154 |
-
|
155 |
<?php } ?>
|
156 |
|
157 |
|
158 |
|
159 |
<?php if ( cscf_PluginSettings::ContactConsent() ) { ?>
|
160 |
-
|
161 |
-
|
162 |
echo ' error has-error';
|
163 |
} ?>">
|
164 |
-
|
165 |
-
|
|
|
166 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
167 |
-
|
168 |
<?php } ?>
|
169 |
-
|
170 |
data-msg-required="<?php esc_html_e( 'Please give your consent.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
<?php if ( isset( $contact->Errors['contact-consent'] ) ) {
|
178 |
-
echo $contact->Errors['contact-consent'];
|
179 |
} ?>
|
180 |
</span>
|
181 |
-
|
182 |
<?php } ?>
|
183 |
|
184 |
-
|
185 |
<?php if ( $contact->RecaptchaPublicKey <> '' && $contact->RecaptchaPrivateKey <> '' ) { ?>
|
186 |
|
187 |
-
|
188 |
if ( isset( $contact->Errors['recaptcha'] ) ) {
|
189 |
echo ' error has-error';
|
190 |
} ?>">
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
|
195 |
|
196 |
-
|
197 |
-
|
198 |
-
echo $contact->Errors['recaptcha'];
|
199 |
} ?></div>
|
200 |
|
201 |
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px;
|
214 |
background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
|
215 |
<textarea id="g-recaptcha-response" name="g-recaptcha-response"
|
@@ -217,15 +218,16 @@
|
|
217 |
style="width: 250px; height: 40px; border: 1px solid #c1c1c1;
|
218 |
margin: 10px 25px; padding: 0px; resize: none;">
|
219 |
</textarea>
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
|
225 |
-
|
226 |
-
|
227 |
<?php } ?>
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
231 |
</div>
|
1 |
<div id="cscf" class="cscfBlock">
|
2 |
+
<div class="cscfMessageSent" style="display:none;">
|
3 |
+
<?php echo wp_kses_post( $messageSentView->Render() ); ?>
|
4 |
+
</div>
|
5 |
+
<div class="cscfMessageNotSent" style="display:none;">
|
6 |
+
<?php echo wp_kses_post( $messageNotSentView->Render() ); ?>
|
7 |
+
</div>
|
8 |
+
<div class="cscfForm">
|
9 |
+
<p><?php echo wp_kses_post( $message ); ?></p>
|
10 |
+
|
11 |
+
<form role="form" id="frmCSCF" name="frmCSCF" method="post">
|
12 |
<?php wp_nonce_field( 'cscf_contact', 'cscf_nonce' ); ?>
|
13 |
+
<input type="hidden" name="post-id" value="<?php echo esc_attr( $postID ); ?>">
|
14 |
|
15 |
<?php if ( isset( $contact->Errors['recaptcha'] ) ) { ?>
|
16 |
+
<div class="control-group form-group">
|
17 |
+
<p class="text-error"><?php echo esc_html( $contact->Errors['recaptcha'] ); ?></p>
|
18 |
+
</div>
|
19 |
<?php } ?>
|
20 |
|
21 |
+
<!-- name -->
|
22 |
+
<div class="control-group form-group<?php if ( isset( $contact->Errors['name'] ) ) {
|
23 |
echo ' error has-error';
|
24 |
} ?>">
|
25 |
+
<label for="cscf_name"><?php esc_html_e( 'Name:', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?></label>
|
26 |
|
27 |
|
28 |
+
<div class="<?php echo ( true === cscf_PluginSettings::InputIcons() ) ? 'input-group' : ''; ?>">
|
29 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
30 |
+
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
|
31 |
<?php } ?>
|
32 |
+
<input class="form-control input-xlarge"
|
33 |
+
data-rule-required="true"
|
34 |
+
data-msg-required="<?php esc_html_e( 'Please give your name.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
35 |
+
type="text" id="cscf_name" name="cscf[name]"
|
36 |
+
value="<?php echo esc_attr( $contact->Name ); ?>"
|
37 |
+
placeholder="<?php esc_html_e( 'Your Name', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
38 |
+
/>
|
39 |
+
</div>
|
40 |
<span for="cscf_name" class="help-inline help-block error"
|
41 |
style="display:<?php echo isset( $contact->Errors['name'] ) ? 'block' : 'none'; ?>;">
|
42 |
|
43 |
<?php if ( isset( $contact->Errors['name'] ) ) {
|
44 |
+
echo esc_html( $contact->Errors['name'] );
|
45 |
} ?>
|
46 |
</span>
|
47 |
+
</div>
|
48 |
|
49 |
|
50 |
+
<!--email address-->
|
51 |
+
<div class="control-group form-group<?php if ( isset( $contact->Errors['email'] ) ) {
|
52 |
echo ' error has-error';
|
53 |
} ?>">
|
54 |
+
<label for="cscf_email"><?php esc_html_e( 'Email Address:', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?></label>
|
55 |
|
56 |
+
<div class="<?php echo ( true === cscf_PluginSettings::InputIcons() ) ? 'input-group' : ''; ?>">
|
57 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
58 |
+
<span class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></span>
|
59 |
<?php } ?>
|
60 |
+
<input class="form-control input-xlarge"
|
61 |
+
data-rule-required="true"
|
62 |
+
data-rule-email="true"
|
63 |
+
data-msg-required="<?php esc_html_e( 'Please give your email address.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
64 |
+
data-msg-email="<?php esc_html_e( 'Please enter a valid email address.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
65 |
+
type="email" id="cscf_email" name="cscf[email]"
|
66 |
+
value="<?php echo esc_attr( $contact->Email ); ?>"
|
67 |
+
placeholder="<?php esc_html_e( 'Your Email Address', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
68 |
+
/>
|
69 |
+
</div>
|
70 |
<span for="cscf_email" class="help-inline help-block error"
|
71 |
style="display:<?php echo isset( $contact->Errors['email'] ) ? 'block' : 'none'; ?>;">
|
72 |
<?php if ( isset( $contact->Errors['email'] ) ) {
|
73 |
+
echo esc_html( $contact->Errors['email'] );
|
74 |
} ?>
|
75 |
</span>
|
76 |
+
</div>
|
77 |
|
78 |
<?php if ( $confirmEmail ) { ?>
|
79 |
+
<!--confirm email address -->
|
80 |
+
<div class="control-group form-group<?php if ( isset( $contact->Errors['confirm-email'] ) ) {
|
81 |
echo ' error has-error';
|
82 |
} ?>">
|
83 |
+
<label for="cscf_confirm-email"><?php esc_html_e( 'Confirm Email Address:', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?></label>
|
84 |
+
<div class="<?php echo ( true === cscf_PluginSettings::InputIcons() ) ? 'input-group' : ''; ?>">
|
85 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
86 |
+
<span class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></span>
|
87 |
<?php } ?>
|
88 |
+
<input class="form-control input-xlarge"
|
89 |
+
data-rule-required="true"
|
90 |
+
data-rule-email="true"
|
91 |
+
data-rule-equalTo="#cscf_email"
|
92 |
+
data-msg-required="<?php esc_html_e( 'Please enter the same email address again.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
93 |
+
data-msg-email="<?php esc_html_e( 'Please enter a valid email address.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
94 |
+
data-msg-equalTo="<?php esc_html_e( 'Please enter the same email address again.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
95 |
+
type="email" id="cscf_confirm-email" name="cscf[confirm-email]"
|
96 |
+
value="<?php echo esc_attr( $contact->ConfirmEmail ); ?>"
|
97 |
+
placeholder="<?php esc_html_e( 'Confirm Your Email Address', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
98 |
+
/>
|
99 |
+
</div>
|
100 |
+
<span for="cscf_confirm-email" class="help-inline help-block error"
|
101 |
+
style="display:<?php echo isset( $contact->Errors['confirm-email'] ) ? 'block' : 'none'; ?>;">
|
102 |
<?php if ( isset( $contact->Errors['confirm-email'] ) ) {
|
103 |
+
echo esc_attr( $contact->Errors['confirm-email'] );
|
104 |
} ?>
|
105 |
</span>
|
106 |
+
</div>
|
107 |
<?php } ?>
|
108 |
|
109 |
|
110 |
+
<!-- message -->
|
111 |
+
<div class="control-group form-group<?php if ( isset( $contact->Errors['message'] ) ) {
|
112 |
echo ' error has-error';
|
113 |
} ?>">
|
114 |
+
<label for="cscf_message"><?php esc_html_e( 'Message:', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?></label>
|
115 |
+
<div class="<?php echo ( true === cscf_PluginSettings::InputIcons() ) ? 'input-group' : ''; ?>">
|
116 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
117 |
+
<span class="input-group-addon"><span class="glyphicon glyphicon-comment"></span></span>
|
118 |
<?php } ?>
|
119 |
+
<textarea class="form-control input-xlarge"
|
120 |
+
data-rule-required="true"
|
121 |
+
data-msg-required="<?php esc_html_e( 'Please give a message.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
122 |
+
id="cscf_message" name="cscf[message]" rows="10"
|
123 |
+
placeholder="<?php esc_html_e( 'Your Message', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"><?php echo esc_textarea( $contact->Message ); ?></textarea>
|
124 |
+
</div>
|
125 |
+
|
126 |
+
<span for="cscf_message" class="help-inline help-block error"
|
127 |
+
style="display:<?php echo isset( $contact->Errors['message'] ) ? 'block' : 'none'; ?>;">
|
128 |
<?php if ( isset( $contact->Errors['message'] ) ) {
|
129 |
+
echo esc_attr( $contact->Errors['message'] );
|
130 |
} ?>
|
131 |
</span>
|
132 |
+
</div>
|
133 |
|
134 |
<?php if ( cscf_PluginSettings::EmailToSender() ) { ?>
|
135 |
+
<!-- email to sender -->
|
136 |
+
<div class="control-group form-group<?php if ( isset( $contact->Errors['email-sender'] ) ) {
|
137 |
echo ' error has-error';
|
138 |
} ?>">
|
139 |
+
<label for="cscf_email-sender"><?php esc_html_e( 'Send me a copy:', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?></label>
|
140 |
+
<div class="<?php echo ( true === cscf_PluginSettings::InputIcons() ) ? "input-group" : ""; ?>">
|
141 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
142 |
+
<span class="input-group-addon"><span class="glyphicon glyphicon-comment"></span></span>
|
143 |
<?php } ?>
|
144 |
+
<input <?php echo ( true == $contact->EmailToSender ) ? 'checked' : ''; ?> type="checkbox"
|
145 |
+
id="cscf_email-sender"
|
146 |
+
name="cscf[email-sender]">
|
147 |
+
</div>
|
148 |
+
<span for="cscf_email-sender" class="help-inline help-block error"
|
149 |
+
style="display:<?php echo isset( $contact->Errors['email-sender'] ) ? 'block' : 'none'; ?>;">
|
150 |
<?php if ( isset( $contact->Errors['email-sender'] ) ) {
|
151 |
+
echo esc_attr( $contact->Errors['email-sender'] );
|
152 |
} ?>
|
153 |
</span>
|
154 |
+
</div>
|
155 |
<?php } ?>
|
156 |
|
157 |
|
158 |
|
159 |
<?php if ( cscf_PluginSettings::ContactConsent() ) { ?>
|
160 |
+
<!-- contact consent -->
|
161 |
+
<div class="control-group form-group<?php if ( isset( $contact->Errors['contact-consent'] ) ) {
|
162 |
echo ' error has-error';
|
163 |
} ?>">
|
164 |
+
<label for="cscf_contact-consent"><?php echo esc_html( cscf_PluginSettings::ContactConsentMsg() ); ?>
|
165 |
+
:</label>
|
166 |
+
<div class="<?php echo ( cscf_PluginSettings::InputIcons() ) ? "input-group" : ""; ?>">
|
167 |
<?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
|
168 |
+
<span class="input-group-addon"><span class="glyphicon glyphicon-comment"></span></span>
|
169 |
<?php } ?>
|
170 |
+
<input data-rule-required="true"
|
171 |
data-msg-required="<?php esc_html_e( 'Please give your consent.', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"
|
172 |
+
<?php echo ( true === $contact->ContactConsent ) ? 'checked' : ''; ?> type="checkbox"
|
173 |
+
id="cscf_contact-consent"
|
174 |
+
name="cscf[contact-consent]">
|
175 |
+
</div>
|
176 |
+
<span for="cscf[contact-consent]" class="help-inline help-block error"
|
177 |
+
style="display:<?php echo isset( $contact->Errors['contact-consent'] ) ? 'block' : 'none'; ?>;">
|
178 |
<?php if ( isset( $contact->Errors['contact-consent'] ) ) {
|
179 |
+
echo esc_html( $contact->Errors['contact-consent'] );
|
180 |
} ?>
|
181 |
</span>
|
182 |
+
</div>
|
183 |
<?php } ?>
|
184 |
|
185 |
+
<!-- recaptcha -->
|
186 |
<?php if ( $contact->RecaptchaPublicKey <> '' && $contact->RecaptchaPrivateKey <> '' ) { ?>
|
187 |
|
188 |
+
<div class="control-group form-group<?php
|
189 |
if ( isset( $contact->Errors['recaptcha'] ) ) {
|
190 |
echo ' error has-error';
|
191 |
} ?>">
|
192 |
+
<div id="recaptcha_div">
|
193 |
+
<div class="g-recaptcha" data-theme="<?php echo esc_attr( cscf_PluginSettings::Theme() ); ?>"
|
194 |
+
data-sitekey="<?php echo esc_attr( $contact->RecaptchaPublicKey ); ?>"></div>
|
195 |
|
196 |
|
197 |
+
<div for="cscf_recaptcha"
|
198 |
+
class="help-block has-error error"><?php if ( isset( $contact->Errors['recaptcha'] ) ) {
|
199 |
+
echo esc_html( $contact->Errors['recaptcha'] );
|
200 |
} ?></div>
|
201 |
|
202 |
|
203 |
+
<noscript>
|
204 |
+
<div style="width: 302px; height: 422px;">
|
205 |
+
<div style="width: 302px; height: 422px; position: relative;">
|
206 |
+
<div style="width: 302px; height: 422px; position: absolute;">
|
207 |
+
<iframe
|
208 |
+
src="https://www.google.com/recaptcha/api/fallback?k=<?php echo esc_attr( $contact->RecaptchaPublicKey ); ?>"
|
209 |
+
frameborder="0" scrolling="no"
|
210 |
+
style="width: 302px; height:422px; border-style: none;">
|
211 |
+
</iframe>
|
212 |
+
</div>
|
213 |
+
<div style="width: 300px; height: 60px; border-style: none;
|
214 |
bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px;
|
215 |
background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
|
216 |
<textarea id="g-recaptcha-response" name="g-recaptcha-response"
|
218 |
style="width: 250px; height: 40px; border: 1px solid #c1c1c1;
|
219 |
margin: 10px 25px; padding: 0px; resize: none;">
|
220 |
</textarea>
|
221 |
+
</div>
|
222 |
+
</div>
|
223 |
+
</div>
|
224 |
+
</noscript>
|
225 |
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
<?php } ?>
|
229 |
+
<input type="submit" id="cscf_SubmitButton" class="btn btn-default"
|
230 |
+
value="<?php esc_html_e( 'Send Message', 'clean-and-simple-contact-form-by-meg-nicholas' ); ?>"/>
|
231 |
+
</form>
|
232 |
+
</div>
|
233 |
</div>
|