Version Description
Download this release
Release Info
Developer | takayukister |
Plugin | ![]() |
Version | 1.9.2 |
Comparing to | |
See all releases |
Code changes from version 1.9.1 to 1.9.2
- README.txt +4 -1
- admin-stylesheet-rtl.css +22 -0
- contact-form-7.js +7 -0
- includes/admin-panel.php +4 -0
- languages/wpcf7-vi.mo +0 -0
- languages/wpcf7-vi.po +405 -0
- stylesheet-rtl.css +12 -0
- wp-contact-form-7.php +124 -11
- wpcf7-admin.js +49 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://takayukister.chipin.com/contact-form-7-20
|
|
4 |
Tags: contact form, email, ajax, captcha, akismet
|
5 |
Requires at least: 2.5
|
6 |
Tested up to: 2.7
|
7 |
-
Stable tag: 1.9.
|
8 |
|
9 |
Just another contact form plugin. Simple but flexible.
|
10 |
|
@@ -50,6 +50,7 @@ Since being published in August 2007, Contact Form 7 has been translated into a
|
|
50 |
* Swedish (sv_SE) - [Fredrik Jonsson](http://www.fredda-o-ac.se/)
|
51 |
* Turkish (tr_TR) - [Roman Neumuller](http://katpatuka.wordpress.com) (updated by [Hasan Yılmaz](http://hedefturkce.com/))
|
52 |
* Ukrainian (uk_UA) - [Andrey Kovba](http://myserver.com.ua/)
|
|
|
53 |
|
54 |
If you have created your own language pack, or have an update of an existing one, you can send [gettext .po and .mo files](http://codex.wordpress.org/Translating_WordPress) to me so that I can bundle it into Contact Form 7.
|
55 |
|
@@ -69,6 +70,8 @@ Please see [FAQ](http://ideasilo.wordpress.com/2008/03/29/contact-form-7-faq/).
|
|
69 |
If you have any further questions,
|
70 |
please submit them [to the support forum](http://wordpress.org/tags/contact-form-7#postform).
|
71 |
|
|
|
|
|
72 |
== Screenshots ==
|
73 |
|
74 |
1. screenshot-1.png
|
4 |
Tags: contact form, email, ajax, captcha, akismet
|
5 |
Requires at least: 2.5
|
6 |
Tested up to: 2.7
|
7 |
+
Stable tag: 1.9.2
|
8 |
|
9 |
Just another contact form plugin. Simple but flexible.
|
10 |
|
50 |
* Swedish (sv_SE) - [Fredrik Jonsson](http://www.fredda-o-ac.se/)
|
51 |
* Turkish (tr_TR) - [Roman Neumuller](http://katpatuka.wordpress.com) (updated by [Hasan Yılmaz](http://hedefturkce.com/))
|
52 |
* Ukrainian (uk_UA) - [Andrey Kovba](http://myserver.com.ua/)
|
53 |
+
* Vietnamese (vi) - Thanh Hải, Hà
|
54 |
|
55 |
If you have created your own language pack, or have an update of an existing one, you can send [gettext .po and .mo files](http://codex.wordpress.org/Translating_WordPress) to me so that I can bundle it into Contact Form 7.
|
56 |
|
70 |
If you have any further questions,
|
71 |
please submit them [to the support forum](http://wordpress.org/tags/contact-form-7#postform).
|
72 |
|
73 |
+
Attention: [Check your site before reporting trouble, please!](http://ideasilo.wordpress.com/2009/01/20/check-your-site-before-reporting-trouble-please/)
|
74 |
+
|
75 |
== Screenshots ==
|
76 |
|
77 |
1. screenshot-1.png
|
admin-stylesheet-rtl.css
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
ul.subsubsub li.addnew {
|
2 |
+
margin-left: 0;
|
3 |
+
margin-right: 0.5em;
|
4 |
+
}
|
5 |
+
div.save-contact-form {
|
6 |
+
direction: rtl;
|
7 |
+
}
|
8 |
+
div.delete-link {
|
9 |
+
right: auto;
|
10 |
+
left: 0;
|
11 |
+
}
|
12 |
+
span#message-fields-toggle-switch {
|
13 |
+
margin-left: 0;
|
14 |
+
margin-right: 1em;
|
15 |
+
}
|
16 |
+
div.tg-pane table caption {
|
17 |
+
text-align: right;
|
18 |
+
}
|
19 |
+
div.tg-dropdown {
|
20 |
+
left: auto;
|
21 |
+
right: 0;
|
22 |
+
}
|
contact-form-7.js
CHANGED
@@ -71,6 +71,13 @@ function wpcf7ProcessJson(data) {
|
|
71 |
jQuery(data.into).find('input:hidden[@name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[1]);
|
72 |
});
|
73 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
if (1 == data.spam) {
|
75 |
wpcf7ResponseOutput.addClass('wpcf7-spam-blocked');
|
76 |
}
|
71 |
jQuery(data.into).find('input:hidden[@name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[1]);
|
72 |
});
|
73 |
}
|
74 |
+
if (data.quiz) {
|
75 |
+
jQuery.each(data.quiz, function(i, n) {
|
76 |
+
jQuery(data.into).find(':input[@name="' + i + '"]').clearFields();
|
77 |
+
jQuery(data.into).find(':input[@name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[0]);
|
78 |
+
jQuery(data.into).find('input:hidden[@name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[1]);
|
79 |
+
});
|
80 |
+
}
|
81 |
if (1 == data.spam) {
|
82 |
wpcf7ResponseOutput.addClass('wpcf7-spam-blocked');
|
83 |
}
|
includes/admin-panel.php
CHANGED
@@ -220,6 +220,10 @@
|
|
220 |
<label for="wpcf7-message-accept-terms"><em># <?php _e("There is a field of term that sender is needed to accept", 'wpcf7'); ?></em></label><br />
|
221 |
<input type="text" id="wpcf7-message-accept-terms" name="wpcf7-message-accept-terms" class="wide" size="70" value="<?php echo htmlspecialchars($cf['messages']['accept_terms']); ?>" />
|
222 |
</div>
|
|
|
|
|
|
|
|
|
223 |
<div class="message-field">
|
224 |
<label for="wpcf7-message-captcha-not-match"><em># <?php _e("The code that sender entered does not match the CAPTCHA", 'wpcf7'); ?></em></label><br />
|
225 |
<input type="text" id="wpcf7-message-captcha-not-match" name="wpcf7-message-captcha-not-match" class="wide" size="70" value="<?php echo htmlspecialchars($cf['messages']['captcha_not_match']); ?>" />
|
220 |
<label for="wpcf7-message-accept-terms"><em># <?php _e("There is a field of term that sender is needed to accept", 'wpcf7'); ?></em></label><br />
|
221 |
<input type="text" id="wpcf7-message-accept-terms" name="wpcf7-message-accept-terms" class="wide" size="70" value="<?php echo htmlspecialchars($cf['messages']['accept_terms']); ?>" />
|
222 |
</div>
|
223 |
+
<div class="message-field">
|
224 |
+
<label for="wpcf7-message-quiz-answer-not-correct"><em># <?php _e("Sender doesn't enter the correct answer to the quiz", 'wpcf7'); ?></em></label><br />
|
225 |
+
<input type="text" id="wpcf7-message-quiz-answer-not-correct" name="wpcf7-message-quiz-answer-not-correct" class="wide" size="70" value="<?php echo htmlspecialchars($cf['messages']['quiz_answer_not_correct']); ?>" />
|
226 |
+
</div>
|
227 |
<div class="message-field">
|
228 |
<label for="wpcf7-message-captcha-not-match"><em># <?php _e("The code that sender entered does not match the CAPTCHA", 'wpcf7'); ?></em></label><br />
|
229 |
<input type="text" id="wpcf7-message-captcha-not-match" name="wpcf7-message-captcha-not-match" class="wide" size="70" value="<?php echo htmlspecialchars($cf['messages']['captcha_not_match']); ?>" />
|
languages/wpcf7-vi.mo
ADDED
Binary file
|
languages/wpcf7-vi.po
ADDED
@@ -0,0 +1,405 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Contact Form 7\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2008-12-07 00:21+0900\n"
|
6 |
+
"PO-Revision-Date: 2009-01-08 18:00+0700\n"
|
7 |
+
"Last-Translator: Thanh Hai, Ha <thanhhai.ha@gmail.com>\n"
|
8 |
+
"Language-Team: Thanh Hai, ha <thanhhai.ha@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-SourceCharset: utf-8\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-Poedit-Language: Vietnamese\n"
|
17 |
+
"X-Poedit-Country: VIET NAM\n"
|
18 |
+
"X-Poedit-SearchPath-0: contact-form-7\n"
|
19 |
+
|
20 |
+
#: contact-form-7/wp-contact-form-7.php:391
|
21 |
+
msgid "Contact form"
|
22 |
+
msgstr "Biểu mẫu liên hệ"
|
23 |
+
|
24 |
+
#: contact-form-7/wp-contact-form-7.php:548
|
25 |
+
#: contact-form-7/includes/admin-panel.php:5
|
26 |
+
msgid "Contact Form 7"
|
27 |
+
msgstr "Contact Form 7"
|
28 |
+
|
29 |
+
#: contact-form-7/wp-contact-form-7.php:566
|
30 |
+
msgid "optional"
|
31 |
+
msgstr "tùy chọn"
|
32 |
+
|
33 |
+
#: contact-form-7/wp-contact-form-7.php:567
|
34 |
+
msgid "Generate Tag"
|
35 |
+
msgstr "Tạo Thẻ"
|
36 |
+
|
37 |
+
#: contact-form-7/wp-contact-form-7.php:568
|
38 |
+
msgid "Text field"
|
39 |
+
msgstr "Trường văn bản"
|
40 |
+
|
41 |
+
#: contact-form-7/wp-contact-form-7.php:569
|
42 |
+
msgid "Email field"
|
43 |
+
msgstr "Trường thư điện tử"
|
44 |
+
|
45 |
+
#: contact-form-7/wp-contact-form-7.php:570
|
46 |
+
msgid "Text area"
|
47 |
+
msgstr "Khung nhập liệu"
|
48 |
+
|
49 |
+
#: contact-form-7/wp-contact-form-7.php:571
|
50 |
+
msgid "Drop-down menu"
|
51 |
+
msgstr "Danh sách chọn"
|
52 |
+
|
53 |
+
#: contact-form-7/wp-contact-form-7.php:572
|
54 |
+
msgid "Checkboxes"
|
55 |
+
msgstr "Ô kiểm"
|
56 |
+
|
57 |
+
#: contact-form-7/wp-contact-form-7.php:573
|
58 |
+
msgid "Radio buttons"
|
59 |
+
msgstr "Nút chọn"
|
60 |
+
|
61 |
+
#: contact-form-7/wp-contact-form-7.php:574
|
62 |
+
msgid "Acceptance"
|
63 |
+
msgstr "Chấp nhận"
|
64 |
+
|
65 |
+
#: contact-form-7/wp-contact-form-7.php:575
|
66 |
+
msgid "Make this checkbox checked by default?"
|
67 |
+
msgstr "Mặc định chọn sẵn"
|
68 |
+
|
69 |
+
#: contact-form-7/wp-contact-form-7.php:576
|
70 |
+
msgid "Make this checkbox work inversely?"
|
71 |
+
msgstr "Có tác dụng ngược lại"
|
72 |
+
|
73 |
+
#: contact-form-7/wp-contact-form-7.php:577
|
74 |
+
msgid "* That means visitor who accepts the term unchecks it."
|
75 |
+
msgstr "* Có nghĩa là khách ghé không đánh dấu chọn nếu chấp nhận."
|
76 |
+
|
77 |
+
#: contact-form-7/wp-contact-form-7.php:578
|
78 |
+
msgid "CAPTCHA"
|
79 |
+
msgstr "CAPTCHA"
|
80 |
+
|
81 |
+
#: contact-form-7/wp-contact-form-7.php:579
|
82 |
+
msgid "File upload"
|
83 |
+
msgstr "Đính kèm tập tin"
|
84 |
+
|
85 |
+
#: contact-form-7/wp-contact-form-7.php:580
|
86 |
+
msgid "Submit button"
|
87 |
+
msgstr "Nút gửi"
|
88 |
+
|
89 |
+
#: contact-form-7/wp-contact-form-7.php:581
|
90 |
+
msgid "Name"
|
91 |
+
msgstr "Tên"
|
92 |
+
|
93 |
+
#: contact-form-7/wp-contact-form-7.php:582
|
94 |
+
msgid "Required field?"
|
95 |
+
msgstr "Trường bắt buộc"
|
96 |
+
|
97 |
+
#: contact-form-7/wp-contact-form-7.php:583
|
98 |
+
msgid "Allow multiple selections?"
|
99 |
+
msgstr "Cho phép chọn nhiều mục"
|
100 |
+
|
101 |
+
#: contact-form-7/wp-contact-form-7.php:584
|
102 |
+
msgid "Insert a blank item as the first option?"
|
103 |
+
msgstr "Để trống lựa chọn đầu tiên"
|
104 |
+
|
105 |
+
#: contact-form-7/wp-contact-form-7.php:585
|
106 |
+
msgid "Make checkboxes exclusive?"
|
107 |
+
msgstr "Tạo các ô kiểm riêng biệt"
|
108 |
+
|
109 |
+
#: contact-form-7/wp-contact-form-7.php:586
|
110 |
+
msgid "Choices"
|
111 |
+
msgstr "Các lựa chọn"
|
112 |
+
|
113 |
+
#: contact-form-7/wp-contact-form-7.php:587
|
114 |
+
msgid "Label"
|
115 |
+
msgstr "Nhãn"
|
116 |
+
|
117 |
+
#: contact-form-7/wp-contact-form-7.php:588
|
118 |
+
msgid "Default value"
|
119 |
+
msgstr "Giá trị mặc định"
|
120 |
+
|
121 |
+
#: contact-form-7/wp-contact-form-7.php:589
|
122 |
+
msgid "Akismet"
|
123 |
+
msgstr "Akismet"
|
124 |
+
|
125 |
+
#: contact-form-7/wp-contact-form-7.php:590
|
126 |
+
msgid "This field requires author's name"
|
127 |
+
msgstr "Yêu cầu người gửi phải nhập tên"
|
128 |
+
|
129 |
+
#: contact-form-7/wp-contact-form-7.php:591
|
130 |
+
msgid "This field requires author's URL"
|
131 |
+
msgstr "Yêu cầu người gửi phải nhập URL"
|
132 |
+
|
133 |
+
#: contact-form-7/wp-contact-form-7.php:592
|
134 |
+
msgid "This field requires author's email address"
|
135 |
+
msgstr "Yêu cầu người gửi phải nhập địa chỉ thư điện tử"
|
136 |
+
|
137 |
+
#: contact-form-7/wp-contact-form-7.php:593
|
138 |
+
msgid "Copy this code and paste it into the form left."
|
139 |
+
msgstr "Sao chép đoạn mã này và dán vào bên trái."
|
140 |
+
|
141 |
+
#: contact-form-7/wp-contact-form-7.php:594
|
142 |
+
msgid "Foreground color"
|
143 |
+
msgstr "Màu chữ"
|
144 |
+
|
145 |
+
#: contact-form-7/wp-contact-form-7.php:595
|
146 |
+
msgid "Background color"
|
147 |
+
msgstr "Màu nền"
|
148 |
+
|
149 |
+
#: contact-form-7/wp-contact-form-7.php:596
|
150 |
+
msgid "Image size"
|
151 |
+
msgstr "Kích cỡ hình ảnh"
|
152 |
+
|
153 |
+
#: contact-form-7/wp-contact-form-7.php:597
|
154 |
+
msgid "Small"
|
155 |
+
msgstr "Nhỏ"
|
156 |
+
|
157 |
+
#: contact-form-7/wp-contact-form-7.php:598
|
158 |
+
msgid "Medium"
|
159 |
+
msgstr "Vừa"
|
160 |
+
|
161 |
+
#: contact-form-7/wp-contact-form-7.php:599
|
162 |
+
msgid "Large"
|
163 |
+
msgstr "To"
|
164 |
+
|
165 |
+
#: contact-form-7/wp-contact-form-7.php:600
|
166 |
+
msgid "Image settings"
|
167 |
+
msgstr "Thiết lập hình ảnh"
|
168 |
+
|
169 |
+
#: contact-form-7/wp-contact-form-7.php:601
|
170 |
+
msgid "Input field settings"
|
171 |
+
msgstr "Thiết lập ô nhập liệu"
|
172 |
+
|
173 |
+
#: contact-form-7/wp-contact-form-7.php:602
|
174 |
+
msgid "For image"
|
175 |
+
msgstr "Dùng cho hình ảnh"
|
176 |
+
|
177 |
+
#: contact-form-7/wp-contact-form-7.php:603
|
178 |
+
msgid "For input field"
|
179 |
+
msgstr "Dùng cho ô nhập liệu"
|
180 |
+
|
181 |
+
#: contact-form-7/wp-contact-form-7.php:604
|
182 |
+
msgid "* One choice per line."
|
183 |
+
msgstr "* Mỗi một lựa chọn trên một dòng."
|
184 |
+
|
185 |
+
#: contact-form-7/wp-contact-form-7.php:605
|
186 |
+
msgid "Show"
|
187 |
+
msgstr "Hiển thị"
|
188 |
+
|
189 |
+
#: contact-form-7/wp-contact-form-7.php:606
|
190 |
+
msgid "Hide"
|
191 |
+
msgstr "Ẩn"
|
192 |
+
|
193 |
+
#: contact-form-7/wp-contact-form-7.php:607
|
194 |
+
msgid "File size limit"
|
195 |
+
msgstr "Giới hạn kích cỡ tập tin"
|
196 |
+
|
197 |
+
#: contact-form-7/wp-contact-form-7.php:608
|
198 |
+
msgid "Acceptable file types"
|
199 |
+
msgstr "Chấp nhận các loại tập tin"
|
200 |
+
|
201 |
+
#: contact-form-7/wp-contact-form-7.php:634
|
202 |
+
msgid "Contact form created."
|
203 |
+
msgstr "Biểu mẫu liên hệ đã được tạo."
|
204 |
+
|
205 |
+
#: contact-form-7/wp-contact-form-7.php:637
|
206 |
+
msgid "Contact form saved."
|
207 |
+
msgstr "Biểu mẫu liên hệ đã được lưu."
|
208 |
+
|
209 |
+
#: contact-form-7/wp-contact-form-7.php:640
|
210 |
+
msgid "Contact form deleted."
|
211 |
+
msgstr "Biểu mẫu liên hệ đã được xóa."
|
212 |
+
|
213 |
+
#: contact-form-7/wp-contact-form-7.php:651
|
214 |
+
msgid "Untitled"
|
215 |
+
msgstr "Không có tiêu đề"
|
216 |
+
|
217 |
+
#: contact-form-7/wp-contact-form-7.php:678
|
218 |
+
msgid "Your Name"
|
219 |
+
msgstr "Tên của bạn"
|
220 |
+
|
221 |
+
#: contact-form-7/wp-contact-form-7.php:678
|
222 |
+
#: contact-form-7/wp-contact-form-7.php:680
|
223 |
+
msgid "(required)"
|
224 |
+
msgstr "(bắt buộc)"
|
225 |
+
|
226 |
+
#: contact-form-7/wp-contact-form-7.php:680
|
227 |
+
msgid "Your Email"
|
228 |
+
msgstr "Địa chỉ thư điện tử của bạn"
|
229 |
+
|
230 |
+
#: contact-form-7/wp-contact-form-7.php:682
|
231 |
+
msgid "Subject"
|
232 |
+
msgstr "Tiêu đề"
|
233 |
+
|
234 |
+
#: contact-form-7/wp-contact-form-7.php:684
|
235 |
+
msgid "Your Message"
|
236 |
+
msgstr "Thông điệp của bạn"
|
237 |
+
|
238 |
+
#: contact-form-7/wp-contact-form-7.php:686
|
239 |
+
#: contact-form-7/wp-contact-form-7.php:1325
|
240 |
+
msgid "Send"
|
241 |
+
msgstr "Gửi"
|
242 |
+
|
243 |
+
#: contact-form-7/wp-contact-form-7.php:739
|
244 |
+
msgid "Your message was sent successfully. Thanks."
|
245 |
+
msgstr "Thông điệp của bạn đã được gửi đi. Cảm ơn."
|
246 |
+
|
247 |
+
#: contact-form-7/wp-contact-form-7.php:741
|
248 |
+
#: contact-form-7/wp-contact-form-7.php:743
|
249 |
+
msgid "Failed to send your message. Please try later or contact administrator by other way."
|
250 |
+
msgstr "Hệ thống không thể gửi thông điệp của bạn. Vui lòng thử lại vào lúc khác hoặc liên hệ bằng cách khác."
|
251 |
+
|
252 |
+
#: contact-form-7/wp-contact-form-7.php:745
|
253 |
+
msgid "Validation errors occurred. Please confirm the fields and submit it again."
|
254 |
+
msgstr "Có lỗi xảy ra trong quá trình kiểm tra. Hãy kiểm tra các ô nhập liệu và gửi lại lần nữa."
|
255 |
+
|
256 |
+
#: contact-form-7/wp-contact-form-7.php:747
|
257 |
+
msgid "Please accept the terms to proceed."
|
258 |
+
msgstr "Bạn phải chấp nhận các điều khoản để tiếp tục."
|
259 |
+
|
260 |
+
#: contact-form-7/wp-contact-form-7.php:749
|
261 |
+
msgid "Email address seems invalid."
|
262 |
+
msgstr "Địa chỉ thư điện tử không hợp lệ."
|
263 |
+
|
264 |
+
#: contact-form-7/wp-contact-form-7.php:751
|
265 |
+
msgid "Please fill the required field."
|
266 |
+
msgstr "Vui lòng nhập các thông tin bắt buộc."
|
267 |
+
|
268 |
+
#: contact-form-7/wp-contact-form-7.php:753
|
269 |
+
msgid "Your entered code is incorrect."
|
270 |
+
msgstr "Đoạn mã bạn nhập vào không đúng."
|
271 |
+
|
272 |
+
#: contact-form-7/wp-contact-form-7.php:755
|
273 |
+
msgid "Failed to upload file."
|
274 |
+
msgstr "Quá trình tải tập tin lên thất bại."
|
275 |
+
|
276 |
+
#: contact-form-7/wp-contact-form-7.php:757
|
277 |
+
msgid "This file type is not allowed."
|
278 |
+
msgstr "Loại tập tin này không được phép sử dụng."
|
279 |
+
|
280 |
+
#: contact-form-7/wp-contact-form-7.php:759
|
281 |
+
msgid "This file is too large."
|
282 |
+
msgstr "Tập tin này quá to."
|
283 |
+
|
284 |
+
#: contact-form-7/includes/admin-panel.php:20
|
285 |
+
msgid "Add new"
|
286 |
+
msgstr "Thêm biểu mẫu mới"
|
287 |
+
|
288 |
+
#: contact-form-7/includes/admin-panel.php:42
|
289 |
+
msgid "Copy this code and paste it into your post, page or text widget content."
|
290 |
+
msgstr "Sao chép đoạn mã này và dán vào nội dung của bài viết, trang tin hoặc widget."
|
291 |
+
|
292 |
+
#: contact-form-7/includes/admin-panel.php:49
|
293 |
+
#: contact-form-7/includes/admin-panel.php:253
|
294 |
+
msgid "Save"
|
295 |
+
msgstr "Lưu"
|
296 |
+
|
297 |
+
#: contact-form-7/includes/admin-panel.php:55
|
298 |
+
msgid "Delete this contact form"
|
299 |
+
msgstr "Xóa biểu mẫu liên hệ này"
|
300 |
+
|
301 |
+
#: contact-form-7/includes/admin-panel.php:56
|
302 |
+
msgid ""
|
303 |
+
"You are about to delete this contact form.\n"
|
304 |
+
" 'Cancel' to stop, 'OK' to delete."
|
305 |
+
msgstr "Bạn có muốn xóa biểu mẫu liên hệ này?"
|
306 |
+
|
307 |
+
#: contact-form-7/includes/admin-panel.php:70
|
308 |
+
msgid "Form"
|
309 |
+
msgstr "Biểu mẫu"
|
310 |
+
|
311 |
+
#: contact-form-7/includes/admin-panel.php:90
|
312 |
+
msgid "Mail"
|
313 |
+
msgstr "Thư điện tử"
|
314 |
+
|
315 |
+
#: contact-form-7/includes/admin-panel.php:97
|
316 |
+
#: contact-form-7/includes/admin-panel.php:149
|
317 |
+
msgid "To:"
|
318 |
+
msgstr "Gửi đến:"
|
319 |
+
|
320 |
+
#: contact-form-7/includes/admin-panel.php:101
|
321 |
+
#: contact-form-7/includes/admin-panel.php:153
|
322 |
+
msgid "From:"
|
323 |
+
msgstr "Gửi từ:"
|
324 |
+
|
325 |
+
#: contact-form-7/includes/admin-panel.php:105
|
326 |
+
#: contact-form-7/includes/admin-panel.php:157
|
327 |
+
msgid "Subject:"
|
328 |
+
msgstr "Tiêu đề:"
|
329 |
+
|
330 |
+
#: contact-form-7/includes/admin-panel.php:110
|
331 |
+
#: contact-form-7/includes/admin-panel.php:162
|
332 |
+
msgid "File attachments:"
|
333 |
+
msgstr "Đính kèm tập tin:"
|
334 |
+
|
335 |
+
#: contact-form-7/includes/admin-panel.php:112
|
336 |
+
#: contact-form-7/includes/admin-panel.php:164
|
337 |
+
msgid "(You need WordPress 2.7 or greater to use this feature)"
|
338 |
+
msgstr "(Bạn cần phải cài đặt WordPress 2.7 hoặc mới hơn để sử dụng chức năng này)"
|
339 |
+
|
340 |
+
#: contact-form-7/includes/admin-panel.php:120
|
341 |
+
#: contact-form-7/includes/admin-panel.php:172
|
342 |
+
msgid "Use HTML content type"
|
343 |
+
msgstr "Sử dụng kiểu nội dung HTML"
|
344 |
+
|
345 |
+
#: contact-form-7/includes/admin-panel.php:125
|
346 |
+
#: contact-form-7/includes/admin-panel.php:177
|
347 |
+
msgid "Message body:"
|
348 |
+
msgstr "Nội dung thông điệp:"
|
349 |
+
|
350 |
+
#: contact-form-7/includes/admin-panel.php:136
|
351 |
+
msgid "Mail (2)"
|
352 |
+
msgstr "Thư điện tử (2)"
|
353 |
+
|
354 |
+
#: contact-form-7/includes/admin-panel.php:143
|
355 |
+
msgid "Use mail (2)"
|
356 |
+
msgstr "Sử dụng thư điện tử (2)"
|
357 |
+
|
358 |
+
#: contact-form-7/includes/admin-panel.php:188
|
359 |
+
msgid "Messages"
|
360 |
+
msgstr "Các thông điệp"
|
361 |
+
|
362 |
+
#: contact-form-7/includes/admin-panel.php:196
|
363 |
+
msgid "Sender's message was sent successfully"
|
364 |
+
msgstr "Thông điệp đã được gửi đi thành công"
|
365 |
+
|
366 |
+
#: contact-form-7/includes/admin-panel.php:200
|
367 |
+
msgid "Sender's message was failed to send"
|
368 |
+
msgstr "Hệ thống không thể gửi thông điệp đi"
|
369 |
+
|
370 |
+
#: contact-form-7/includes/admin-panel.php:204
|
371 |
+
msgid "Akismet judged the sending activity as spamming"
|
372 |
+
msgstr "Akismet đánh giá các hoạt động gửi thư quấy nhiễu"
|
373 |
+
|
374 |
+
#: contact-form-7/includes/admin-panel.php:208
|
375 |
+
msgid "Validation errors occurred"
|
376 |
+
msgstr "Có lỗi xảy ra trong quá trình kiểm tra"
|
377 |
+
|
378 |
+
#: contact-form-7/includes/admin-panel.php:212
|
379 |
+
msgid "There is a field that sender is needed to fill in"
|
380 |
+
msgstr "Người dùng chưa nhập thông tin yêu cầu"
|
381 |
+
|
382 |
+
#: contact-form-7/includes/admin-panel.php:216
|
383 |
+
msgid "Email address that sender entered is invalid"
|
384 |
+
msgstr "Địa chỉ thư điện tử người gửi không hợp lệ"
|
385 |
+
|
386 |
+
#: contact-form-7/includes/admin-panel.php:220
|
387 |
+
msgid "There is a field of term that sender is needed to accept"
|
388 |
+
msgstr "Người dùng chưa chấp nhận điều khoản"
|
389 |
+
|
390 |
+
#: contact-form-7/includes/admin-panel.php:224
|
391 |
+
msgid "The code that sender entered does not match the CAPTCHA"
|
392 |
+
msgstr "Đoạn mã người gửi nhập vào không khớp với CAPTCHA"
|
393 |
+
|
394 |
+
#: contact-form-7/includes/admin-panel.php:228
|
395 |
+
msgid "Uploading a file fails for any reason"
|
396 |
+
msgstr "Quá trình tải tập tin lên thất bại không rõ nguyên nhân"
|
397 |
+
|
398 |
+
#: contact-form-7/includes/admin-panel.php:232
|
399 |
+
msgid "Uploaded file is not allowed file type"
|
400 |
+
msgstr "Tập tin tải lên không phải là loại tập tin cho phép"
|
401 |
+
|
402 |
+
#: contact-form-7/includes/admin-panel.php:236
|
403 |
+
msgid "Uploaded file is too large"
|
404 |
+
msgstr "Tập tin tải lên quá to"
|
405 |
+
|
stylesheet-rtl.css
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
span.wpcf7-not-valid-tip {
|
2 |
+
left: auto;
|
3 |
+
right: 20%;
|
4 |
+
direction: rtl;
|
5 |
+
}
|
6 |
+
span.wpcf7-not-valid-tip-no-ajax {
|
7 |
+
direction: rtl;
|
8 |
+
}
|
9 |
+
span.wpcf7-list-item {
|
10 |
+
margin-left: 0;
|
11 |
+
margin-right: 0.5em;
|
12 |
+
}
|
wp-contact-form-7.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form 7
|
|
4 |
Plugin URI: http://ideasilo.wordpress.com/2007/04/30/contact-form-7/
|
5 |
Description: Just another contact form plugin. Simple but flexible.
|
6 |
Author: Takayuki Miyoshi
|
7 |
-
Version: 1.9.
|
8 |
Author URI: http://ideasilo.wordpress.com/
|
9 |
*/
|
10 |
|
@@ -25,7 +25,7 @@ Author URI: http://ideasilo.wordpress.com/
|
|
25 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26 |
*/
|
27 |
|
28 |
-
define('WPCF7_VERSION', '1.9.
|
29 |
|
30 |
if (! defined('WP_CONTENT_DIR'))
|
31 |
define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
|
@@ -124,6 +124,17 @@ class tam_contact_form_seven {
|
|
124 |
} else {
|
125 |
$captcha = 'null';
|
126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
if (! $validation['valid']) { // Validation error occured
|
129 |
$invalids = array();
|
@@ -131,15 +142,15 @@ class tam_contact_form_seven {
|
|
131 |
$invalids[] = '{ into: "span.wpcf7-form-control-wrap.' . $name . '", message: "' . js_escape($reason) . '" }';
|
132 |
}
|
133 |
$invalids = '[' . join(', ', $invalids) . ']';
|
134 |
-
$echo = '{ mailSent: 0, message: "' . js_escape($this->message($cf, 'validation_error')) . '", into: "#' . $unit_tag . '", invalids: ' . $invalids . ', captcha: ' . $captcha . ' }';
|
135 |
} elseif (! $this->acceptance($cf)) { // Not accepted terms
|
136 |
-
$echo = '{ mailSent: 0, message: "' . js_escape($this->message($cf, 'accept_terms')) . '", into: "#' . $unit_tag . '", captcha: ' . $captcha . ' }';
|
137 |
} elseif ($this->akismet($cf)) { // Spam!
|
138 |
-
$echo = '{ mailSent: 0, message: "' . js_escape($this->message($cf, 'akismet_says_spam')) . '", into: "#' . $unit_tag . '", spam: 1, captcha: ' . $captcha . ' }';
|
139 |
} elseif ($this->mail($cf, $handled_uploads['files'])) {
|
140 |
-
$echo = '{ mailSent: 1, message: "' . js_escape($this->message($cf, 'mail_sent_ok')) . '", into: "#' . $unit_tag . '", captcha: ' . $captcha . ' }';
|
141 |
} else {
|
142 |
-
$echo = '{ mailSent: 0, message: "' . js_escape($this->message($cf, 'mail_sent_ng')) . '", into: "#' . $unit_tag . '", captcha: ' . $captcha . ' }';
|
143 |
}
|
144 |
|
145 |
// remove upload files
|
@@ -524,6 +535,7 @@ class tam_contact_form_seven {
|
|
524 |
'accept_terms' => trim($_POST['wpcf7-message-accept-terms']),
|
525 |
'invalid_email' => trim($_POST['wpcf7-message-invalid-email']),
|
526 |
'invalid_required' => trim($_POST['wpcf7-message-invalid-required']),
|
|
|
527 |
'captcha_not_match' => trim($_POST['wpcf7-message-captcha-not-match']),
|
528 |
'upload_failed' => trim($_POST['wpcf7-message-upload-failed']),
|
529 |
'upload_file_type_invalid' => trim($_POST['wpcf7-message-upload-file-type-invalid']),
|
@@ -568,6 +580,11 @@ class tam_contact_form_seven {
|
|
568 |
$javascript_url = WPCF7_PLUGIN_URL . '/wpcf7-admin.js';
|
569 |
|
570 |
echo '<link rel="stylesheet" href="' . $admin_stylesheet_url . '" type="text/css" />';
|
|
|
|
|
|
|
|
|
|
|
571 |
|
572 |
?>
|
573 |
<script type="text/javascript">
|
@@ -587,6 +604,9 @@ var _wpcf7 = {
|
|
587 |
isAcceptanceInvert: "<?php echo js_escape(__("Make this checkbox work inversely?", 'wpcf7')); ?>",
|
588 |
isAcceptanceInvertMeans: "<?php echo js_escape(__("* That means visitor who accepts the term unchecks it.", 'wpcf7')); ?>",
|
589 |
captcha: "<?php echo js_escape(__('CAPTCHA', 'wpcf7')); ?>",
|
|
|
|
|
|
|
590 |
fileUpload: "<?php echo js_escape(__('File upload', 'wpcf7')); ?>",
|
591 |
submit: "<?php echo js_escape(__('Submit button', 'wpcf7')); ?>",
|
592 |
tagName: "<?php echo js_escape(__('Name', 'wpcf7')); ?>",
|
@@ -723,12 +743,13 @@ var _wpcf7 = {
|
|
723 |
$accept_terms = $this->default_message('accept_terms');
|
724 |
$invalid_email = $this->default_message('invalid_email');
|
725 |
$invalid_required = $this->default_message('invalid_required');
|
|
|
726 |
$captcha_not_match = $this->default_message('captcha_not_match');
|
727 |
$upload_failed = $this->default_message('upload_failed');
|
728 |
$upload_file_type_invalid = $this->default_message('upload_file_type_invalid');
|
729 |
$upload_file_too_large = $this->default_message('upload_file_too_large');
|
730 |
return compact('mail_sent_ok', 'mail_sent_ng', 'akismet_says_spam',
|
731 |
-
'validation_error', 'accept_terms', 'invalid_email', 'invalid_required',
|
732 |
'captcha_not_match', 'upload_failed', 'upload_file_type_invalid', 'upload_file_too_large');
|
733 |
}
|
734 |
|
@@ -762,6 +783,8 @@ var _wpcf7 = {
|
|
762 |
return __('Please fill the required field.', 'wpcf7');
|
763 |
case 'captcha_not_match':
|
764 |
return __('Your entered code is incorrect.', 'wpcf7');
|
|
|
|
|
765 |
case 'upload_failed':
|
766 |
return __('Failed to upload file.', 'wpcf7');
|
767 |
case 'upload_file_type_invalid':
|
@@ -962,6 +985,7 @@ var _wpcf7 = {
|
|
962 |
$type = $fe['type'];
|
963 |
$name = $fe['name'];
|
964 |
$values = $fe['values'];
|
|
|
965 |
|
966 |
// Before validation corrections
|
967 |
if (preg_match('/^(?:text|email|captchar|textarea)[*]?$/', $type))
|
@@ -1029,6 +1053,16 @@ var _wpcf7 = {
|
|
1029 |
}
|
1030 |
$this->remove_captcha($_POST[$captchac]);
|
1031 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1032 |
}
|
1033 |
return compact('valid', 'reason');
|
1034 |
}
|
@@ -1052,9 +1086,45 @@ var _wpcf7 = {
|
|
1052 |
return $refill;
|
1053 |
}
|
1054 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1055 |
function wp_head() {
|
1056 |
$stylesheet_url = WPCF7_PLUGIN_URL . '/stylesheet.css';
|
1057 |
echo '<link rel="stylesheet" href="' . $stylesheet_url . '" type="text/css" />';
|
|
|
|
|
|
|
|
|
|
|
1058 |
|
1059 |
$javascript_url = WPCF7_PLUGIN_URL . '/contact-form-7.js';
|
1060 |
?>
|
@@ -1073,7 +1143,7 @@ var _wpcf7 = {
|
|
1073 |
/* Processing form element placeholders */
|
1074 |
|
1075 |
function form_elements($form, $replace = true) {
|
1076 |
-
$types = 'text[*]?|email[*]?|textarea[*]?|select[*]?|checkbox[*]?|radio|acceptance|captchac|captchar|file[*]
|
1077 |
$regex = '%\[\s*(' . $types . ')(\s+[a-zA-Z][0-9a-zA-Z:._-]*)([-0-9a-zA-Z:#_/|\s]*)?((?:\s*(?:"[^"]*"|\'[^\']*\'))*)?\s*\]%';
|
1078 |
$submit_regex = '%\[\s*submit(\s[-0-9a-zA-Z:#_/\s]*)?(\s+(?:"[^"]*"|\'[^\']*\'))?\s*\]%';
|
1079 |
if ($replace) {
|
@@ -1092,7 +1162,7 @@ var _wpcf7 = {
|
|
1092 |
}
|
1093 |
|
1094 |
function form_element_replace_callback($matches) {
|
1095 |
-
extract((array) $this->form_element_parse($matches)); // $type, $name, $options, $values
|
1096 |
|
1097 |
if ($this->processing_unit_tag == $_POST['_wpcf7_unit_tag']) {
|
1098 |
$validation_error = $_POST['_wpcf7_validation_errors']['messages'][$name];
|
@@ -1268,6 +1338,40 @@ var _wpcf7 = {
|
|
1268 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
1269 |
return $html;
|
1270 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1271 |
case 'acceptance':
|
1272 |
$invert = (bool) preg_grep('%^invert$%', $options);
|
1273 |
$default = (bool) preg_grep('%^default:on$%', $options);
|
@@ -1340,6 +1444,15 @@ var _wpcf7 = {
|
|
1340 |
$html .= ' <img class="ajax-loader" style="visibility: hidden;" alt="ajax loader" src="' . $ajax_loader_image_url . '" />';
|
1341 |
return $html;
|
1342 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1343 |
|
1344 |
function form_element_parse($element) {
|
1345 |
$type = trim($element[1]);
|
@@ -1349,7 +1462,7 @@ var _wpcf7 = {
|
|
1349 |
preg_match_all('/"[^"]*"|\'[^\']*\'/', $element[4], $matches);
|
1350 |
$raw_values = $this->strip_quote_deep($matches[0]);
|
1351 |
|
1352 |
-
if (WPCF7_USE_PIPE && preg_match('/^(select[*]?|checkbox[*]?|radio)$/', $type)) {
|
1353 |
$pipes = $this->get_pipes($raw_values);
|
1354 |
$values = array_keys($pipes);
|
1355 |
} else {
|
4 |
Plugin URI: http://ideasilo.wordpress.com/2007/04/30/contact-form-7/
|
5 |
Description: Just another contact form plugin. Simple but flexible.
|
6 |
Author: Takayuki Miyoshi
|
7 |
+
Version: 1.9.2
|
8 |
Author URI: http://ideasilo.wordpress.com/
|
9 |
*/
|
10 |
|
25 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26 |
*/
|
27 |
|
28 |
+
define('WPCF7_VERSION', '1.9.2');
|
29 |
|
30 |
if (! defined('WP_CONTENT_DIR'))
|
31 |
define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
|
124 |
} else {
|
125 |
$captcha = 'null';
|
126 |
}
|
127 |
+
|
128 |
+
$quizzes = $this->refill_quiz($cf);
|
129 |
+
if (! empty($quizzes)) {
|
130 |
+
$quizzes_js = array();
|
131 |
+
foreach ($quizzes as $name => $q) {
|
132 |
+
$quizzes_js[] = '"' . $name . '": [ "' . js_escape($q[0]) . '", "' . $q[1] . '" ]';
|
133 |
+
}
|
134 |
+
$quiz = '{ ' . join(', ', $quizzes_js) . ' }';
|
135 |
+
} else {
|
136 |
+
$quiz = 'null';
|
137 |
+
}
|
138 |
|
139 |
if (! $validation['valid']) { // Validation error occured
|
140 |
$invalids = array();
|
142 |
$invalids[] = '{ into: "span.wpcf7-form-control-wrap.' . $name . '", message: "' . js_escape($reason) . '" }';
|
143 |
}
|
144 |
$invalids = '[' . join(', ', $invalids) . ']';
|
145 |
+
$echo = '{ mailSent: 0, message: "' . js_escape($this->message($cf, 'validation_error')) . '", into: "#' . $unit_tag . '", invalids: ' . $invalids . ', captcha: ' . $captcha . ', quiz: ' . $quiz . ' }';
|
146 |
} elseif (! $this->acceptance($cf)) { // Not accepted terms
|
147 |
+
$echo = '{ mailSent: 0, message: "' . js_escape($this->message($cf, 'accept_terms')) . '", into: "#' . $unit_tag . '", captcha: ' . $captcha . ', quiz: ' . $quiz . ' }';
|
148 |
} elseif ($this->akismet($cf)) { // Spam!
|
149 |
+
$echo = '{ mailSent: 0, message: "' . js_escape($this->message($cf, 'akismet_says_spam')) . '", into: "#' . $unit_tag . '", spam: 1, captcha: ' . $captcha . ', quiz: ' . $quiz . ' }';
|
150 |
} elseif ($this->mail($cf, $handled_uploads['files'])) {
|
151 |
+
$echo = '{ mailSent: 1, message: "' . js_escape($this->message($cf, 'mail_sent_ok')) . '", into: "#' . $unit_tag . '", captcha: ' . $captcha . ', quiz: ' . $quiz . ' }';
|
152 |
} else {
|
153 |
+
$echo = '{ mailSent: 0, message: "' . js_escape($this->message($cf, 'mail_sent_ng')) . '", into: "#' . $unit_tag . '", captcha: ' . $captcha . ', quiz: ' . $quiz . ' }';
|
154 |
}
|
155 |
|
156 |
// remove upload files
|
535 |
'accept_terms' => trim($_POST['wpcf7-message-accept-terms']),
|
536 |
'invalid_email' => trim($_POST['wpcf7-message-invalid-email']),
|
537 |
'invalid_required' => trim($_POST['wpcf7-message-invalid-required']),
|
538 |
+
'quiz_answer_not_correct' => trim($_POST['wpcf7-message-quiz-answer-not-correct']),
|
539 |
'captcha_not_match' => trim($_POST['wpcf7-message-captcha-not-match']),
|
540 |
'upload_failed' => trim($_POST['wpcf7-message-upload-failed']),
|
541 |
'upload_file_type_invalid' => trim($_POST['wpcf7-message-upload-file-type-invalid']),
|
580 |
$javascript_url = WPCF7_PLUGIN_URL . '/wpcf7-admin.js';
|
581 |
|
582 |
echo '<link rel="stylesheet" href="' . $admin_stylesheet_url . '" type="text/css" />';
|
583 |
+
|
584 |
+
if ('rtl' == get_bloginfo('text_direction')) {
|
585 |
+
$admin_stylesheet_rtl_url = WPCF7_PLUGIN_URL . '/admin-stylesheet-rtl.css';
|
586 |
+
echo '<link rel="stylesheet" href="' . $admin_stylesheet_rtl_url . '" type="text/css" />';
|
587 |
+
}
|
588 |
|
589 |
?>
|
590 |
<script type="text/javascript">
|
604 |
isAcceptanceInvert: "<?php echo js_escape(__("Make this checkbox work inversely?", 'wpcf7')); ?>",
|
605 |
isAcceptanceInvertMeans: "<?php echo js_escape(__("* That means visitor who accepts the term unchecks it.", 'wpcf7')); ?>",
|
606 |
captcha: "<?php echo js_escape(__('CAPTCHA', 'wpcf7')); ?>",
|
607 |
+
quiz: "<?php echo js_escape(__('Quiz', 'wpcf7')); ?>",
|
608 |
+
quizzes: "<?php echo js_escape(__('Quizzes', 'wpcf7')); ?>",
|
609 |
+
quizFormatDesc: "<?php echo js_escape(__("* quiz|answer (e.g. 1+1=?|2)", 'wpcf7')); ?>",
|
610 |
fileUpload: "<?php echo js_escape(__('File upload', 'wpcf7')); ?>",
|
611 |
submit: "<?php echo js_escape(__('Submit button', 'wpcf7')); ?>",
|
612 |
tagName: "<?php echo js_escape(__('Name', 'wpcf7')); ?>",
|
743 |
$accept_terms = $this->default_message('accept_terms');
|
744 |
$invalid_email = $this->default_message('invalid_email');
|
745 |
$invalid_required = $this->default_message('invalid_required');
|
746 |
+
$quiz_answer_not_correct = $this->default_message('quiz_answer_not_correct');
|
747 |
$captcha_not_match = $this->default_message('captcha_not_match');
|
748 |
$upload_failed = $this->default_message('upload_failed');
|
749 |
$upload_file_type_invalid = $this->default_message('upload_file_type_invalid');
|
750 |
$upload_file_too_large = $this->default_message('upload_file_too_large');
|
751 |
return compact('mail_sent_ok', 'mail_sent_ng', 'akismet_says_spam',
|
752 |
+
'validation_error', 'accept_terms', 'invalid_email', 'invalid_required', 'quiz_answer_not_correct',
|
753 |
'captcha_not_match', 'upload_failed', 'upload_file_type_invalid', 'upload_file_too_large');
|
754 |
}
|
755 |
|
783 |
return __('Please fill the required field.', 'wpcf7');
|
784 |
case 'captcha_not_match':
|
785 |
return __('Your entered code is incorrect.', 'wpcf7');
|
786 |
+
case 'quiz_answer_not_correct':
|
787 |
+
return __('Your answer is not correct.', 'wpcf7');
|
788 |
case 'upload_failed':
|
789 |
return __('Failed to upload file.', 'wpcf7');
|
790 |
case 'upload_file_type_invalid':
|
985 |
$type = $fe['type'];
|
986 |
$name = $fe['name'];
|
987 |
$values = $fe['values'];
|
988 |
+
$raw_values = $fe['raw_values'];
|
989 |
|
990 |
// Before validation corrections
|
991 |
if (preg_match('/^(?:text|email|captchar|textarea)[*]?$/', $type))
|
1053 |
}
|
1054 |
$this->remove_captcha($_POST[$captchac]);
|
1055 |
}
|
1056 |
+
|
1057 |
+
if ('quiz' == $type) {
|
1058 |
+
$answer = $this->canonicalize($_POST[$name]);
|
1059 |
+
$answer_hash = wp_hash($answer, 'wpcf7_quiz');
|
1060 |
+
$expected_hash = $_POST['_wpcf7_quiz_answer_' . $name];
|
1061 |
+
if ($answer_hash != $expected_hash) {
|
1062 |
+
$valid = false;
|
1063 |
+
$reason[$name] = $this->message($contact_form, 'quiz_answer_not_correct');
|
1064 |
+
}
|
1065 |
+
}
|
1066 |
}
|
1067 |
return compact('valid', 'reason');
|
1068 |
}
|
1086 |
return $refill;
|
1087 |
}
|
1088 |
|
1089 |
+
function refill_quiz($contact_form) {
|
1090 |
+
$fes = $this->form_elements($contact_form['form'], false);
|
1091 |
+
$refill = array();
|
1092 |
+
|
1093 |
+
foreach ($fes as $fe) {
|
1094 |
+
$type = $fe['type'];
|
1095 |
+
$name = $fe['name'];
|
1096 |
+
$values = $fe['values'];
|
1097 |
+
$raw_values = $fe['raw_values'];
|
1098 |
+
|
1099 |
+
if ('quiz' != $type)
|
1100 |
+
continue;
|
1101 |
+
|
1102 |
+
if (count($values) == 0)
|
1103 |
+
continue;
|
1104 |
+
|
1105 |
+
if (count($values) == 1)
|
1106 |
+
$question = $values[0];
|
1107 |
+
else
|
1108 |
+
$question = $values[array_rand($values)];
|
1109 |
+
|
1110 |
+
$pipes = $this->get_pipes($raw_values);
|
1111 |
+
$answer = $this->pipe($pipes, $question);
|
1112 |
+
$answer = $this->canonicalize($answer);
|
1113 |
+
|
1114 |
+
$refill[$name] = array($question, wp_hash($answer, 'wpcf7_quiz'));
|
1115 |
+
}
|
1116 |
+
|
1117 |
+
return $refill;
|
1118 |
+
}
|
1119 |
+
|
1120 |
function wp_head() {
|
1121 |
$stylesheet_url = WPCF7_PLUGIN_URL . '/stylesheet.css';
|
1122 |
echo '<link rel="stylesheet" href="' . $stylesheet_url . '" type="text/css" />';
|
1123 |
+
|
1124 |
+
if ('rtl' == get_bloginfo('text_direction')) {
|
1125 |
+
$stylesheet_rtl_url = WPCF7_PLUGIN_URL . '/stylesheet-rtl.css';
|
1126 |
+
echo '<link rel="stylesheet" href="' . $stylesheet_rtl_url . '" type="text/css" />';
|
1127 |
+
}
|
1128 |
|
1129 |
$javascript_url = WPCF7_PLUGIN_URL . '/contact-form-7.js';
|
1130 |
?>
|
1143 |
/* Processing form element placeholders */
|
1144 |
|
1145 |
function form_elements($form, $replace = true) {
|
1146 |
+
$types = 'text[*]?|email[*]?|textarea[*]?|select[*]?|checkbox[*]?|radio|acceptance|captchac|captchar|file[*]?|quiz';
|
1147 |
$regex = '%\[\s*(' . $types . ')(\s+[a-zA-Z][0-9a-zA-Z:._-]*)([-0-9a-zA-Z:#_/|\s]*)?((?:\s*(?:"[^"]*"|\'[^\']*\'))*)?\s*\]%';
|
1148 |
$submit_regex = '%\[\s*submit(\s[-0-9a-zA-Z:#_/\s]*)?(\s+(?:"[^"]*"|\'[^\']*\'))?\s*\]%';
|
1149 |
if ($replace) {
|
1162 |
}
|
1163 |
|
1164 |
function form_element_replace_callback($matches) {
|
1165 |
+
extract((array) $this->form_element_parse($matches)); // $type, $name, $options, $values, $raw_values
|
1166 |
|
1167 |
if ($this->processing_unit_tag == $_POST['_wpcf7_unit_tag']) {
|
1168 |
$validation_error = $_POST['_wpcf7_validation_errors']['messages'][$name];
|
1338 |
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
1339 |
return $html;
|
1340 |
break;
|
1341 |
+
case 'quiz':
|
1342 |
+
if (count($values) == 0) {
|
1343 |
+
break;
|
1344 |
+
} elseif (count($values) == 1) {
|
1345 |
+
$value = $values[0];
|
1346 |
+
} else {
|
1347 |
+
$value = $values[array_rand($values)];
|
1348 |
+
}
|
1349 |
+
|
1350 |
+
if (is_array($options)) {
|
1351 |
+
$size_maxlength_array = preg_grep('%^[0-9]*[/x][0-9]*$%', $options);
|
1352 |
+
if ($size_maxlength = array_shift($size_maxlength_array)) {
|
1353 |
+
preg_match('%^([0-9]*)[/x]([0-9]*)$%', $size_maxlength, $sm_matches);
|
1354 |
+
if ($size = (int) $sm_matches[1])
|
1355 |
+
$atts .= ' size="' . $size . '"';
|
1356 |
+
else
|
1357 |
+
$atts .= ' size="40"';
|
1358 |
+
if ($maxlength = (int) $sm_matches[2])
|
1359 |
+
$atts .= ' maxlength="' . $maxlength . '"';
|
1360 |
+
} else {
|
1361 |
+
$atts .= ' size="40"';
|
1362 |
+
}
|
1363 |
+
}
|
1364 |
+
|
1365 |
+
$pipes = $this->get_pipes($raw_values);
|
1366 |
+
$answer = $this->pipe($pipes, $value);
|
1367 |
+
$answer = $this->canonicalize($answer);
|
1368 |
+
|
1369 |
+
$html = '<span class="wpcf7-quiz-label">' . $value . '</span> ';
|
1370 |
+
$html .= '<input type="text" name="' . $name . '"' . $atts . ' />';
|
1371 |
+
$html .= '<input type="hidden" name="_wpcf7_quiz_answer_' . $name . '" value="' . wp_hash($answer, 'wpcf7_quiz') . '" />';
|
1372 |
+
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . $html . $validation_error . '</span>';
|
1373 |
+
return $html;
|
1374 |
+
break;
|
1375 |
case 'acceptance':
|
1376 |
$invert = (bool) preg_grep('%^invert$%', $options);
|
1377 |
$default = (bool) preg_grep('%^default:on$%', $options);
|
1444 |
$html .= ' <img class="ajax-loader" style="visibility: hidden;" alt="ajax loader" src="' . $ajax_loader_image_url . '" />';
|
1445 |
return $html;
|
1446 |
}
|
1447 |
+
|
1448 |
+
function canonicalize($text) {
|
1449 |
+
if (function_exists('mb_convert_kana') && 'UTF-8' == get_option('blog_charset'))
|
1450 |
+
$text = mb_convert_kana($text, 'asKV', 'UTF-8');
|
1451 |
+
|
1452 |
+
$text = strtolower($text);
|
1453 |
+
$text = trim($text);
|
1454 |
+
return $text;
|
1455 |
+
}
|
1456 |
|
1457 |
function form_element_parse($element) {
|
1458 |
$type = trim($element[1]);
|
1462 |
preg_match_all('/"[^"]*"|\'[^\']*\'/', $element[4], $matches);
|
1463 |
$raw_values = $this->strip_quote_deep($matches[0]);
|
1464 |
|
1465 |
+
if (WPCF7_USE_PIPE && preg_match('/^(select[*]?|checkbox[*]?|radio)$/', $type) || 'quiz' == $type) {
|
1466 |
$pipes = $this->get_pipes($raw_values);
|
1467 |
$values = array_keys($pipes);
|
1468 |
} else {
|
wpcf7-admin.js
CHANGED
@@ -143,7 +143,7 @@ function tagGenerator() {
|
|
143 |
|
144 |
var tag_types = [
|
145 |
'textField', 'emailField', 'textArea', 'menu', 'checkboxes', 'radioButtons',
|
146 |
-
'acceptance', 'captcha', 'fileUpload', 'submit'];
|
147 |
|
148 |
jQuery.each(tag_types, function(i, n) {
|
149 |
var submenu = jQuery('<div>' + _wpcf7.l10n[n] + '</div>');
|
@@ -349,6 +349,31 @@ function tgPane(pane, tagType) {
|
|
349 |
|
350 |
table2.append(jQuery('<tr></tr>').append(jQuery('<td colspan="2"></td>').append(menuOpt1).append(menuOpt2)));
|
351 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
pane.append(jQuery('<div class="tg-tag">' + _wpcf7.l10n.generatedTag + '<br /></div>').append(tgInputs.tag1st));
|
353 |
break;
|
354 |
case 'captcha':
|
@@ -622,6 +647,27 @@ function tgCreateTag(tagType, tgInputs, trigger) {
|
|
622 |
var tag = name ? '[' + type + ' ' + name + options + ']' : '';
|
623 |
tgInputs.tag1st.val(tag);
|
624 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
case 'captcha':
|
626 |
// for captchac
|
627 |
var type = 'captchac';
|
@@ -718,6 +764,8 @@ function tgDefaultName(tagType) {
|
|
718 |
return 'radio-' + rand;
|
719 |
} else if ('acceptance' == tagType) {
|
720 |
return 'acceptance-' + rand;
|
|
|
|
|
721 |
} else if ('captcha' == tagType) {
|
722 |
return 'captcha-' + rand;
|
723 |
} else if ('fileUpload' == tagType) {
|
143 |
|
144 |
var tag_types = [
|
145 |
'textField', 'emailField', 'textArea', 'menu', 'checkboxes', 'radioButtons',
|
146 |
+
'acceptance', 'quiz', 'captcha', 'fileUpload', 'submit'];
|
147 |
|
148 |
jQuery.each(tag_types, function(i, n) {
|
149 |
var submenu = jQuery('<div>' + _wpcf7.l10n[n] + '</div>');
|
349 |
|
350 |
table2.append(jQuery('<tr></tr>').append(jQuery('<td colspan="2"></td>').append(menuOpt1).append(menuOpt2)));
|
351 |
|
352 |
+
pane.append(jQuery('<div class="tg-tag">' + _wpcf7.l10n.generatedTag + '<br /></div>').append(tgInputs.tag1st));
|
353 |
+
break;
|
354 |
+
case 'quiz':
|
355 |
+
var table1 = jQuery('<table></table>');
|
356 |
+
pane.append(table1);
|
357 |
+
|
358 |
+
table1.append(tgTr(
|
359 |
+
jQuery('<span>' + _wpcf7.l10n.tagName + '<br /></span>').append(tgInputs.tagName),
|
360 |
+
jQuery('<span></span>')
|
361 |
+
));
|
362 |
+
|
363 |
+
var table2 = jQuery('<table></table>');
|
364 |
+
pane.append(table2);
|
365 |
+
table2.append(tgTr(
|
366 |
+
jQuery('<span><code>size</code> (' + _wpcf7.l10n.optional + ')<br /></span>').append(tgInputs.tagSize),
|
367 |
+
jQuery('<span><code>maxlength</code> (' + _wpcf7.l10n.optional + ')<br /></span>').append(tgInputs.tagMaxLength)
|
368 |
+
));
|
369 |
+
table2.append(tgTr(
|
370 |
+
jQuery('<span><code>id</code> (' + _wpcf7.l10n.optional + ')<br /></span>').append(tgInputs.tagId),
|
371 |
+
jQuery('<span><code>class</code> (' + _wpcf7.l10n.optional + ')<br /></span>').append(tgInputs.tagClasses)
|
372 |
+
));
|
373 |
+
table2.append(tgTr(
|
374 |
+
jQuery('<span>' + _wpcf7.l10n.quizzes + '<br /></span>').append(tgInputs.menuChoices)
|
375 |
+
.append('<br /><span style="font-size: smaller">' + _wpcf7.l10n.quizFormatDesc + '</span>')
|
376 |
+
));
|
377 |
pane.append(jQuery('<div class="tg-tag">' + _wpcf7.l10n.generatedTag + '<br /></div>').append(tgInputs.tag1st));
|
378 |
break;
|
379 |
case 'captcha':
|
647 |
var tag = name ? '[' + type + ' ' + name + options + ']' : '';
|
648 |
tgInputs.tag1st.val(tag);
|
649 |
break;
|
650 |
+
case 'quiz':
|
651 |
+
var type = 'quiz';
|
652 |
+
var name = tgInputs.tagName.val();
|
653 |
+
var options = [];
|
654 |
+
if (tgInputs.tagSize.val() || tgInputs.tagMaxLength.val())
|
655 |
+
options.push(tgInputs.tagSize.val() + '/' + tgInputs.tagMaxLength.val());
|
656 |
+
if (tgInputs.tagId.val())
|
657 |
+
options.push('id:' + tgInputs.tagId.val());
|
658 |
+
if (tgInputs.tagClasses.val())
|
659 |
+
jQuery.each(tgInputs.tagClasses.val().split(' '), function(i, n) {
|
660 |
+
options.push('class:' + n);
|
661 |
+
});
|
662 |
+
options = (options.length > 0) ? ' ' + options.join(' ') : '';
|
663 |
+
var choices = '';
|
664 |
+
if (tgInputs.menuChoices.val())
|
665 |
+
jQuery.each(tgInputs.menuChoices.val().split("\n"), function(i, n) {
|
666 |
+
choices += ' "' + n.replace(/["]/g, '"') + '"';
|
667 |
+
});
|
668 |
+
var tag = name ? '[' + type + ' ' + name + options + choices + ']' : '';
|
669 |
+
tgInputs.tag1st.val(tag);
|
670 |
+
break;
|
671 |
case 'captcha':
|
672 |
// for captchac
|
673 |
var type = 'captchac';
|
764 |
return 'radio-' + rand;
|
765 |
} else if ('acceptance' == tagType) {
|
766 |
return 'acceptance-' + rand;
|
767 |
+
} else if ('quiz' == tagType) {
|
768 |
+
return 'quiz-' + rand;
|
769 |
} else if ('captcha' == tagType) {
|
770 |
return 'captcha-' + rand;
|
771 |
} else if ('fileUpload' == tagType) {
|