Version Description
- Added : Added CSV Download option.
- Added : Added an option to vertically display in Radio and Checkbox.
- Changed : Optimization of the number display processing of saving contact data.
- Changed : Change separator of checkbox in confirm page.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
- css/style.css +4 -0
- form_fields/mw_form_field_checkbox.php +12 -5
- form_fields/mw_form_field_radio.php +11 -4
- languages/mw-wp-form-ja.mo +0 -0
- languages/mw-wp-form-ja.po +24 -14
- languages/mw-wp-form.pot +24 -14
- mw-wp-form.php +2 -2
- readme.txt +7 -1
- system/mw_form.php +14 -8
- system/mw_wp_form_contact_data_page.php +29 -9
css/style.css
CHANGED
@@ -10,6 +10,10 @@
|
|
10 |
display: block;
|
11 |
}
|
12 |
|
|
|
|
|
|
|
|
|
13 |
.ui-datepicker .ui-datepicker-title select.ui-datepicker-month,
|
14 |
.ui-datepicker .ui-datepicker-title select.ui-datepicker-year {
|
15 |
width: 40%;
|
10 |
display: block;
|
11 |
}
|
12 |
|
13 |
+
.mw_wp_form .vertical-item {
|
14 |
+
display: block;
|
15 |
+
}
|
16 |
+
|
17 |
.ui-datepicker .ui-datepicker-title select.ui-datepicker-month,
|
18 |
.ui-datepicker .ui-datepicker-title select.ui-datepicker-year {
|
19 |
width: 40%;
|
form_fields/mw_form_field_checkbox.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW Form Field Checkbox
|
4 |
* Description: チェックボックスを出力。
|
5 |
-
* Version: 1.4.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
-
* Modified: November
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -41,8 +41,9 @@ class MW_Form_Field_Checkbox extends MW_Form_Field {
|
|
41 |
'id' => '',
|
42 |
'children' => '',
|
43 |
'value' => '',
|
|
|
44 |
'show_error' => 'true',
|
45 |
-
'separator' => ',',
|
46 |
);
|
47 |
}
|
48 |
|
@@ -55,8 +56,9 @@ class MW_Form_Field_Checkbox extends MW_Form_Field {
|
|
55 |
$children = $this->getChildren( $this->atts['children'] );
|
56 |
$separator = ( $this->atts['separator'] ) ? $this->atts['separator'] : $this->defaults['separator'];
|
57 |
$_ret = $this->Form->checkbox( $this->atts['name'], $children, array(
|
58 |
-
'id'
|
59 |
-
'value'
|
|
|
60 |
), $separator );
|
61 |
if ( $this->atts['show_error'] !== 'false' )
|
62 |
$_ret .= $this->getError( $this->atts['name'] );
|
@@ -111,6 +113,11 @@ class MW_Form_Field_Checkbox extends MW_Form_Field {
|
|
111 |
<?php $separator = $this->get_value_for_generator( 'separator', $options ); ?>
|
112 |
<input type="text" name="separator" size="10" value="<?php echo esc_attr( $separator ); ?>" />
|
113 |
</p>
|
|
|
|
|
|
|
|
|
|
|
114 |
<p>
|
115 |
<strong><?php esc_html_e( 'Dsiplay error', MWF_Config::DOMAIN ); ?></strong>
|
116 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
2 |
/**
|
3 |
* Name: MW Form Field Checkbox
|
4 |
* Description: チェックボックスを出力。
|
5 |
+
* Version: 1.4.5
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
+
* Modified: November 23, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
41 |
'id' => '',
|
42 |
'children' => '',
|
43 |
'value' => '',
|
44 |
+
'vertically' => '',
|
45 |
'show_error' => 'true',
|
46 |
+
'separator' => ', ',
|
47 |
);
|
48 |
}
|
49 |
|
56 |
$children = $this->getChildren( $this->atts['children'] );
|
57 |
$separator = ( $this->atts['separator'] ) ? $this->atts['separator'] : $this->defaults['separator'];
|
58 |
$_ret = $this->Form->checkbox( $this->atts['name'], $children, array(
|
59 |
+
'id' => $this->atts['id'],
|
60 |
+
'value' => $this->atts['value'],
|
61 |
+
'vertically' => $this->atts['vertically'],
|
62 |
), $separator );
|
63 |
if ( $this->atts['show_error'] !== 'false' )
|
64 |
$_ret .= $this->getError( $this->atts['name'] );
|
113 |
<?php $separator = $this->get_value_for_generator( 'separator', $options ); ?>
|
114 |
<input type="text" name="separator" size="10" value="<?php echo esc_attr( $separator ); ?>" />
|
115 |
</p>
|
116 |
+
<p>
|
117 |
+
<strong><?php esc_html_e( 'Display method', MWF_Config::DOMAIN ); ?></strong>
|
118 |
+
<?php $vertically = $this->get_value_for_generator( 'vertically', $options ); ?>
|
119 |
+
<input type="checkbox" name="vertically" value="true" <?php checked( 'true', $vertically ); ?> /> <?php esc_html_e( 'Arranged vertically.', MWF_Config::DOMAIN ); ?>
|
120 |
+
</p>
|
121 |
<p>
|
122 |
<strong><?php esc_html_e( 'Dsiplay error', MWF_Config::DOMAIN ); ?></strong>
|
123 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
form_fields/mw_form_field_radio.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW Form Field Radio
|
4 |
* Description: ラジオボタンを出力。
|
5 |
-
* Version: 1.4.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
-
* Modified: November
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -41,6 +41,7 @@ class MW_Form_Field_Radio extends MW_Form_Field {
|
|
41 |
'id' => '',
|
42 |
'children' => '',
|
43 |
'value' => '',
|
|
|
44 |
'show_error' => 'true',
|
45 |
);
|
46 |
}
|
@@ -53,8 +54,9 @@ class MW_Form_Field_Radio extends MW_Form_Field {
|
|
53 |
protected function inputPage() {
|
54 |
$children = $this->getChildren( $this->atts['children'] );
|
55 |
$_ret = $this->Form->radio( $this->atts['name'], $children, array(
|
56 |
-
'id'
|
57 |
-
'value'
|
|
|
58 |
) );
|
59 |
if ( $this->atts['show_error'] !== 'false' )
|
60 |
$_ret .= $this->getError( $this->atts['name'] );
|
@@ -103,6 +105,11 @@ class MW_Form_Field_Radio extends MW_Form_Field {
|
|
103 |
<?php $value = $this->get_value_for_generator( 'value', $options ); ?>
|
104 |
<input type="text" name="value" value="<?php echo esc_attr( $value ); ?>" />
|
105 |
</p>
|
|
|
|
|
|
|
|
|
|
|
106 |
<p>
|
107 |
<strong><?php esc_html_e( 'Dsiplay error', MWF_Config::DOMAIN ); ?></strong>
|
108 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
2 |
/**
|
3 |
* Name: MW Form Field Radio
|
4 |
* Description: ラジオボタンを出力。
|
5 |
+
* Version: 1.4.4
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
+
* Modified: November 23, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
41 |
'id' => '',
|
42 |
'children' => '',
|
43 |
'value' => '',
|
44 |
+
'vertically' => '',
|
45 |
'show_error' => 'true',
|
46 |
);
|
47 |
}
|
54 |
protected function inputPage() {
|
55 |
$children = $this->getChildren( $this->atts['children'] );
|
56 |
$_ret = $this->Form->radio( $this->atts['name'], $children, array(
|
57 |
+
'id' => $this->atts['id'],
|
58 |
+
'value' => $this->atts['value'],
|
59 |
+
'vertically' => $this->atts['vertically'],
|
60 |
) );
|
61 |
if ( $this->atts['show_error'] !== 'false' )
|
62 |
$_ret .= $this->getError( $this->atts['name'] );
|
105 |
<?php $value = $this->get_value_for_generator( 'value', $options ); ?>
|
106 |
<input type="text" name="value" value="<?php echo esc_attr( $value ); ?>" />
|
107 |
</p>
|
108 |
+
<p>
|
109 |
+
<strong><?php esc_html_e( 'Display method', MWF_Config::DOMAIN ); ?></strong>
|
110 |
+
<?php $vertically = $this->get_value_for_generator( 'vertically', $options ); ?>
|
111 |
+
<input type="checkbox" name="vertically" value="true" <?php checked( 'true', $vertically ); ?> /> <?php esc_html_e( 'Arranged vertically.', MWF_Config::DOMAIN ); ?>
|
112 |
+
</p>
|
113 |
<p>
|
114 |
<strong><?php esc_html_e( 'Dsiplay error', MWF_Config::DOMAIN ); ?></strong>
|
115 |
<?php $show_error = $this->get_value_for_generator( 'show_error', $options ); ?>
|
languages/mw-wp-form-ja.mo
CHANGED
Binary file
|
languages/mw-wp-form-ja.po
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
# This file is distributed under the same license as the MW WP Form package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: MW WP Form 2.1.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
-
"POT-Creation-Date: 2014-11-
|
8 |
-
"PO-Revision-Date: 2014-11-
|
9 |
"Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
|
10 |
"Language-Team: Takashi Kitajima <inc@2inc.org>\n"
|
11 |
"Language: ja\n"
|
@@ -43,40 +43,50 @@ msgstr "ボタン"
|
|
43 |
msgid "Checkbox"
|
44 |
msgstr "チェックボックス"
|
45 |
|
46 |
-
#: form_fields/mw_form_field_checkbox.php:
|
47 |
-
#: form_fields/mw_form_field_radio.php:
|
48 |
#: form_fields/mw_form_field_select.php:94
|
49 |
msgid "Choices"
|
50 |
msgstr "選択肢"
|
51 |
|
52 |
-
#: form_fields/mw_form_field_checkbox.php:
|
53 |
#: form_fields/mw_form_field_error.php:77
|
54 |
-
#: form_fields/mw_form_field_radio.php:
|
55 |
#: form_fields/mw_form_field_select.php:98
|
56 |
msgid "Input one line about one item."
|
57 |
msgstr "1項目につき1行で入力してください。"
|
58 |
|
59 |
-
#: form_fields/mw_form_field_checkbox.php:
|
60 |
#: form_fields/mw_form_field_datepicker.php:128
|
61 |
#: form_fields/mw_form_field_hidden.php:79
|
62 |
#: form_fields/mw_form_field_password.php:105
|
63 |
-
#: form_fields/mw_form_field_radio.php:
|
64 |
#: form_fields/mw_form_field_select.php:102
|
65 |
#: form_fields/mw_form_field_text.php:113
|
66 |
#: form_fields/mw_form_field_textarea.php:107
|
67 |
msgid "Default value"
|
68 |
msgstr "初期値"
|
69 |
|
70 |
-
#: form_fields/mw_form_field_checkbox.php:
|
71 |
msgid "Separator string"
|
72 |
msgstr "区切り文字"
|
73 |
|
74 |
-
#: form_fields/mw_form_field_checkbox.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
#: form_fields/mw_form_field_datepicker.php:133
|
76 |
#: form_fields/mw_form_field_file.php:107
|
77 |
#: form_fields/mw_form_field_image.php:108
|
78 |
#: form_fields/mw_form_field_password.php:115
|
79 |
-
#: form_fields/mw_form_field_radio.php:
|
80 |
#: form_fields/mw_form_field_select.php:107
|
81 |
#: form_fields/mw_form_field_tel.php:87 form_fields/mw_form_field_text.php:123
|
82 |
#: form_fields/mw_form_field_textarea.php:117
|
@@ -84,12 +94,12 @@ msgstr "区切り文字"
|
|
84 |
msgid "Dsiplay error"
|
85 |
msgstr "エラー表示"
|
86 |
|
87 |
-
#: form_fields/mw_form_field_checkbox.php:
|
88 |
#: form_fields/mw_form_field_datepicker.php:135
|
89 |
#: form_fields/mw_form_field_file.php:109
|
90 |
#: form_fields/mw_form_field_image.php:110
|
91 |
#: form_fields/mw_form_field_password.php:117
|
92 |
-
#: form_fields/mw_form_field_radio.php:
|
93 |
#: form_fields/mw_form_field_select.php:109
|
94 |
#: form_fields/mw_form_field_tel.php:89 form_fields/mw_form_field_text.php:125
|
95 |
#: form_fields/mw_form_field_textarea.php:119
|
2 |
# This file is distributed under the same license as the MW WP Form package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: MW WP Form 2.1.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
+
"POT-Creation-Date: 2014-11-23 13:56:38+00:00\n"
|
8 |
+
"PO-Revision-Date: 2014-11-23 22:58+0900\n"
|
9 |
"Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
|
10 |
"Language-Team: Takashi Kitajima <inc@2inc.org>\n"
|
11 |
"Language: ja\n"
|
43 |
msgid "Checkbox"
|
44 |
msgstr "チェックボックス"
|
45 |
|
46 |
+
#: form_fields/mw_form_field_checkbox.php:99
|
47 |
+
#: form_fields/mw_form_field_radio.php:96
|
48 |
#: form_fields/mw_form_field_select.php:94
|
49 |
msgid "Choices"
|
50 |
msgstr "選択肢"
|
51 |
|
52 |
+
#: form_fields/mw_form_field_checkbox.php:103
|
53 |
#: form_fields/mw_form_field_error.php:77
|
54 |
+
#: form_fields/mw_form_field_radio.php:100
|
55 |
#: form_fields/mw_form_field_select.php:98
|
56 |
msgid "Input one line about one item."
|
57 |
msgstr "1項目につき1行で入力してください。"
|
58 |
|
59 |
+
#: form_fields/mw_form_field_checkbox.php:107
|
60 |
#: form_fields/mw_form_field_datepicker.php:128
|
61 |
#: form_fields/mw_form_field_hidden.php:79
|
62 |
#: form_fields/mw_form_field_password.php:105
|
63 |
+
#: form_fields/mw_form_field_radio.php:104
|
64 |
#: form_fields/mw_form_field_select.php:102
|
65 |
#: form_fields/mw_form_field_text.php:113
|
66 |
#: form_fields/mw_form_field_textarea.php:107
|
67 |
msgid "Default value"
|
68 |
msgstr "初期値"
|
69 |
|
70 |
+
#: form_fields/mw_form_field_checkbox.php:112
|
71 |
msgid "Separator string"
|
72 |
msgstr "区切り文字"
|
73 |
|
74 |
+
#: form_fields/mw_form_field_checkbox.php:117
|
75 |
+
#: form_fields/mw_form_field_radio.php:109
|
76 |
+
msgid "Display method"
|
77 |
+
msgstr "表示方法"
|
78 |
+
|
79 |
+
#: form_fields/mw_form_field_checkbox.php:119
|
80 |
+
#: form_fields/mw_form_field_radio.php:111
|
81 |
+
msgid "Arranged vertically."
|
82 |
+
msgstr "垂直に配置する"
|
83 |
+
|
84 |
+
#: form_fields/mw_form_field_checkbox.php:122
|
85 |
#: form_fields/mw_form_field_datepicker.php:133
|
86 |
#: form_fields/mw_form_field_file.php:107
|
87 |
#: form_fields/mw_form_field_image.php:108
|
88 |
#: form_fields/mw_form_field_password.php:115
|
89 |
+
#: form_fields/mw_form_field_radio.php:114
|
90 |
#: form_fields/mw_form_field_select.php:107
|
91 |
#: form_fields/mw_form_field_tel.php:87 form_fields/mw_form_field_text.php:123
|
92 |
#: form_fields/mw_form_field_textarea.php:117
|
94 |
msgid "Dsiplay error"
|
95 |
msgstr "エラー表示"
|
96 |
|
97 |
+
#: form_fields/mw_form_field_checkbox.php:124
|
98 |
#: form_fields/mw_form_field_datepicker.php:135
|
99 |
#: form_fields/mw_form_field_file.php:109
|
100 |
#: form_fields/mw_form_field_image.php:110
|
101 |
#: form_fields/mw_form_field_password.php:117
|
102 |
+
#: form_fields/mw_form_field_radio.php:116
|
103 |
#: form_fields/mw_form_field_select.php:109
|
104 |
#: form_fields/mw_form_field_tel.php:89 form_fields/mw_form_field_text.php:125
|
105 |
#: form_fields/mw_form_field_textarea.php:119
|
languages/mw-wp-form.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the MW WP Form package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: MW WP Form 2.1.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
-
"POT-Creation-Date: 2014-11-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -14,7 +14,7 @@ msgstr ""
|
|
14 |
"Plural-Forms: nplurals=1; plural=0;\n"
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
"X-Poedit-Basepath: .\n"
|
17 |
-
"X-Generator: Poedit 1.6.
|
18 |
"X-Poedit-KeywordsList: __;_e\n"
|
19 |
"X-Poedit-SearchPath-0: ..\n"
|
20 |
|
@@ -42,40 +42,50 @@ msgstr ""
|
|
42 |
msgid "Checkbox"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: form_fields/mw_form_field_checkbox.php:
|
46 |
-
#: form_fields/mw_form_field_radio.php:
|
47 |
#: form_fields/mw_form_field_select.php:94
|
48 |
msgid "Choices"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: form_fields/mw_form_field_checkbox.php:
|
52 |
#: form_fields/mw_form_field_error.php:77
|
53 |
-
#: form_fields/mw_form_field_radio.php:
|
54 |
#: form_fields/mw_form_field_select.php:98
|
55 |
msgid "Input one line about one item."
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: form_fields/mw_form_field_checkbox.php:
|
59 |
#: form_fields/mw_form_field_datepicker.php:128
|
60 |
#: form_fields/mw_form_field_hidden.php:79
|
61 |
#: form_fields/mw_form_field_password.php:105
|
62 |
-
#: form_fields/mw_form_field_radio.php:
|
63 |
#: form_fields/mw_form_field_select.php:102
|
64 |
#: form_fields/mw_form_field_text.php:113
|
65 |
#: form_fields/mw_form_field_textarea.php:107
|
66 |
msgid "Default value"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: form_fields/mw_form_field_checkbox.php:
|
70 |
msgid "Separator string"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: form_fields/mw_form_field_checkbox.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
#: form_fields/mw_form_field_datepicker.php:133
|
75 |
#: form_fields/mw_form_field_file.php:107
|
76 |
#: form_fields/mw_form_field_image.php:108
|
77 |
#: form_fields/mw_form_field_password.php:115
|
78 |
-
#: form_fields/mw_form_field_radio.php:
|
79 |
#: form_fields/mw_form_field_select.php:107
|
80 |
#: form_fields/mw_form_field_tel.php:87 form_fields/mw_form_field_text.php:123
|
81 |
#: form_fields/mw_form_field_textarea.php:117
|
@@ -83,12 +93,12 @@ msgstr ""
|
|
83 |
msgid "Dsiplay error"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: form_fields/mw_form_field_checkbox.php:
|
87 |
#: form_fields/mw_form_field_datepicker.php:135
|
88 |
#: form_fields/mw_form_field_file.php:109
|
89 |
#: form_fields/mw_form_field_image.php:110
|
90 |
#: form_fields/mw_form_field_password.php:117
|
91 |
-
#: form_fields/mw_form_field_radio.php:
|
92 |
#: form_fields/mw_form_field_select.php:109
|
93 |
#: form_fields/mw_form_field_tel.php:89 form_fields/mw_form_field_text.php:125
|
94 |
#: form_fields/mw_form_field_textarea.php:119
|
2 |
# This file is distributed under the same license as the MW WP Form package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: MW WP Form 2.1.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
+
"POT-Creation-Date: 2014-11-23 13:56:38+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
14 |
"Plural-Forms: nplurals=1; plural=0;\n"
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
"X-Poedit-Basepath: .\n"
|
17 |
+
"X-Generator: Poedit 1.6.10\n"
|
18 |
"X-Poedit-KeywordsList: __;_e\n"
|
19 |
"X-Poedit-SearchPath-0: ..\n"
|
20 |
|
42 |
msgid "Checkbox"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: form_fields/mw_form_field_checkbox.php:99
|
46 |
+
#: form_fields/mw_form_field_radio.php:96
|
47 |
#: form_fields/mw_form_field_select.php:94
|
48 |
msgid "Choices"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: form_fields/mw_form_field_checkbox.php:103
|
52 |
#: form_fields/mw_form_field_error.php:77
|
53 |
+
#: form_fields/mw_form_field_radio.php:100
|
54 |
#: form_fields/mw_form_field_select.php:98
|
55 |
msgid "Input one line about one item."
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: form_fields/mw_form_field_checkbox.php:107
|
59 |
#: form_fields/mw_form_field_datepicker.php:128
|
60 |
#: form_fields/mw_form_field_hidden.php:79
|
61 |
#: form_fields/mw_form_field_password.php:105
|
62 |
+
#: form_fields/mw_form_field_radio.php:104
|
63 |
#: form_fields/mw_form_field_select.php:102
|
64 |
#: form_fields/mw_form_field_text.php:113
|
65 |
#: form_fields/mw_form_field_textarea.php:107
|
66 |
msgid "Default value"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: form_fields/mw_form_field_checkbox.php:112
|
70 |
msgid "Separator string"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: form_fields/mw_form_field_checkbox.php:117
|
74 |
+
#: form_fields/mw_form_field_radio.php:109
|
75 |
+
msgid "Display method"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: form_fields/mw_form_field_checkbox.php:119
|
79 |
+
#: form_fields/mw_form_field_radio.php:111
|
80 |
+
msgid "Arranged vertically."
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: form_fields/mw_form_field_checkbox.php:122
|
84 |
#: form_fields/mw_form_field_datepicker.php:133
|
85 |
#: form_fields/mw_form_field_file.php:107
|
86 |
#: form_fields/mw_form_field_image.php:108
|
87 |
#: form_fields/mw_form_field_password.php:115
|
88 |
+
#: form_fields/mw_form_field_radio.php:114
|
89 |
#: form_fields/mw_form_field_select.php:107
|
90 |
#: form_fields/mw_form_field_tel.php:87 form_fields/mw_form_field_text.php:123
|
91 |
#: form_fields/mw_form_field_textarea.php:117
|
93 |
msgid "Dsiplay error"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: form_fields/mw_form_field_checkbox.php:124
|
97 |
#: form_fields/mw_form_field_datepicker.php:135
|
98 |
#: form_fields/mw_form_field_file.php:109
|
99 |
#: form_fields/mw_form_field_image.php:110
|
100 |
#: form_fields/mw_form_field_password.php:117
|
101 |
+
#: form_fields/mw_form_field_radio.php:116
|
102 |
#: form_fields/mw_form_field_select.php:109
|
103 |
#: form_fields/mw_form_field_tel.php:89 form_fields/mw_form_field_text.php:125
|
104 |
#: form_fields/mw_form_field_textarea.php:119
|
mw-wp-form.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin Name: MW WP Form
|
4 |
* Plugin URI: http://plugins.2inc.org/mw-wp-form/
|
5 |
* Description: MW WP Form can create mail form with a confirmation screen.
|
6 |
-
* Version: 2.1.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
-
* Modified: November
|
11 |
* Text Domain: mw-wp-form
|
12 |
* Domain Path: /languages/
|
13 |
* License: GPLv2
|
3 |
* Plugin Name: MW WP Form
|
4 |
* Plugin URI: http://plugins.2inc.org/mw-wp-form/
|
5 |
* Description: MW WP Form can create mail form with a confirmation screen.
|
6 |
+
* Version: 2.1.1
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: November 23, 2014
|
11 |
* Text Domain: mw-wp-form
|
12 |
* Domain Path: /languages/
|
13 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
|
|
4 |
Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -71,6 +71,12 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
= 2.1.0 =
|
75 |
* Added : Add filter_hook mwform_post_content_raw_mw-wp-form-xxx.
|
76 |
* Added : Add filter_hook mwform_post_content_mw-wp-form-xxx.
|
4 |
Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 2.1.1
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 2.1.1 =
|
75 |
+
* Added : Added CSV Download option.
|
76 |
+
* Added : Added an option to vertically display in Radio and Checkbox.
|
77 |
+
* Changed : Optimization of the number display processing of saving contact data.
|
78 |
+
* Changed : Change separator of checkbox in confirm page.
|
79 |
+
|
80 |
= 2.1.0 =
|
81 |
* Added : Add filter_hook mwform_post_content_raw_mw-wp-form-xxx.
|
82 |
* Added : Add filter_hook mwform_post_content_mw-wp-form-xxx.
|
system/mw_form.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW Form
|
4 |
* Description: フォームクラス
|
5 |
-
* Version: 1.4.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : September 25, 2012
|
9 |
-
* Modified:
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -583,8 +583,9 @@ class MW_Form {
|
|
583 |
*/
|
584 |
public function radio( $name, $children = array(), $options = array() ) {
|
585 |
$defaults = array(
|
586 |
-
'id'
|
587 |
-
'value'
|
|
|
588 |
);
|
589 |
$options = array_merge( $defaults, $options );
|
590 |
$value = $options['value'];
|
@@ -601,9 +602,11 @@ class MW_Form {
|
|
601 |
$i ++;
|
602 |
$id = $this->get_attr_id( $options['id'], $i );
|
603 |
$for = $this->get_attr_for( $options['id'], $i );
|
|
|
604 |
$checked = ( $key == $value )? ' checked="checked"' : '';
|
605 |
-
$_ret .= sprintf( '<label %s><input type="radio" name="%s" value="%s"%s %s />%s</label>',
|
606 |
$for,
|
|
|
607 |
esc_attr( $name ),
|
608 |
esc_attr( $key ),
|
609 |
$checked,
|
@@ -625,8 +628,9 @@ class MW_Form {
|
|
625 |
*/
|
626 |
public function checkbox( $name, $children = array(), $options = array(), $separator = ',' ) {
|
627 |
$defaults = array(
|
628 |
-
'id'
|
629 |
-
'value'
|
|
|
630 |
);
|
631 |
$options = array_merge( $defaults, $options );
|
632 |
$value = $options['value'];
|
@@ -648,9 +652,11 @@ class MW_Form {
|
|
648 |
$i ++;
|
649 |
$id = $this->get_attr_id( $options['id'], $i );
|
650 |
$for = $this->get_attr_for( $options['id'], $i );
|
|
|
651 |
$checked = ( is_array( $value ) && in_array( $key, $value ) )? ' checked="checked"' : '';
|
652 |
-
$_ret .= sprintf( '<label %s><input type="checkbox" name="%s" value="%s"%s %s />%s</label>',
|
653 |
$for,
|
|
|
654 |
esc_attr( $name.'[data][]' ),
|
655 |
esc_attr( $key ),
|
656 |
$checked,
|
2 |
/**
|
3 |
* Name: MW Form
|
4 |
* Description: フォームクラス
|
5 |
+
* Version: 1.4.2
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : September 25, 2012
|
9 |
+
* Modified: November 23, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
583 |
*/
|
584 |
public function radio( $name, $children = array(), $options = array() ) {
|
585 |
$defaults = array(
|
586 |
+
'id' => '',
|
587 |
+
'value' => '',
|
588 |
+
'vertically' => '',
|
589 |
);
|
590 |
$options = array_merge( $defaults, $options );
|
591 |
$value = $options['value'];
|
602 |
$i ++;
|
603 |
$id = $this->get_attr_id( $options['id'], $i );
|
604 |
$for = $this->get_attr_for( $options['id'], $i );
|
605 |
+
$vertically = ( $options['vertically'] === 'true' ) ? 'vertical-item' : '';
|
606 |
$checked = ( $key == $value )? ' checked="checked"' : '';
|
607 |
+
$_ret .= sprintf( '<label %s class="%s"><input type="radio" name="%s" value="%s"%s %s />%s</label>',
|
608 |
$for,
|
609 |
+
$vertically,
|
610 |
esc_attr( $name ),
|
611 |
esc_attr( $key ),
|
612 |
$checked,
|
628 |
*/
|
629 |
public function checkbox( $name, $children = array(), $options = array(), $separator = ',' ) {
|
630 |
$defaults = array(
|
631 |
+
'id' => '',
|
632 |
+
'value' => array(),
|
633 |
+
'vertically' => '',
|
634 |
);
|
635 |
$options = array_merge( $defaults, $options );
|
636 |
$value = $options['value'];
|
652 |
$i ++;
|
653 |
$id = $this->get_attr_id( $options['id'], $i );
|
654 |
$for = $this->get_attr_for( $options['id'], $i );
|
655 |
+
$vertically = ( $options['vertically'] === 'true' ) ? 'vertical-item' : '';
|
656 |
$checked = ( is_array( $value ) && in_array( $key, $value ) )? ' checked="checked"' : '';
|
657 |
+
$_ret .= sprintf( '<label %s class="%s"><input type="checkbox" name="%s" value="%s"%s %s />%s</label>',
|
658 |
$for,
|
659 |
+
$vertically,
|
660 |
esc_attr( $name.'[data][]' ),
|
661 |
esc_attr( $key ),
|
662 |
$checked,
|
system/mw_wp_form_contact_data_page.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW WP Form Contact Data Page
|
4 |
* Description: DB保存データを扱うクラス
|
5 |
-
* Version: 1.2.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
-
* Modified:
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -163,6 +163,9 @@ class MW_WP_Form_Contact_Data_Page {
|
|
163 |
?>
|
164 |
<form id="mw-wp-form_csv" method="post" action="<?php echo esc_url( $action ); ?>">
|
165 |
<input type="submit" value="<?php esc_attr_e( 'CSV Download', MWF_Config::DOMAIN ); ?>" class="button-primary" />
|
|
|
|
|
|
|
166 |
<input type="hidden" name="<?php echo esc_attr( MWF_Config::NAME . '-csv-download' ); ?>" value="1" />
|
167 |
<?php wp_nonce_field( MWF_Config::NAME ); ?>
|
168 |
</form>
|
@@ -185,10 +188,28 @@ class MW_WP_Form_Contact_Data_Page {
|
|
185 |
isset( $_POST[MWF_Config::NAME . '-csv-download'] ) &&
|
186 |
check_admin_referer( MWF_Config::NAME ) ) {
|
187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
$posts_mwf = get_posts( array(
|
189 |
-
'post_type'
|
190 |
-
'posts_per_page' =>
|
191 |
-
'
|
|
|
192 |
) );
|
193 |
$csv = '';
|
194 |
|
@@ -532,12 +553,11 @@ class MW_WP_Form_Contact_Data_Page {
|
|
532 |
* @return numeric 投稿数
|
533 |
*/
|
534 |
private function get_count( $post_type ) {
|
535 |
-
|
536 |
-
$posts_contact = get_posts( array(
|
537 |
'post_type' => $post_type,
|
538 |
-
'posts_per_page' =>
|
539 |
) );
|
540 |
-
return
|
541 |
}
|
542 |
|
543 |
/**
|
2 |
/**
|
3 |
* Name: MW WP Form Contact Data Page
|
4 |
* Description: DB保存データを扱うクラス
|
5 |
+
* Version: 1.2.2
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
+
* Modified: November 23, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
163 |
?>
|
164 |
<form id="mw-wp-form_csv" method="post" action="<?php echo esc_url( $action ); ?>">
|
165 |
<input type="submit" value="<?php esc_attr_e( 'CSV Download', MWF_Config::DOMAIN ); ?>" class="button-primary" />
|
166 |
+
|
167 |
+
|
168 |
+
<label><input type="checkbox" name="download-all" value="true" checked="checked" /> Download All</label>
|
169 |
<input type="hidden" name="<?php echo esc_attr( MWF_Config::NAME . '-csv-download' ); ?>" value="1" />
|
170 |
<?php wp_nonce_field( MWF_Config::NAME ); ?>
|
171 |
</form>
|
188 |
isset( $_POST[MWF_Config::NAME . '-csv-download'] ) &&
|
189 |
check_admin_referer( MWF_Config::NAME ) ) {
|
190 |
|
191 |
+
// posts_per_page
|
192 |
+
$posts_per_page = -1;
|
193 |
+
if ( ( isset( $_POST['download-all'] ) && $_POST['download-all'] === 'true' ) === false ) {
|
194 |
+
$current_user = wp_get_current_user();
|
195 |
+
$_posts_per_page = get_user_meta( $current_user->ID, 'edit_' . $post_type . '_per_page', true );
|
196 |
+
if ( !empty( $_posts_per_page ) ) {
|
197 |
+
$posts_per_page = $_posts_per_page;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
// paged
|
202 |
+
$paged = 1;
|
203 |
+
$_paged = $_GET['paged'];
|
204 |
+
if ( !empty( $_paged ) && MWF_Functions::is_numeric( $_paged ) && $posts_per_page > 0 ) {
|
205 |
+
$paged = $_paged;
|
206 |
+
}
|
207 |
+
|
208 |
$posts_mwf = get_posts( array(
|
209 |
+
'post_type' => $post_type,
|
210 |
+
'posts_per_page' => $posts_per_page,
|
211 |
+
'paged' => $paged,
|
212 |
+
'post_status' => 'any',
|
213 |
) );
|
214 |
$csv = '';
|
215 |
|
553 |
* @return numeric 投稿数
|
554 |
*/
|
555 |
private function get_count( $post_type ) {
|
556 |
+
$query = new WP_Query( array(
|
|
|
557 |
'post_type' => $post_type,
|
558 |
+
'posts_per_page' => 1,
|
559 |
) );
|
560 |
+
return $query->found_posts;
|
561 |
}
|
562 |
|
563 |
/**
|