Version Description
- Added : Add chart function.
- Added : Add separator attribute in checkbox tag generator.
- Bug fix : Fix bug that can not change display option in saving contact data list page.
- Bug fix : Fix bug that display wrong number of inquiries.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 1.9.0 |
Comparing to | |
See all releases |
Code changes from version 1.8.3 to 1.9.0
- css/admin.css +83 -35
- form_fields/mw_form_field_checkbox.php +6 -2
- form_fields/mw_form_field_text.php +3 -3
- js/admin-chart.js +7 -0
- js/admin.js +1 -40
- js/mw-wp-form-google-chart.js +124 -0
- js/mw-wp-form-repeatable.js +67 -0
- languages/mw-wp-form-ja.mo +0 -0
- languages/mw-wp-form-ja.po +119 -74
- languages/mw-wp-form.pot +114 -72
- mw-wp-form.php +17 -12
- readme.txt +26 -4
- system/mw_wp_form_admin_page.php +27 -23
- system/mw_wp_form_chart_page.php +337 -0
- system/mw_wp_form_contact_data_page.php +15 -10
- system/mw_wp_form_file.php +9 -8
css/admin.css
CHANGED
@@ -68,70 +68,66 @@ span#formkey_field {
|
|
68 |
|
69 |
/**
|
70 |
* バリデーションルール
|
|
|
71 |
*/
|
72 |
-
#mw-wp-form_validation .
|
|
|
|
|
73 |
border: #ddd solid 1px;
|
74 |
border-radius: 5px;
|
75 |
margin: 10px 0;
|
76 |
padding: 10px;
|
77 |
}
|
78 |
-
#mw-wp-form_validation .
|
|
|
79 |
border-top: #ddd solid 1px;
|
80 |
margin: 10px 0 0;
|
81 |
padding: 10px 0 0;
|
82 |
display: none;
|
83 |
}
|
84 |
-
#mw-wp-form_validation .
|
|
|
85 |
font-size: 100%;
|
86 |
margin: 10px 0 0;
|
87 |
}
|
88 |
-
#mw-wp-form_validation .
|
|
|
89 |
padding: 0 10px 5px 0;
|
90 |
overflow: hidden;
|
91 |
zoom: 1;
|
92 |
}
|
93 |
-
#mw-wp-form_validation .
|
|
|
94 |
margin: 0 10px 5px 0;
|
95 |
display: block;
|
96 |
float: left;
|
97 |
}
|
98 |
-
#mw-wp-form_validation .
|
|
|
99 |
margin: 0 2px 0 0;
|
100 |
}
|
101 |
-
#mw-wp-form_validation .
|
|
|
102 |
clear: both;
|
103 |
margin: 0;
|
104 |
}
|
105 |
-
#mw-wp-form_validation .
|
|
|
106 |
padding-bottom: 0;
|
107 |
}
|
108 |
-
|
109 |
-
|
110 |
-
* 設定
|
111 |
-
*/
|
112 |
-
#mw-wp-form_settings p {
|
113 |
-
border-bottom: #dfdfdf solid 1px;
|
114 |
-
margin: 0 0 15px;
|
115 |
-
padding: 0 0 15px;
|
116 |
}
|
117 |
-
#mw-wp-
|
118 |
-
|
119 |
-
|
120 |
-
vertical-align: middle;
|
121 |
-
}
|
122 |
-
#mw-wp-form_settings table td input {
|
123 |
-
width: 100%;
|
124 |
-
}
|
125 |
-
#mw-wp-form_settings table.akismet th {
|
126 |
-
font-weight: normal;
|
127 |
-
padding: 0 0 5px;
|
128 |
-
text-align: left;
|
129 |
}
|
130 |
|
131 |
/**
|
132 |
* バリデーションルールを追加
|
133 |
*/
|
134 |
-
#mw-wp-form_validation b
|
|
|
135 |
cursor: pointer;
|
136 |
margin: 2px 1px 4px;
|
137 |
line-height: 18px;
|
@@ -143,21 +139,25 @@ span#formkey_field {
|
|
143 |
border-radius: 3px;
|
144 |
background: #f5f5f5;
|
145 |
}
|
146 |
-
#mw-wp-form_validation b
|
|
|
147 |
background: #eee;
|
148 |
}
|
149 |
|
150 |
/**
|
151 |
* 開閉ボタン
|
152 |
*/
|
153 |
-
#mw-wp-form_validation .
|
|
|
154 |
overflow: hidden;
|
155 |
zoom: 1;
|
156 |
}
|
157 |
-
#mw-wp-form_validation .
|
|
|
158 |
font-weight: bold;
|
159 |
}
|
160 |
-
#mw-wp-form_validation .
|
|
|
161 |
cursor: pointer;
|
162 |
display: block;
|
163 |
float: right;
|
@@ -167,15 +167,39 @@ span#formkey_field {
|
|
167 |
/**
|
168 |
* 削除ボタン
|
169 |
*/
|
170 |
-
#mw-wp-form_validation .
|
|
|
171 |
float: left;
|
172 |
margin: 0 5px 0 0;
|
173 |
}
|
174 |
-
#mw-wp-form_validation .
|
|
|
175 |
cursor: pointer;
|
176 |
display: block;
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
/**
|
180 |
* DB保存データのカスタムフィールド
|
181 |
*/
|
@@ -318,3 +342,27 @@ span#formkey_field {
|
|
318 |
white-space: nowrap;
|
319 |
}
|
320 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
/**
|
70 |
* バリデーションルール
|
71 |
+
* チャート設定
|
72 |
*/
|
73 |
+
#mw-wp-form_validation .repeatable-box,
|
74 |
+
#mw-wp-form_chart .repeatable-box {
|
75 |
+
background: #fff;
|
76 |
border: #ddd solid 1px;
|
77 |
border-radius: 5px;
|
78 |
margin: 10px 0;
|
79 |
padding: 10px;
|
80 |
}
|
81 |
+
#mw-wp-form_validation .repeatable-box .repeatable-box-content,
|
82 |
+
#mw-wp-form_chart .repeatable-box .repeatable-box-content {
|
83 |
border-top: #ddd solid 1px;
|
84 |
margin: 10px 0 0;
|
85 |
padding: 10px 0 0;
|
86 |
display: none;
|
87 |
}
|
88 |
+
#mw-wp-form_validation .repeatable-box table,
|
89 |
+
#mw-wp-form_chart .repeatable-box table {
|
90 |
font-size: 100%;
|
91 |
margin: 10px 0 0;
|
92 |
}
|
93 |
+
#mw-wp-form_validation .repeatable-box table td,
|
94 |
+
#mw-wp-form_chart .repeatable-box table td {
|
95 |
padding: 0 10px 5px 0;
|
96 |
overflow: hidden;
|
97 |
zoom: 1;
|
98 |
}
|
99 |
+
#mw-wp-form_validation .repeatable-box table td label,
|
100 |
+
#mw-wp-form_chart .repeatable-box table td label {
|
101 |
margin: 0 10px 5px 0;
|
102 |
display: block;
|
103 |
float: left;
|
104 |
}
|
105 |
+
#mw-wp-form_validation .repeatable-box table td label input ,
|
106 |
+
#mw-wp-form_chart .repeatable-box table td label input{
|
107 |
margin: 0 2px 0 0;
|
108 |
}
|
109 |
+
#mw-wp-form_validation .repeatable-box table td table,
|
110 |
+
#mw-wp-form_chart .repeatable-box table td table {
|
111 |
clear: both;
|
112 |
margin: 0;
|
113 |
}
|
114 |
+
#mw-wp-form_validation .repeatable-box table td table td,
|
115 |
+
#mw-wp-form_chart .repeatable-box table td table td {
|
116 |
padding-bottom: 0;
|
117 |
}
|
118 |
+
#mw-wp-form_chart .inside {
|
119 |
+
margin-bottom: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
+
#mw-wp-form_chart .inside .submit {
|
122 |
+
margin-top: 10px;
|
123 |
+
padding: 5px 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
/**
|
127 |
* バリデーションルールを追加
|
128 |
*/
|
129 |
+
#mw-wp-form_validation b.add-btn,
|
130 |
+
#mw-wp-form_chart b.add-btn {
|
131 |
cursor: pointer;
|
132 |
margin: 2px 1px 4px;
|
133 |
line-height: 18px;
|
139 |
border-radius: 3px;
|
140 |
background: #f5f5f5;
|
141 |
}
|
142 |
+
#mw-wp-form_validation b.add-btn:hover,
|
143 |
+
#mw-wp-form_chart b.add-btn:hover {
|
144 |
background: #eee;
|
145 |
}
|
146 |
|
147 |
/**
|
148 |
* 開閉ボタン
|
149 |
*/
|
150 |
+
#mw-wp-form_validation .repeatable-box .open-btn,
|
151 |
+
#mw-wp-form_chart .repeatable-box .open-btn {
|
152 |
overflow: hidden;
|
153 |
zoom: 1;
|
154 |
}
|
155 |
+
#mw-wp-form_validation .repeatable-box .open-btn span,
|
156 |
+
#mw-wp-form_chart .repeatable-box .open-btn span {
|
157 |
font-weight: bold;
|
158 |
}
|
159 |
+
#mw-wp-form_validation .repeatable-box .open-btn b,
|
160 |
+
#mw-wp-form_chart .repeatable-box .open-btn b {
|
161 |
cursor: pointer;
|
162 |
display: block;
|
163 |
float: right;
|
167 |
/**
|
168 |
* 削除ボタン
|
169 |
*/
|
170 |
+
#mw-wp-form_validation .repeatable-box .remove-btn,
|
171 |
+
#mw-wp-form_chart .repeatable-box .remove-btn {
|
172 |
float: left;
|
173 |
margin: 0 5px 0 0;
|
174 |
}
|
175 |
+
#mw-wp-form_validation .repeatable-box .remove-btn b,
|
176 |
+
#mw-wp-form_chart .repeatable-box .remove-btn b {
|
177 |
cursor: pointer;
|
178 |
display: block;
|
179 |
}
|
180 |
|
181 |
+
/**
|
182 |
+
* 設定
|
183 |
+
*/
|
184 |
+
#mw-wp-form_settings p {
|
185 |
+
border-bottom: #dfdfdf solid 1px;
|
186 |
+
margin: 0 0 15px;
|
187 |
+
padding: 0 0 15px;
|
188 |
+
}
|
189 |
+
#mw-wp-form_settings table td {
|
190 |
+
padding: 0 5px 0 0;
|
191 |
+
text-align: left;
|
192 |
+
vertical-align: middle;
|
193 |
+
}
|
194 |
+
#mw-wp-form_settings table td input {
|
195 |
+
width: 100%;
|
196 |
+
}
|
197 |
+
#mw-wp-form_settings table.akismet th {
|
198 |
+
font-weight: normal;
|
199 |
+
padding: 0 0 5px;
|
200 |
+
text-align: left;
|
201 |
+
}
|
202 |
+
|
203 |
/**
|
204 |
* DB保存データのカスタムフィールド
|
205 |
*/
|
342 |
white-space: nowrap;
|
343 |
}
|
344 |
|
345 |
+
/**
|
346 |
+
* .mwform-chart-wrapper
|
347 |
+
*/
|
348 |
+
.mwform-chart-wrapper {
|
349 |
+
overflow: hidden;
|
350 |
+
*zoom: 1;
|
351 |
+
}
|
352 |
+
.mwform-chart-wrapper .mwform-chart {
|
353 |
+
float: left;
|
354 |
+
margin-right: 30px;
|
355 |
+
}
|
356 |
+
.mwform-chart-wrapper .mwform-legend {
|
357 |
+
overflow: hidden;
|
358 |
+
}
|
359 |
+
.mwform-chart-wrapper .mwform-legend .mwform-legend-color {
|
360 |
+
display: inline-block;
|
361 |
+
height: 8px;
|
362 |
+
width: 8px;
|
363 |
+
overflow: hidden;
|
364 |
+
margin-right: 5px;
|
365 |
+
}
|
366 |
+
.mwform-chart-wrapper .mwform-legend .mwform-legend-value {
|
367 |
+
margin-left: 10px;
|
368 |
+
}
|
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:
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -95,6 +95,10 @@ class MW_Form_Field_Checkbox extends MW_Form_Field {
|
|
95 |
<strong><?php esc_html_e( 'Default value', MWF_Config::DOMAIN ); ?>(<?php esc_html_e( 'option', MWF_Config::DOMAIN ); ?>)</strong>
|
96 |
<input type="text" name="value" />
|
97 |
</p>
|
|
|
|
|
|
|
|
|
98 |
<p>
|
99 |
<strong><?php esc_html_e( 'Dsiplay error', MWF_Config::DOMAIN ); ?></strong>
|
100 |
<input type="checkbox" name="show_error" value="false" /> <?php esc_html_e( 'Don\'t display error.', MWF_Config::DOMAIN ); ?>
|
2 |
/**
|
3 |
* Name: MW Form Field Checkbox
|
4 |
* Description: チェックボックスを出力。
|
5 |
+
* Version: 1.4.2
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
+
* Modified: August 31, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
95 |
<strong><?php esc_html_e( 'Default value', MWF_Config::DOMAIN ); ?>(<?php esc_html_e( 'option', MWF_Config::DOMAIN ); ?>)</strong>
|
96 |
<input type="text" name="value" />
|
97 |
</p>
|
98 |
+
<p>
|
99 |
+
<strong><?php esc_html_e( 'Separator string', MWF_Config::DOMAIN ); ?></strong>
|
100 |
+
<input type="text" name="separator" value="" size="10" />
|
101 |
+
</p>
|
102 |
<p>
|
103 |
<strong><?php esc_html_e( 'Dsiplay error', MWF_Config::DOMAIN ); ?></strong>
|
104 |
<input type="checkbox" name="show_error" value="false" /> <?php esc_html_e( 'Don\'t display error.', MWF_Config::DOMAIN ); ?>
|
form_fields/mw_form_field_text.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW Form Field Text
|
4 |
* Description: テキストフィールドを出力。
|
5 |
-
* Version: 1.4.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
-
* Modified:
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
@@ -55,7 +55,7 @@ class MW_Form_Field_Text extends MW_Form_Field {
|
|
55 |
$_ret = $this->Form->text( $this->atts['name'], array(
|
56 |
'id' => $this->atts['id'],
|
57 |
'size' => $this->atts['size'],
|
58 |
-
'maxlength
|
59 |
'value' => $this->atts['value'],
|
60 |
'placeholder' => $this->atts['placeholder'],
|
61 |
'conv-half-alphanumeric' => $conv_half_alphanumeric,
|
2 |
/**
|
3 |
* Name: MW Form Field Text
|
4 |
* Description: テキストフィールドを出力。
|
5 |
+
* Version: 1.4.3
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : December 14, 2012
|
9 |
+
* Modified: August 29, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
55 |
$_ret = $this->Form->text( $this->atts['name'], array(
|
56 |
'id' => $this->atts['id'],
|
57 |
'size' => $this->atts['size'],
|
58 |
+
'maxlength' => $this->atts['maxlength'],
|
59 |
'value' => $this->atts['value'],
|
60 |
'placeholder' => $this->atts['placeholder'],
|
61 |
'conv-half-alphanumeric' => $conv_half_alphanumeric,
|
js/admin-chart.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function( $ ) {
|
2 |
+
$( '#mw-wp-form_chart' ).mw_wp_form_repeatable( {
|
3 |
+
add_position: 'last'
|
4 |
+
} );
|
5 |
+
|
6 |
+
$( '#mw-wp-form_chart .repeatable-boxes' ).sortable();
|
7 |
+
} );
|
js/admin.js
CHANGED
@@ -1,45 +1,6 @@
|
|
1 |
jQuery( function( $ ) {
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
/**
|
6 |
-
* 開閉ボタン
|
7 |
-
*/
|
8 |
-
$( '.validation-btn b' ).on( 'click', function() {
|
9 |
-
$( this ).parent().siblings( '.validation-content' ).slideToggle( 'high' );
|
10 |
-
} );
|
11 |
-
|
12 |
-
/**
|
13 |
-
* 削除ボタン
|
14 |
-
*/
|
15 |
-
$( '.validation-remove b' ).on( 'click', function() {
|
16 |
-
cnt++;
|
17 |
-
$( this ).closest( '.validation-box' ).fadeOut( function() {
|
18 |
-
$( this ).remove();
|
19 |
-
} );
|
20 |
-
} );
|
21 |
-
|
22 |
-
/**
|
23 |
-
* 追加ボタン
|
24 |
-
*/
|
25 |
-
$( '#mw-wp-form_validation b' ).click( function() {
|
26 |
-
cnt++;
|
27 |
-
var clone = $( this ).parent().find( '.validation-box:first' ).clone( true );
|
28 |
-
clone.find( 'input' ).each( function() {
|
29 |
-
$( this ).attr( 'name', $( this ).attr( 'name' ).replace( /\[\d+\]/, '[' + cnt + ']' ) );
|
30 |
-
} );
|
31 |
-
clone.hide().find( '.validation-content' ).show();
|
32 |
-
$( this ).siblings( '.validation-box:first' ).after( clone.fadeIn() );
|
33 |
-
} );
|
34 |
-
|
35 |
-
/**
|
36 |
-
* ターゲット名をラベルとして表示
|
37 |
-
*/
|
38 |
-
$( '.targetKey' ).on( 'keyup', function() {
|
39 |
-
var val = $( this ).val();
|
40 |
-
console.log( val );
|
41 |
-
$( this ).parent().parent().find( '.validation-btn span' ).text( val );
|
42 |
-
} );
|
43 |
|
44 |
/**
|
45 |
* 完了ページの入力エリアからオリジナルボタンを消去
|
1 |
jQuery( function( $ ) {
|
2 |
|
3 |
+
$( '#mw-wp-form_validation' ).mw_wp_form_repeatable();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
/**
|
6 |
* 完了ページの入力エリアからオリジナルボタンを消去
|
js/mw-wp-form-google-chart.js
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* mw_wp_form_google_chart
|
3 |
+
* Created: August 31, 2014
|
4 |
+
*/
|
5 |
+
jQuery( function( $ ) {
|
6 |
+
$.fn.mw_wp_form_google_chart = function( config ) {
|
7 |
+
var defaults = {
|
8 |
+
chart: 'pie',
|
9 |
+
data : []
|
10 |
+
};
|
11 |
+
var config = $.extend( defaults, config );
|
12 |
+
|
13 |
+
return this.each( function( i, e ) {
|
14 |
+
var data = google.visualization.arrayToDataTable( config.data );
|
15 |
+
var target = $( e ).get( 0 );
|
16 |
+
if ( config.chart === 'pie' ) {
|
17 |
+
var options = {
|
18 |
+
colors: getColors(),
|
19 |
+
backgroundColor: 'transparent',
|
20 |
+
chartArea: {
|
21 |
+
top : 10,
|
22 |
+
left : 0,
|
23 |
+
height: '90%'
|
24 |
+
},
|
25 |
+
legend: {
|
26 |
+
alignment: 'center'
|
27 |
+
},
|
28 |
+
height: 260
|
29 |
+
};
|
30 |
+
var chart = new google.visualization.PieChart( target );
|
31 |
+
} else if ( config.chart === 'bar' ) {
|
32 |
+
data = new google.visualization.DataView( data );
|
33 |
+
data.setColumns( [0, 1, {
|
34 |
+
calc: function ( dt, row ) {
|
35 |
+
var val = dt.getValue( row, 1 );
|
36 |
+
return {
|
37 |
+
v: ( val * 100 ).toFixed( 1 ) + ' %',
|
38 |
+
f: ( val * 100 ).toFixed( 1 ) + ' %'
|
39 |
+
};
|
40 |
+
},
|
41 |
+
type: 'string',
|
42 |
+
sourceColumn: 1,
|
43 |
+
role: 'annotation'
|
44 |
+
}] );
|
45 |
+
var height = ( config.data.length - 1 ) * 40;
|
46 |
+
var options = {
|
47 |
+
colors: getColors(),
|
48 |
+
backgroundColor: 'transparent',
|
49 |
+
chartArea: {
|
50 |
+
top : 0,
|
51 |
+
left : 160,
|
52 |
+
height: height,
|
53 |
+
width : '95%'
|
54 |
+
},
|
55 |
+
annotations: {
|
56 |
+
format: '#,#%',
|
57 |
+
textStyle: {
|
58 |
+
fontSize: 12,
|
59 |
+
}
|
60 |
+
},
|
61 |
+
hAxis: {
|
62 |
+
format: '#,#%',
|
63 |
+
textStyle: {
|
64 |
+
color: '#999',
|
65 |
+
fontSize: 13
|
66 |
+
}
|
67 |
+
},
|
68 |
+
vAxis: {
|
69 |
+
textStyle: {
|
70 |
+
color: '#444',
|
71 |
+
fontSize: 13
|
72 |
+
}
|
73 |
+
},
|
74 |
+
tooltip: {
|
75 |
+
trigger: 'none'
|
76 |
+
},
|
77 |
+
legend: {
|
78 |
+
position: 'none'
|
79 |
+
},
|
80 |
+
height: height + 30
|
81 |
+
};
|
82 |
+
var chart = new google.visualization.BarChart( target );
|
83 |
+
}
|
84 |
+
chart.draw( data, options );
|
85 |
+
} );
|
86 |
+
|
87 |
+
function getColors() {
|
88 |
+
var base_color = '1e8cbe';
|
89 |
+
var red = parseInt( base_color.substr( 0, 2 ), 16 );
|
90 |
+
var green = parseInt( base_color.substr( 2, 2 ), 16 );
|
91 |
+
var blue = parseInt( base_color.substr( 4, 2 ), 16 );
|
92 |
+
var count = config.data.length - 1;
|
93 |
+
var colors = [];
|
94 |
+
for ( i = 0; i <= count; i ++ ) {
|
95 |
+
red += 15;
|
96 |
+
if ( red > 209 ) {
|
97 |
+
red = 209;
|
98 |
+
}
|
99 |
+
green += 10;
|
100 |
+
if ( green > 223 ) {
|
101 |
+
green = 223;
|
102 |
+
}
|
103 |
+
blue += 5;
|
104 |
+
if ( blue > 229 ) {
|
105 |
+
blue = 229;
|
106 |
+
}
|
107 |
+
var hred = red.toString( 16 );
|
108 |
+
if ( hred.length < 2 ) {
|
109 |
+
hred += hred;
|
110 |
+
}
|
111 |
+
var hgreen = green.toString( 16 );
|
112 |
+
if ( hgreen.length < 2 ) {
|
113 |
+
hgreen += hgreen;
|
114 |
+
}
|
115 |
+
var hblue = blue.toString( 16 );
|
116 |
+
if ( hblue.length < 2 ) {
|
117 |
+
hblue += hblue;
|
118 |
+
}
|
119 |
+
colors.push( '#' + hred + hgreen + hblue );
|
120 |
+
}
|
121 |
+
return colors;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
} );
|
js/mw-wp-form-repeatable.js
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* mw_wp_form_repeatable
|
3 |
+
* Created: August 31, 2014
|
4 |
+
*/
|
5 |
+
jQuery( function( $ ) {
|
6 |
+
|
7 |
+
$.fn.mw_wp_form_repeatable = function( config ) {
|
8 |
+
var defaults = {
|
9 |
+
label_field : '.open-btn span',
|
10 |
+
open_btn : '.open-btn b',
|
11 |
+
remove_btn : '.remove-btn b',
|
12 |
+
add_btn : '.add-btn',
|
13 |
+
box : '.repeatable-box',
|
14 |
+
box_content : '.repeatable-box-content',
|
15 |
+
add_position: 'first' // or last
|
16 |
+
};
|
17 |
+
var config = $.extend( defaults, config );
|
18 |
+
var cnt = $( config.box ).length;
|
19 |
+
|
20 |
+
return this.each( function( i, e ) {
|
21 |
+
/**
|
22 |
+
* 開閉ボタン
|
23 |
+
*/
|
24 |
+
$( e ).find( config.open_btn ).on( 'click', function() {
|
25 |
+
$( this ).parent().siblings( config.box_content ).slideToggle( 'high' );
|
26 |
+
} );
|
27 |
+
|
28 |
+
/**
|
29 |
+
* 削除ボタン
|
30 |
+
*/
|
31 |
+
$( e ).find( config.remove_btn ).on( 'click', function() {
|
32 |
+
cnt ++;
|
33 |
+
$( this ).closest( config.box ).fadeOut( function() {
|
34 |
+
$( this ).remove();
|
35 |
+
} );
|
36 |
+
} );
|
37 |
+
|
38 |
+
/**
|
39 |
+
* 追加ボタン
|
40 |
+
*/
|
41 |
+
$( e ).find( config.add_btn ).click( function() {
|
42 |
+
cnt ++;
|
43 |
+
var clone = $( this ).parent().find( config.box ).first().clone( true );
|
44 |
+
clone.find( 'input, select' ).each( function() {
|
45 |
+
$( this ).attr( 'name',
|
46 |
+
$( this ).attr( 'name' ).replace( /\[\d+\]/, '[' + cnt + ']' )
|
47 |
+
);
|
48 |
+
} );
|
49 |
+
clone.hide().find( config.box_content ).show();
|
50 |
+
if ( config.add_position === 'first' ) {
|
51 |
+
$( this ).parent().find( config.box ).first().after( clone.fadeIn() );
|
52 |
+
} else {
|
53 |
+
$( this ).parent().find( config.box ).last().after( clone.fadeIn() );
|
54 |
+
}
|
55 |
+
} );
|
56 |
+
|
57 |
+
/**
|
58 |
+
* ターゲット名をラベルとして表示
|
59 |
+
*/
|
60 |
+
$( e ).find( '.targetKey' ).on( 'change keyup', function() {
|
61 |
+
var val = $( this ).val();
|
62 |
+
$( this ).parents( config.box ).find( config.label_field ).text( val );
|
63 |
+
} );
|
64 |
+
} );
|
65 |
+
}
|
66 |
+
|
67 |
+
} );
|
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 1.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
-
"PO-Revision-Date: 2014-
|
9 |
"Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
|
10 |
"Language-Team: Takashi Kitajima <inc@2inc.org>\n"
|
11 |
"Language: ja\n"
|
@@ -15,8 +15,8 @@ msgstr ""
|
|
15 |
"Plural-Forms: nplurals=1; plural=0;\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"X-Poedit-Basepath: .\n"
|
18 |
-
"X-Generator: Poedit 1.6.
|
19 |
-
"X-Poedit-KeywordsList: __;_e;_x\n"
|
20 |
"X-Poedit-SearchPath-0: ..\n"
|
21 |
|
22 |
#: form_fields/mw_form_field_akismet_error.php:23
|
@@ -107,6 +107,10 @@ msgid "Default value"
|
|
107 |
msgstr "初期値"
|
108 |
|
109 |
#: form_fields/mw_form_field_checkbox.php:99
|
|
|
|
|
|
|
|
|
110 |
#: form_fields/mw_form_field_datepicker.php:122
|
111 |
#: form_fields/mw_form_field_file.php:105
|
112 |
#: form_fields/mw_form_field_image.php:106
|
@@ -119,7 +123,7 @@ msgstr "初期値"
|
|
119 |
msgid "Dsiplay error"
|
120 |
msgstr "エラー表示"
|
121 |
|
122 |
-
#: form_fields/mw_form_field_checkbox.php:
|
123 |
#: form_fields/mw_form_field_datepicker.php:123
|
124 |
#: form_fields/mw_form_field_file.php:106
|
125 |
#: form_fields/mw_form_field_image.php:107
|
@@ -241,7 +245,7 @@ msgstr "テキストエリア"
|
|
241 |
msgid "Zip Code"
|
242 |
msgstr "郵便番号"
|
243 |
|
244 |
-
#: mw-wp-form.php:
|
245 |
msgid "Validation Object is not a MW Validation Class."
|
246 |
msgstr ""
|
247 |
|
@@ -313,19 +317,19 @@ msgstr "設定"
|
|
313 |
msgid "Style setting"
|
314 |
msgstr "スタイル設定"
|
315 |
|
316 |
-
#: system/mw_wp_form_admin_page.php:
|
317 |
msgid "Copy and Paste this shortcode."
|
318 |
msgstr "このショートコードをコピー&ペーストしてください。"
|
319 |
|
320 |
-
#: system/mw_wp_form_admin_page.php:
|
321 |
msgid "The key to use with hook is "
|
322 |
msgstr "各フックで使用する修飾子は"
|
323 |
|
324 |
-
#: system/mw_wp_form_admin_page.php:
|
325 |
msgid "Activate Query string of post"
|
326 |
msgstr "URL引数を有効にする"
|
327 |
|
328 |
-
#: system/mw_wp_form_admin_page.php:
|
329 |
msgid ""
|
330 |
"If this field is active, MW WP Form get query string. And get post data from "
|
331 |
"query string \"post_id\". You can use $post's property in editor."
|
@@ -334,59 +338,59 @@ msgstr ""
|
|
334 |
"とに投稿を取得します。その投稿($post) のプロパティを使用できるようになりま"
|
335 |
"す。"
|
336 |
|
337 |
-
#: system/mw_wp_form_admin_page.php:
|
338 |
msgid "Example: {ID}, {post_title}, {post_meta} etc..."
|
339 |
msgstr "例:{ID}、{post_title}、{post_meta}など…"
|
340 |
|
341 |
-
#: system/mw_wp_form_admin_page.php:
|
342 |
msgid "Saving inquiry data in database"
|
343 |
msgstr "問い合わせデータをデータベースに保存"
|
344 |
|
345 |
-
#: system/mw_wp_form_admin_page.php:
|
346 |
msgid "Akismet Setting"
|
347 |
msgstr "Akismet 設定"
|
348 |
|
349 |
-
#: system/mw_wp_form_admin_page.php:
|
350 |
msgid "Input the key to use Akismet."
|
351 |
msgstr "Akismetを使用する項目のキーを入力してください。"
|
352 |
|
353 |
-
#: system/mw_wp_form_admin_page.php:
|
354 |
msgid "{key} is converted form data."
|
355 |
msgstr "{キー}でそのフォーム項目に変換されます。"
|
356 |
|
357 |
-
#: system/mw_wp_form_admin_page.php:
|
358 |
msgid "Subject"
|
359 |
msgstr "件名"
|
360 |
|
361 |
-
#: system/mw_wp_form_admin_page.php:
|
362 |
msgid "Sender"
|
363 |
msgstr "送信者"
|
364 |
|
365 |
-
#: system/mw_wp_form_admin_page.php:
|
366 |
-
#: system/mw_wp_form_admin_page.php:
|
367 |
-
#: system/mw_wp_form_admin_page.php:
|
368 |
msgid "If empty:"
|
369 |
msgstr "未入力の場合:"
|
370 |
|
371 |
-
#: system/mw_wp_form_admin_page.php:
|
372 |
msgid "From ( E-mail address )"
|
373 |
msgstr "送信元(E-mailアドレス)"
|
374 |
|
375 |
-
#: system/mw_wp_form_admin_page.php:
|
376 |
msgid "Content"
|
377 |
msgstr "本文"
|
378 |
|
379 |
-
#: system/mw_wp_form_admin_page.php:
|
380 |
msgid "Automatic reply email"
|
381 |
msgstr "自動返信メール"
|
382 |
|
383 |
-
#: system/mw_wp_form_admin_page.php:
|
384 |
msgid ""
|
385 |
"Input the key to use as transmission to automatic reply email. {} is "
|
386 |
"unnecessary."
|
387 |
msgstr "自動返信メールに使用する項目のキーを入力してください。{ }は不要です。"
|
388 |
|
389 |
-
#: system/mw_wp_form_admin_page.php:
|
390 |
msgid ""
|
391 |
"If Admin Email Options is a blank, Automatic Replay Email Options is used as "
|
392 |
"Admin Email Options."
|
@@ -394,35 +398,35 @@ msgstr ""
|
|
394 |
"管理者宛メール設定が空のときは自動返信メール設定に管理者宛メール設定が使用さ"
|
395 |
"れます。"
|
396 |
|
397 |
-
#: system/mw_wp_form_admin_page.php:
|
398 |
msgid "To ( E-mail address )"
|
399 |
msgstr "送信先(E-mailアドレス)"
|
400 |
|
401 |
-
#: system/mw_wp_form_admin_page.php:
|
402 |
msgid "CC ( E-mail address )"
|
403 |
msgstr "CC(E-mailアドレス)"
|
404 |
|
405 |
-
#: system/mw_wp_form_admin_page.php:
|
406 |
msgid "BCC ( E-mail address )"
|
407 |
msgstr "BCC(E-mailアドレス)"
|
408 |
|
409 |
-
#: system/mw_wp_form_admin_page.php:
|
410 |
msgid "Input Page URL"
|
411 |
msgstr "入力画面URL"
|
412 |
|
413 |
-
#: system/mw_wp_form_admin_page.php:
|
414 |
msgid "Confirmation Page URL"
|
415 |
msgstr "確認画面URL"
|
416 |
|
417 |
-
#: system/mw_wp_form_admin_page.php:
|
418 |
msgid "Complete Page URL"
|
419 |
msgstr "完了画面URL"
|
420 |
|
421 |
-
#: system/mw_wp_form_admin_page.php:
|
422 |
msgid "Validation Error Page URL"
|
423 |
msgstr "エラー画面URL"
|
424 |
|
425 |
-
#: system/mw_wp_form_admin_page.php:
|
426 |
msgid ""
|
427 |
"This urls are the redirection urls at the time of button press. When URL "
|
428 |
"setting is empty, The page redirect on the same page."
|
@@ -430,90 +434,126 @@ msgstr ""
|
|
430 |
"上記URLはボタン押下時のリダイレクトURLです。URLの設定が空のときは、同一ページ"
|
431 |
"上でリダイレクトします。"
|
432 |
|
433 |
-
#: system/mw_wp_form_admin_page.php:
|
434 |
msgid "When a URL doesn't begin http or https, %s is complemented."
|
435 |
msgstr "URLが http または https で始まっていない場合は %s が補完されます。"
|
436 |
|
437 |
-
#: system/mw_wp_form_admin_page.php:
|
438 |
msgid "Add Validation rule"
|
439 |
msgstr "バリデーションルールを追加"
|
440 |
|
441 |
-
#: system/mw_wp_form_admin_page.php:
|
442 |
msgid "The key which applies validation"
|
443 |
msgstr "バリデーションを適用する項目"
|
444 |
|
445 |
-
#: system/mw_wp_form_admin_page.php:
|
446 |
msgid "Select Style"
|
447 |
msgstr "スタイルを選択"
|
448 |
|
449 |
-
#: system/mw_wp_form_admin_page.php:
|
450 |
msgid "Add form tag"
|
451 |
msgstr "フォームタグを追加"
|
452 |
|
453 |
-
#: system/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
msgid "Not supported"
|
455 |
msgstr "未対応"
|
456 |
|
457 |
-
#: system/mw_wp_form_contact_data_page.php:
|
458 |
msgid "Reservation"
|
459 |
msgstr "保留"
|
460 |
|
461 |
-
#: system/mw_wp_form_contact_data_page.php:
|
462 |
msgid "Supported"
|
463 |
msgstr "対応済み"
|
464 |
|
465 |
-
#: system/mw_wp_form_contact_data_page.php:
|
466 |
msgid "Edit "
|
467 |
msgstr "編集"
|
468 |
|
469 |
-
#: system/mw_wp_form_contact_data_page.php:
|
470 |
msgid "View"
|
471 |
msgstr "表示"
|
472 |
|
473 |
-
#: system/mw_wp_form_contact_data_page.php:
|
474 |
msgid "Search"
|
475 |
msgstr "検索"
|
476 |
|
477 |
-
#: system/mw_wp_form_contact_data_page.php:
|
478 |
msgid "No data found"
|
479 |
msgstr "データがありません"
|
480 |
|
481 |
-
#: system/mw_wp_form_contact_data_page.php:
|
482 |
msgid "No data found in Trash"
|
483 |
msgstr "ゴミ箱にデータはありません"
|
484 |
|
485 |
-
#: system/mw_wp_form_contact_data_page.php:
|
486 |
msgid "CSV Download"
|
487 |
msgstr "CSVダウンロード"
|
488 |
|
489 |
-
#: system/mw_wp_form_contact_data_page.php:
|
490 |
-
#: system/mw_wp_form_contact_data_page.php:
|
491 |
-
#: system/mw_wp_form_contact_data_page.php:
|
492 |
-
#: system/mw_wp_form_contact_data_page.php:
|
493 |
msgid "Response Status"
|
494 |
msgstr "対応状況"
|
495 |
|
496 |
-
#: system/mw_wp_form_contact_data_page.php:
|
497 |
-
#: system/mw_wp_form_contact_data_page.php:
|
498 |
-
#: system/mw_wp_form_contact_data_page.php:
|
499 |
msgid "Memo"
|
500 |
msgstr "メモ"
|
501 |
|
502 |
-
#: system/mw_wp_form_contact_data_page.php:
|
503 |
msgid "Custom Fields"
|
504 |
msgstr "カスタムフィールド"
|
505 |
|
506 |
-
#: system/mw_wp_form_contact_data_page.php:
|
507 |
msgid "Registed Date"
|
508 |
msgstr "登録日時"
|
509 |
|
510 |
-
#: system/mw_wp_form_contact_data_page.php:
|
511 |
-
#: system/mw_wp_form_contact_data_page.php:452
|
512 |
#: system/mw_wp_form_contact_data_page.php:466
|
|
|
513 |
msgid "Inquiry data"
|
514 |
msgstr "問い合わせデータ"
|
515 |
|
516 |
-
#: system/mw_wp_form_contact_data_page.php:
|
517 |
msgid ""
|
518 |
"You can see the inquiry data that are saved in the database by clicking on "
|
519 |
"the link below."
|
@@ -521,31 +561,36 @@ msgstr ""
|
|
521 |
"リンクをクリックすることでデータベースに保存された問い合わせデータを見ること"
|
522 |
"ができます。"
|
523 |
|
524 |
-
#: system/mw_wp_form_contact_data_page.php:
|
525 |
msgid "Form title"
|
526 |
msgstr "フォーム名"
|
527 |
|
528 |
-
#: system/mw_wp_form_contact_data_page.php:
|
|
|
|
|
|
|
|
|
|
|
529 |
msgid "The number of inquiries"
|
530 |
msgstr "問い合わせ件数"
|
531 |
|
532 |
-
#: system/mw_wp_form_contact_data_page.php:
|
533 |
msgid "Updated date"
|
534 |
msgstr "更新日"
|
535 |
|
536 |
-
#: system/mw_wp_form_contact_data_page.php:
|
537 |
msgid "Created date"
|
538 |
msgstr "作成日"
|
539 |
|
540 |
-
#: system/mw_wp_form_contact_data_page.php:
|
541 |
msgid "cases"
|
542 |
msgstr "件"
|
543 |
|
544 |
-
#: system/mw_wp_form_contact_data_page.php:
|
545 |
msgid "« Back to the list"
|
546 |
msgstr "« 一覧に戻る"
|
547 |
|
548 |
-
#: system/mw_wp_form_file.php:
|
549 |
msgid "Uploaded from "
|
550 |
msgstr "Uploaded from "
|
551 |
|
@@ -573,7 +618,7 @@ msgstr "半角英数字"
|
|
573 |
msgid "The number of characters is invalid."
|
574 |
msgstr "文字数が正しくありません。"
|
575 |
|
576 |
-
#: validation_rules/mw_validation_rule_between.php:
|
577 |
msgid "The range of the number of characters"
|
578 |
msgstr "文字数の範囲"
|
579 |
|
@@ -589,7 +634,7 @@ msgstr "日付"
|
|
589 |
msgid "This is not in agreement."
|
590 |
msgstr "一致しません。"
|
591 |
|
592 |
-
#: validation_rules/mw_validation_rule_eq.php:
|
593 |
msgid "The key at same value"
|
594 |
msgstr "一致する項目"
|
595 |
|
@@ -597,11 +642,11 @@ msgstr "一致する項目"
|
|
597 |
msgid "This file size is too big."
|
598 |
msgstr "ファイルサイズが大きすぎます。"
|
599 |
|
600 |
-
#: validation_rules/mw_validation_rule_filesize.php:
|
601 |
msgid "Permitted file size"
|
602 |
msgstr "サイズ制限"
|
603 |
|
604 |
-
#: validation_rules/mw_validation_rule_filesize.php:
|
605 |
msgid "bytes"
|
606 |
msgstr "バイト"
|
607 |
|
@@ -609,11 +654,11 @@ msgstr "バイト"
|
|
609 |
msgid "This file is invalid."
|
610 |
msgstr "許可されたファイルではありません。"
|
611 |
|
612 |
-
#: validation_rules/mw_validation_rule_filetype.php:
|
613 |
msgid "Permitted Extension"
|
614 |
msgstr "拡張子制限"
|
615 |
|
616 |
-
#: validation_rules/mw_validation_rule_filetype.php:
|
617 |
msgid "Example:jpg or jpg,txt,…"
|
618 |
msgstr "例:jpg もしくは jpg,txt…"
|
619 |
|
@@ -649,7 +694,7 @@ msgstr "メールアドレス"
|
|
649 |
msgid "The number of characters is a few."
|
650 |
msgstr "文字数が足りません。"
|
651 |
|
652 |
-
#: validation_rules/mw_validation_rule_minlength.php:
|
653 |
msgid "The number of the minimum characters"
|
654 |
msgstr "最小文字数"
|
655 |
|
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 1.9.0\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
+
"POT-Creation-Date: 2014-09-01 11:56:58+00:00\n"
|
8 |
+
"PO-Revision-Date: 2014-09-01 21:03+0900\n"
|
9 |
"Last-Translator: Takashi Kitajima <inc@2inc.org>\n"
|
10 |
"Language-Team: Takashi Kitajima <inc@2inc.org>\n"
|
11 |
"Language: ja\n"
|
15 |
"Plural-Forms: nplurals=1; plural=0;\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"X-Poedit-Basepath: .\n"
|
18 |
+
"X-Generator: Poedit 1.6.9\n"
|
19 |
+
"X-Poedit-KeywordsList: __;_e;_x;esc_html_e;esc_html__\n"
|
20 |
"X-Poedit-SearchPath-0: ..\n"
|
21 |
|
22 |
#: form_fields/mw_form_field_akismet_error.php:23
|
107 |
msgstr "初期値"
|
108 |
|
109 |
#: form_fields/mw_form_field_checkbox.php:99
|
110 |
+
msgid "Separator string"
|
111 |
+
msgstr "区切り文字"
|
112 |
+
|
113 |
+
#: form_fields/mw_form_field_checkbox.php:103
|
114 |
#: form_fields/mw_form_field_datepicker.php:122
|
115 |
#: form_fields/mw_form_field_file.php:105
|
116 |
#: form_fields/mw_form_field_image.php:106
|
123 |
msgid "Dsiplay error"
|
124 |
msgstr "エラー表示"
|
125 |
|
126 |
+
#: form_fields/mw_form_field_checkbox.php:104
|
127 |
#: form_fields/mw_form_field_datepicker.php:123
|
128 |
#: form_fields/mw_form_field_file.php:106
|
129 |
#: form_fields/mw_form_field_image.php:107
|
245 |
msgid "Zip Code"
|
246 |
msgstr "郵便番号"
|
247 |
|
248 |
+
#: mw-wp-form.php:529
|
249 |
msgid "Validation Object is not a MW Validation Class."
|
250 |
msgstr ""
|
251 |
|
317 |
msgid "Style setting"
|
318 |
msgstr "スタイル設定"
|
319 |
|
320 |
+
#: system/mw_wp_form_admin_page.php:304
|
321 |
msgid "Copy and Paste this shortcode."
|
322 |
msgstr "このショートコードをコピー&ペーストしてください。"
|
323 |
|
324 |
+
#: system/mw_wp_form_admin_page.php:305
|
325 |
msgid "The key to use with hook is "
|
326 |
msgstr "各フックで使用する修飾子は"
|
327 |
|
328 |
+
#: system/mw_wp_form_admin_page.php:319
|
329 |
msgid "Activate Query string of post"
|
330 |
msgstr "URL引数を有効にする"
|
331 |
|
332 |
+
#: system/mw_wp_form_admin_page.php:320
|
333 |
msgid ""
|
334 |
"If this field is active, MW WP Form get query string. And get post data from "
|
335 |
"query string \"post_id\". You can use $post's property in editor."
|
338 |
"とに投稿を取得します。その投稿($post) のプロパティを使用できるようになりま"
|
339 |
"す。"
|
340 |
|
341 |
+
#: system/mw_wp_form_admin_page.php:321
|
342 |
msgid "Example: {ID}, {post_title}, {post_meta} etc..."
|
343 |
msgstr "例:{ID}、{post_title}、{post_meta}など…"
|
344 |
|
345 |
+
#: system/mw_wp_form_admin_page.php:324
|
346 |
msgid "Saving inquiry data in database"
|
347 |
msgstr "問い合わせデータをデータベースに保存"
|
348 |
|
349 |
+
#: system/mw_wp_form_admin_page.php:328
|
350 |
msgid "Akismet Setting"
|
351 |
msgstr "Akismet 設定"
|
352 |
|
353 |
+
#: system/mw_wp_form_admin_page.php:343
|
354 |
msgid "Input the key to use Akismet."
|
355 |
msgstr "Akismetを使用する項目のキーを入力してください。"
|
356 |
|
357 |
+
#: system/mw_wp_form_admin_page.php:368 system/mw_wp_form_admin_page.php:404
|
358 |
msgid "{key} is converted form data."
|
359 |
msgstr "{キー}でそのフォーム項目に変換されます。"
|
360 |
|
361 |
+
#: system/mw_wp_form_admin_page.php:371 system/mw_wp_form_admin_page.php:423
|
362 |
msgid "Subject"
|
363 |
msgstr "件名"
|
364 |
|
365 |
+
#: system/mw_wp_form_admin_page.php:375 system/mw_wp_form_admin_page.php:427
|
366 |
msgid "Sender"
|
367 |
msgstr "送信者"
|
368 |
|
369 |
+
#: system/mw_wp_form_admin_page.php:377 system/mw_wp_form_admin_page.php:382
|
370 |
+
#: system/mw_wp_form_admin_page.php:412 system/mw_wp_form_admin_page.php:429
|
371 |
+
#: system/mw_wp_form_admin_page.php:434
|
372 |
msgid "If empty:"
|
373 |
msgstr "未入力の場合:"
|
374 |
|
375 |
+
#: system/mw_wp_form_admin_page.php:380 system/mw_wp_form_admin_page.php:432
|
376 |
msgid "From ( E-mail address )"
|
377 |
msgstr "送信元(E-mailアドレス)"
|
378 |
|
379 |
+
#: system/mw_wp_form_admin_page.php:385 system/mw_wp_form_admin_page.php:437
|
380 |
msgid "Content"
|
381 |
msgstr "本文"
|
382 |
|
383 |
+
#: system/mw_wp_form_admin_page.php:389
|
384 |
msgid "Automatic reply email"
|
385 |
msgstr "自動返信メール"
|
386 |
|
387 |
+
#: system/mw_wp_form_admin_page.php:391
|
388 |
msgid ""
|
389 |
"Input the key to use as transmission to automatic reply email. {} is "
|
390 |
"unnecessary."
|
391 |
msgstr "自動返信メールに使用する項目のキーを入力してください。{ }は不要です。"
|
392 |
|
393 |
+
#: system/mw_wp_form_admin_page.php:407
|
394 |
msgid ""
|
395 |
"If Admin Email Options is a blank, Automatic Replay Email Options is used as "
|
396 |
"Admin Email Options."
|
398 |
"管理者宛メール設定が空のときは自動返信メール設定に管理者宛メール設定が使用さ"
|
399 |
"れます。"
|
400 |
|
401 |
+
#: system/mw_wp_form_admin_page.php:410
|
402 |
msgid "To ( E-mail address )"
|
403 |
msgstr "送信先(E-mailアドレス)"
|
404 |
|
405 |
+
#: system/mw_wp_form_admin_page.php:415
|
406 |
msgid "CC ( E-mail address )"
|
407 |
msgstr "CC(E-mailアドレス)"
|
408 |
|
409 |
+
#: system/mw_wp_form_admin_page.php:419
|
410 |
msgid "BCC ( E-mail address )"
|
411 |
msgstr "BCC(E-mailアドレス)"
|
412 |
|
413 |
+
#: system/mw_wp_form_admin_page.php:453
|
414 |
msgid "Input Page URL"
|
415 |
msgstr "入力画面URL"
|
416 |
|
417 |
+
#: system/mw_wp_form_admin_page.php:459
|
418 |
msgid "Confirmation Page URL"
|
419 |
msgstr "確認画面URL"
|
420 |
|
421 |
+
#: system/mw_wp_form_admin_page.php:465
|
422 |
msgid "Complete Page URL"
|
423 |
msgstr "完了画面URL"
|
424 |
|
425 |
+
#: system/mw_wp_form_admin_page.php:471
|
426 |
msgid "Validation Error Page URL"
|
427 |
msgstr "エラー画面URL"
|
428 |
|
429 |
+
#: system/mw_wp_form_admin_page.php:478
|
430 |
msgid ""
|
431 |
"This urls are the redirection urls at the time of button press. When URL "
|
432 |
"setting is empty, The page redirect on the same page."
|
434 |
"上記URLはボタン押下時のリダイレクトURLです。URLの設定が空のときは、同一ページ"
|
435 |
"上でリダイレクトします。"
|
436 |
|
437 |
+
#: system/mw_wp_form_admin_page.php:479
|
438 |
msgid "When a URL doesn't begin http or https, %s is complemented."
|
439 |
msgstr "URLが http または https で始まっていない場合は %s が補完されます。"
|
440 |
|
441 |
+
#: system/mw_wp_form_admin_page.php:512
|
442 |
msgid "Add Validation rule"
|
443 |
msgstr "バリデーションルールを追加"
|
444 |
|
445 |
+
#: system/mw_wp_form_admin_page.php:519
|
446 |
msgid "The key which applies validation"
|
447 |
msgstr "バリデーションを適用する項目"
|
448 |
|
449 |
+
#: system/mw_wp_form_admin_page.php:543
|
450 |
msgid "Select Style"
|
451 |
msgstr "スタイルを選択"
|
452 |
|
453 |
+
#: system/mw_wp_form_admin_page.php:580
|
454 |
msgid "Add form tag"
|
455 |
msgstr "フォームタグを追加"
|
456 |
|
457 |
+
#: system/mw_wp_form_chart_page.php:62 system/mw_wp_form_chart_page.php:63
|
458 |
+
#: system/mw_wp_form_chart_page.php:155
|
459 |
+
msgid "Chart"
|
460 |
+
msgstr "グラフ"
|
461 |
+
|
462 |
+
#: system/mw_wp_form_chart_page.php:163
|
463 |
+
msgid "Add Chart"
|
464 |
+
msgstr "グラフを追加"
|
465 |
+
|
466 |
+
#: system/mw_wp_form_chart_page.php:170
|
467 |
+
msgid "Item that create chart"
|
468 |
+
msgstr "グラフを作成する項目"
|
469 |
+
|
470 |
+
#: system/mw_wp_form_chart_page.php:172
|
471 |
+
msgid "Select this."
|
472 |
+
msgstr "選択してください"
|
473 |
+
|
474 |
+
#: system/mw_wp_form_chart_page.php:178
|
475 |
+
msgid "Chart type"
|
476 |
+
msgstr "グラフの種類"
|
477 |
+
|
478 |
+
#: system/mw_wp_form_chart_page.php:182
|
479 |
+
msgid "Pie chart"
|
480 |
+
msgstr "円グラフ"
|
481 |
+
|
482 |
+
#: system/mw_wp_form_chart_page.php:183
|
483 |
+
msgid "Bar chart"
|
484 |
+
msgstr "棒グラフ"
|
485 |
+
|
486 |
+
#: system/mw_wp_form_chart_page.php:196
|
487 |
+
msgid ""
|
488 |
+
"Separator string (If the check box. If the separator attribute is not set to "
|
489 |
+
"\",\")"
|
490 |
+
msgstr ""
|
491 |
+
"区切り文字(チェックボックスの場合。separator 属性が未設定の場合は「,」)"
|
492 |
+
|
493 |
+
#: system/mw_wp_form_contact_data_page.php:53
|
494 |
msgid "Not supported"
|
495 |
msgstr "未対応"
|
496 |
|
497 |
+
#: system/mw_wp_form_contact_data_page.php:54
|
498 |
msgid "Reservation"
|
499 |
msgstr "保留"
|
500 |
|
501 |
+
#: system/mw_wp_form_contact_data_page.php:55
|
502 |
msgid "Supported"
|
503 |
msgstr "対応済み"
|
504 |
|
505 |
+
#: system/mw_wp_form_contact_data_page.php:117
|
506 |
msgid "Edit "
|
507 |
msgstr "編集"
|
508 |
|
509 |
+
#: system/mw_wp_form_contact_data_page.php:118
|
510 |
msgid "View"
|
511 |
msgstr "表示"
|
512 |
|
513 |
+
#: system/mw_wp_form_contact_data_page.php:119
|
514 |
msgid "Search"
|
515 |
msgstr "検索"
|
516 |
|
517 |
+
#: system/mw_wp_form_contact_data_page.php:120
|
518 |
msgid "No data found"
|
519 |
msgstr "データがありません"
|
520 |
|
521 |
+
#: system/mw_wp_form_contact_data_page.php:121
|
522 |
msgid "No data found in Trash"
|
523 |
msgstr "ゴミ箱にデータはありません"
|
524 |
|
525 |
+
#: system/mw_wp_form_contact_data_page.php:165
|
526 |
msgid "CSV Download"
|
527 |
msgstr "CSVダウンロード"
|
528 |
|
529 |
+
#: system/mw_wp_form_contact_data_page.php:195
|
530 |
+
#: system/mw_wp_form_contact_data_page.php:227
|
531 |
+
#: system/mw_wp_form_contact_data_page.php:310
|
532 |
+
#: system/mw_wp_form_contact_data_page.php:407
|
533 |
msgid "Response Status"
|
534 |
msgstr "対応状況"
|
535 |
|
536 |
+
#: system/mw_wp_form_contact_data_page.php:218
|
537 |
+
#: system/mw_wp_form_contact_data_page.php:229
|
538 |
+
#: system/mw_wp_form_contact_data_page.php:419
|
539 |
msgid "Memo"
|
540 |
msgstr "メモ"
|
541 |
|
542 |
+
#: system/mw_wp_form_contact_data_page.php:285
|
543 |
msgid "Custom Fields"
|
544 |
msgstr "カスタムフィールド"
|
545 |
|
546 |
+
#: system/mw_wp_form_contact_data_page.php:309
|
547 |
msgid "Registed Date"
|
548 |
msgstr "登録日時"
|
549 |
|
550 |
+
#: system/mw_wp_form_contact_data_page.php:465
|
|
|
551 |
#: system/mw_wp_form_contact_data_page.php:466
|
552 |
+
#: system/mw_wp_form_contact_data_page.php:480
|
553 |
msgid "Inquiry data"
|
554 |
msgstr "問い合わせデータ"
|
555 |
|
556 |
+
#: system/mw_wp_form_contact_data_page.php:482
|
557 |
msgid ""
|
558 |
"You can see the inquiry data that are saved in the database by clicking on "
|
559 |
"the link below."
|
561 |
"リンクをクリックすることでデータベースに保存された問い合わせデータを見ること"
|
562 |
"ができます。"
|
563 |
|
564 |
+
#: system/mw_wp_form_contact_data_page.php:486
|
565 |
msgid "Form title"
|
566 |
msgstr "フォーム名"
|
567 |
|
568 |
+
#: system/mw_wp_form_contact_data_page.php:487
|
569 |
+
#: system/mw_wp_form_contact_data_page.php:497
|
570 |
+
msgid "Display Chart"
|
571 |
+
msgstr "グラフを表示"
|
572 |
+
|
573 |
+
#: system/mw_wp_form_contact_data_page.php:488
|
574 |
msgid "The number of inquiries"
|
575 |
msgstr "問い合わせ件数"
|
576 |
|
577 |
+
#: system/mw_wp_form_contact_data_page.php:489
|
578 |
msgid "Updated date"
|
579 |
msgstr "更新日"
|
580 |
|
581 |
+
#: system/mw_wp_form_contact_data_page.php:490
|
582 |
msgid "Created date"
|
583 |
msgstr "作成日"
|
584 |
|
585 |
+
#: system/mw_wp_form_contact_data_page.php:498
|
586 |
msgid "cases"
|
587 |
msgstr "件"
|
588 |
|
589 |
+
#: system/mw_wp_form_contact_data_page.php:520
|
590 |
msgid "« Back to the list"
|
591 |
msgstr "« 一覧に戻る"
|
592 |
|
593 |
+
#: system/mw_wp_form_file.php:180
|
594 |
msgid "Uploaded from "
|
595 |
msgstr "Uploaded from "
|
596 |
|
618 |
msgid "The number of characters is invalid."
|
619 |
msgstr "文字数が正しくありません。"
|
620 |
|
621 |
+
#: validation_rules/mw_validation_rule_between.php:73
|
622 |
msgid "The range of the number of characters"
|
623 |
msgstr "文字数の範囲"
|
624 |
|
634 |
msgid "This is not in agreement."
|
635 |
msgstr "一致しません。"
|
636 |
|
637 |
+
#: validation_rules/mw_validation_rule_eq.php:54
|
638 |
msgid "The key at same value"
|
639 |
msgstr "一致する項目"
|
640 |
|
642 |
msgid "This file size is too big."
|
643 |
msgstr "ファイルサイズが大きすぎます。"
|
644 |
|
645 |
+
#: validation_rules/mw_validation_rule_filesize.php:56
|
646 |
msgid "Permitted file size"
|
647 |
msgstr "サイズ制限"
|
648 |
|
649 |
+
#: validation_rules/mw_validation_rule_filesize.php:57
|
650 |
msgid "bytes"
|
651 |
msgstr "バイト"
|
652 |
|
654 |
msgid "This file is invalid."
|
655 |
msgstr "許可されたファイルではありません。"
|
656 |
|
657 |
+
#: validation_rules/mw_validation_rule_filetype.php:59
|
658 |
msgid "Permitted Extension"
|
659 |
msgstr "拡張子制限"
|
660 |
|
661 |
+
#: validation_rules/mw_validation_rule_filetype.php:60
|
662 |
msgid "Example:jpg or jpg,txt,…"
|
663 |
msgstr "例:jpg もしくは jpg,txt…"
|
664 |
|
694 |
msgid "The number of characters is a few."
|
695 |
msgstr "文字数が足りません。"
|
696 |
|
697 |
+
#: validation_rules/mw_validation_rule_minlength.php:54
|
698 |
msgid "The number of the minimum characters"
|
699 |
msgstr "最小文字数"
|
700 |
|
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 1.8.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
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 |
|
@@ -104,6 +104,10 @@ msgid "Default value"
|
|
104 |
msgstr ""
|
105 |
|
106 |
#: form_fields/mw_form_field_checkbox.php:99
|
|
|
|
|
|
|
|
|
107 |
#: form_fields/mw_form_field_datepicker.php:122
|
108 |
#: form_fields/mw_form_field_file.php:105
|
109 |
#: form_fields/mw_form_field_image.php:106
|
@@ -116,7 +120,7 @@ msgstr ""
|
|
116 |
msgid "Dsiplay error"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: form_fields/mw_form_field_checkbox.php:
|
120 |
#: form_fields/mw_form_field_datepicker.php:123
|
121 |
#: form_fields/mw_form_field_file.php:106
|
122 |
#: form_fields/mw_form_field_image.php:107
|
@@ -238,7 +242,7 @@ msgstr ""
|
|
238 |
msgid "Zip Code"
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: mw-wp-form.php:
|
242 |
msgid "Validation Object is not a MW Validation Class."
|
243 |
msgstr ""
|
244 |
|
@@ -310,220 +314,258 @@ msgstr ""
|
|
310 |
msgid "Style setting"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: system/mw_wp_form_admin_page.php:
|
314 |
msgid "Copy and Paste this shortcode."
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: system/mw_wp_form_admin_page.php:
|
318 |
msgid "The key to use with hook is "
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: system/mw_wp_form_admin_page.php:
|
322 |
msgid "Activate Query string of post"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: system/mw_wp_form_admin_page.php:
|
326 |
msgid "If this field is active, MW WP Form get query string. And get post data from query string \"post_id\". You can use $post's property in editor."
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: system/mw_wp_form_admin_page.php:
|
330 |
msgid "Example: {ID}, {post_title}, {post_meta} etc..."
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: system/mw_wp_form_admin_page.php:
|
334 |
msgid "Saving inquiry data in database"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: system/mw_wp_form_admin_page.php:
|
338 |
msgid "Akismet Setting"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: system/mw_wp_form_admin_page.php:
|
342 |
msgid "Input the key to use Akismet."
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: system/mw_wp_form_admin_page.php:
|
346 |
msgid "{key} is converted form data."
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: system/mw_wp_form_admin_page.php:
|
350 |
msgid "Subject"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: system/mw_wp_form_admin_page.php:
|
354 |
msgid "Sender"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: system/mw_wp_form_admin_page.php:
|
358 |
-
#: system/mw_wp_form_admin_page.php:
|
359 |
-
#: system/mw_wp_form_admin_page.php:
|
360 |
msgid "If empty:"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: system/mw_wp_form_admin_page.php:
|
364 |
msgid "From ( E-mail address )"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: system/mw_wp_form_admin_page.php:
|
368 |
msgid "Content"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: system/mw_wp_form_admin_page.php:
|
372 |
msgid "Automatic reply email"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: system/mw_wp_form_admin_page.php:
|
376 |
msgid "Input the key to use as transmission to automatic reply email. {} is unnecessary."
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: system/mw_wp_form_admin_page.php:
|
380 |
msgid "If Admin Email Options is a blank, Automatic Replay Email Options is used as Admin Email Options."
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: system/mw_wp_form_admin_page.php:
|
384 |
msgid "To ( E-mail address )"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: system/mw_wp_form_admin_page.php:
|
388 |
msgid "CC ( E-mail address )"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: system/mw_wp_form_admin_page.php:
|
392 |
msgid "BCC ( E-mail address )"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: system/mw_wp_form_admin_page.php:
|
396 |
msgid "Input Page URL"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: system/mw_wp_form_admin_page.php:
|
400 |
msgid "Confirmation Page URL"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: system/mw_wp_form_admin_page.php:
|
404 |
msgid "Complete Page URL"
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: system/mw_wp_form_admin_page.php:
|
408 |
msgid "Validation Error Page URL"
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: system/mw_wp_form_admin_page.php:
|
412 |
msgid "This urls are the redirection urls at the time of button press. When URL setting is empty, The page redirect on the same page."
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: system/mw_wp_form_admin_page.php:
|
416 |
msgid "When a URL doesn't begin http or https, %s is complemented."
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: system/mw_wp_form_admin_page.php:
|
420 |
msgid "Add Validation rule"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: system/mw_wp_form_admin_page.php:
|
424 |
msgid "The key which applies validation"
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: system/mw_wp_form_admin_page.php:
|
428 |
msgid "Select Style"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: system/mw_wp_form_admin_page.php:
|
432 |
msgid "Add form tag"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: system/
|
436 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
msgstr ""
|
438 |
|
439 |
#: system/mw_wp_form_contact_data_page.php:53
|
440 |
-
msgid "
|
441 |
msgstr ""
|
442 |
|
443 |
#: system/mw_wp_form_contact_data_page.php:54
|
|
|
|
|
|
|
|
|
444 |
msgid "Supported"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: system/mw_wp_form_contact_data_page.php:
|
448 |
msgid "Edit "
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: system/mw_wp_form_contact_data_page.php:
|
452 |
msgid "View"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: system/mw_wp_form_contact_data_page.php:
|
456 |
msgid "Search"
|
457 |
msgstr ""
|
458 |
|
459 |
-
#: system/mw_wp_form_contact_data_page.php:
|
460 |
msgid "No data found"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: system/mw_wp_form_contact_data_page.php:
|
464 |
msgid "No data found in Trash"
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: system/mw_wp_form_contact_data_page.php:
|
468 |
msgid "CSV Download"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: system/mw_wp_form_contact_data_page.php:
|
472 |
-
#: system/mw_wp_form_contact_data_page.php:
|
473 |
-
#: system/mw_wp_form_contact_data_page.php:
|
474 |
-
#: system/mw_wp_form_contact_data_page.php:
|
475 |
msgid "Response Status"
|
476 |
msgstr ""
|
477 |
|
478 |
-
#: system/mw_wp_form_contact_data_page.php:
|
479 |
-
#: system/mw_wp_form_contact_data_page.php:
|
480 |
-
#: system/mw_wp_form_contact_data_page.php:
|
481 |
msgid "Memo"
|
482 |
msgstr ""
|
483 |
|
484 |
-
#: system/mw_wp_form_contact_data_page.php:
|
485 |
msgid "Custom Fields"
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: system/mw_wp_form_contact_data_page.php:
|
489 |
msgid "Registed Date"
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: system/mw_wp_form_contact_data_page.php:
|
493 |
-
#: system/mw_wp_form_contact_data_page.php:452
|
494 |
#: system/mw_wp_form_contact_data_page.php:466
|
|
|
495 |
msgid "Inquiry data"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: system/mw_wp_form_contact_data_page.php:
|
499 |
msgid "You can see the inquiry data that are saved in the database by clicking on the link below."
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: system/mw_wp_form_contact_data_page.php:
|
503 |
msgid "Form title"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: system/mw_wp_form_contact_data_page.php:
|
|
|
|
|
|
|
|
|
|
|
507 |
msgid "The number of inquiries"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: system/mw_wp_form_contact_data_page.php:
|
511 |
msgid "Updated date"
|
512 |
msgstr ""
|
513 |
|
514 |
-
#: system/mw_wp_form_contact_data_page.php:
|
515 |
msgid "Created date"
|
516 |
msgstr ""
|
517 |
|
518 |
-
#: system/mw_wp_form_contact_data_page.php:
|
519 |
msgid "cases"
|
520 |
msgstr ""
|
521 |
|
522 |
-
#: system/mw_wp_form_contact_data_page.php:
|
523 |
msgid "« Back to the list"
|
524 |
msgstr ""
|
525 |
|
526 |
-
#: system/mw_wp_form_file.php:
|
527 |
msgid "Uploaded from "
|
528 |
msgstr ""
|
529 |
|
@@ -551,7 +593,7 @@ msgstr ""
|
|
551 |
msgid "The number of characters is invalid."
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: validation_rules/mw_validation_rule_between.php:
|
555 |
msgid "The range of the number of characters"
|
556 |
msgstr ""
|
557 |
|
@@ -567,7 +609,7 @@ msgstr ""
|
|
567 |
msgid "This is not in agreement."
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: validation_rules/mw_validation_rule_eq.php:
|
571 |
msgid "The key at same value"
|
572 |
msgstr ""
|
573 |
|
@@ -575,11 +617,11 @@ msgstr ""
|
|
575 |
msgid "This file size is too big."
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: validation_rules/mw_validation_rule_filesize.php:
|
579 |
msgid "Permitted file size"
|
580 |
msgstr ""
|
581 |
|
582 |
-
#: validation_rules/mw_validation_rule_filesize.php:
|
583 |
msgid "bytes"
|
584 |
msgstr ""
|
585 |
|
@@ -587,11 +629,11 @@ msgstr ""
|
|
587 |
msgid "This file is invalid."
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: validation_rules/mw_validation_rule_filetype.php:
|
591 |
msgid "Permitted Extension"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: validation_rules/mw_validation_rule_filetype.php:
|
595 |
msgid "Example:jpg or jpg,txt,…"
|
596 |
msgstr ""
|
597 |
|
@@ -627,7 +669,7 @@ msgstr ""
|
|
627 |
msgid "The number of characters is a few."
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: validation_rules/mw_validation_rule_minlength.php:
|
631 |
msgid "The number of the minimum characters"
|
632 |
msgstr ""
|
633 |
|
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 1.8.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/mw-wp-form\n"
|
7 |
+
"POT-Creation-Date: 2014-09-01 11:56:58+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.9\n"
|
18 |
"X-Poedit-KeywordsList: __;_e\n"
|
19 |
"X-Poedit-SearchPath-0: ..\n"
|
20 |
|
104 |
msgstr ""
|
105 |
|
106 |
#: form_fields/mw_form_field_checkbox.php:99
|
107 |
+
msgid "Separator string"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: form_fields/mw_form_field_checkbox.php:103
|
111 |
#: form_fields/mw_form_field_datepicker.php:122
|
112 |
#: form_fields/mw_form_field_file.php:105
|
113 |
#: form_fields/mw_form_field_image.php:106
|
120 |
msgid "Dsiplay error"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: form_fields/mw_form_field_checkbox.php:104
|
124 |
#: form_fields/mw_form_field_datepicker.php:123
|
125 |
#: form_fields/mw_form_field_file.php:106
|
126 |
#: form_fields/mw_form_field_image.php:107
|
242 |
msgid "Zip Code"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: mw-wp-form.php:529
|
246 |
msgid "Validation Object is not a MW Validation Class."
|
247 |
msgstr ""
|
248 |
|
314 |
msgid "Style setting"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: system/mw_wp_form_admin_page.php:304
|
318 |
msgid "Copy and Paste this shortcode."
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: system/mw_wp_form_admin_page.php:305
|
322 |
msgid "The key to use with hook is "
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: system/mw_wp_form_admin_page.php:319
|
326 |
msgid "Activate Query string of post"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: system/mw_wp_form_admin_page.php:320
|
330 |
msgid "If this field is active, MW WP Form get query string. And get post data from query string \"post_id\". You can use $post's property in editor."
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: system/mw_wp_form_admin_page.php:321
|
334 |
msgid "Example: {ID}, {post_title}, {post_meta} etc..."
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: system/mw_wp_form_admin_page.php:324
|
338 |
msgid "Saving inquiry data in database"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: system/mw_wp_form_admin_page.php:328
|
342 |
msgid "Akismet Setting"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: system/mw_wp_form_admin_page.php:343
|
346 |
msgid "Input the key to use Akismet."
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: system/mw_wp_form_admin_page.php:368 system/mw_wp_form_admin_page.php:404
|
350 |
msgid "{key} is converted form data."
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: system/mw_wp_form_admin_page.php:371 system/mw_wp_form_admin_page.php:423
|
354 |
msgid "Subject"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: system/mw_wp_form_admin_page.php:375 system/mw_wp_form_admin_page.php:427
|
358 |
msgid "Sender"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: system/mw_wp_form_admin_page.php:377 system/mw_wp_form_admin_page.php:382
|
362 |
+
#: system/mw_wp_form_admin_page.php:412 system/mw_wp_form_admin_page.php:429
|
363 |
+
#: system/mw_wp_form_admin_page.php:434
|
364 |
msgid "If empty:"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: system/mw_wp_form_admin_page.php:380 system/mw_wp_form_admin_page.php:432
|
368 |
msgid "From ( E-mail address )"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: system/mw_wp_form_admin_page.php:385 system/mw_wp_form_admin_page.php:437
|
372 |
msgid "Content"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: system/mw_wp_form_admin_page.php:389
|
376 |
msgid "Automatic reply email"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: system/mw_wp_form_admin_page.php:391
|
380 |
msgid "Input the key to use as transmission to automatic reply email. {} is unnecessary."
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: system/mw_wp_form_admin_page.php:407
|
384 |
msgid "If Admin Email Options is a blank, Automatic Replay Email Options is used as Admin Email Options."
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: system/mw_wp_form_admin_page.php:410
|
388 |
msgid "To ( E-mail address )"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: system/mw_wp_form_admin_page.php:415
|
392 |
msgid "CC ( E-mail address )"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: system/mw_wp_form_admin_page.php:419
|
396 |
msgid "BCC ( E-mail address )"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: system/mw_wp_form_admin_page.php:453
|
400 |
msgid "Input Page URL"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: system/mw_wp_form_admin_page.php:459
|
404 |
msgid "Confirmation Page URL"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: system/mw_wp_form_admin_page.php:465
|
408 |
msgid "Complete Page URL"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: system/mw_wp_form_admin_page.php:471
|
412 |
msgid "Validation Error Page URL"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: system/mw_wp_form_admin_page.php:478
|
416 |
msgid "This urls are the redirection urls at the time of button press. When URL setting is empty, The page redirect on the same page."
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: system/mw_wp_form_admin_page.php:479
|
420 |
msgid "When a URL doesn't begin http or https, %s is complemented."
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: system/mw_wp_form_admin_page.php:512
|
424 |
msgid "Add Validation rule"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: system/mw_wp_form_admin_page.php:519
|
428 |
msgid "The key which applies validation"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: system/mw_wp_form_admin_page.php:543
|
432 |
msgid "Select Style"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: system/mw_wp_form_admin_page.php:580
|
436 |
msgid "Add form tag"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: system/mw_wp_form_chart_page.php:62 system/mw_wp_form_chart_page.php:63
|
440 |
+
#: system/mw_wp_form_chart_page.php:155
|
441 |
+
msgid "Chart"
|
442 |
+
msgstr ""
|
443 |
+
|
444 |
+
#: system/mw_wp_form_chart_page.php:163
|
445 |
+
msgid "Add Chart"
|
446 |
+
msgstr ""
|
447 |
+
|
448 |
+
#: system/mw_wp_form_chart_page.php:170
|
449 |
+
msgid "Item that create chart"
|
450 |
+
msgstr ""
|
451 |
+
|
452 |
+
#: system/mw_wp_form_chart_page.php:172
|
453 |
+
msgid "Select this."
|
454 |
+
msgstr ""
|
455 |
+
|
456 |
+
#: system/mw_wp_form_chart_page.php:178
|
457 |
+
msgid "Chart type"
|
458 |
+
msgstr ""
|
459 |
+
|
460 |
+
#: system/mw_wp_form_chart_page.php:182
|
461 |
+
msgid "Pie chart"
|
462 |
+
msgstr ""
|
463 |
+
|
464 |
+
#: system/mw_wp_form_chart_page.php:183
|
465 |
+
msgid "Bar chart"
|
466 |
+
msgstr ""
|
467 |
+
|
468 |
+
#: system/mw_wp_form_chart_page.php:196
|
469 |
+
msgid "Separator string (If the check box. If the separator attribute is not set to \",\")"
|
470 |
msgstr ""
|
471 |
|
472 |
#: system/mw_wp_form_contact_data_page.php:53
|
473 |
+
msgid "Not supported"
|
474 |
msgstr ""
|
475 |
|
476 |
#: system/mw_wp_form_contact_data_page.php:54
|
477 |
+
msgid "Reservation"
|
478 |
+
msgstr ""
|
479 |
+
|
480 |
+
#: system/mw_wp_form_contact_data_page.php:55
|
481 |
msgid "Supported"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: system/mw_wp_form_contact_data_page.php:117
|
485 |
msgid "Edit "
|
486 |
msgstr ""
|
487 |
|
488 |
+
#: system/mw_wp_form_contact_data_page.php:118
|
489 |
msgid "View"
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: system/mw_wp_form_contact_data_page.php:119
|
493 |
msgid "Search"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: system/mw_wp_form_contact_data_page.php:120
|
497 |
msgid "No data found"
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: system/mw_wp_form_contact_data_page.php:121
|
501 |
msgid "No data found in Trash"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: system/mw_wp_form_contact_data_page.php:165
|
505 |
msgid "CSV Download"
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: system/mw_wp_form_contact_data_page.php:195
|
509 |
+
#: system/mw_wp_form_contact_data_page.php:227
|
510 |
+
#: system/mw_wp_form_contact_data_page.php:310
|
511 |
+
#: system/mw_wp_form_contact_data_page.php:407
|
512 |
msgid "Response Status"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: system/mw_wp_form_contact_data_page.php:218
|
516 |
+
#: system/mw_wp_form_contact_data_page.php:229
|
517 |
+
#: system/mw_wp_form_contact_data_page.php:419
|
518 |
msgid "Memo"
|
519 |
msgstr ""
|
520 |
|
521 |
+
#: system/mw_wp_form_contact_data_page.php:285
|
522 |
msgid "Custom Fields"
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: system/mw_wp_form_contact_data_page.php:309
|
526 |
msgid "Registed Date"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: system/mw_wp_form_contact_data_page.php:465
|
|
|
530 |
#: system/mw_wp_form_contact_data_page.php:466
|
531 |
+
#: system/mw_wp_form_contact_data_page.php:480
|
532 |
msgid "Inquiry data"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: system/mw_wp_form_contact_data_page.php:482
|
536 |
msgid "You can see the inquiry data that are saved in the database by clicking on the link below."
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: system/mw_wp_form_contact_data_page.php:486
|
540 |
msgid "Form title"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: system/mw_wp_form_contact_data_page.php:487
|
544 |
+
#: system/mw_wp_form_contact_data_page.php:497
|
545 |
+
msgid "Display Chart"
|
546 |
+
msgstr ""
|
547 |
+
|
548 |
+
#: system/mw_wp_form_contact_data_page.php:488
|
549 |
msgid "The number of inquiries"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: system/mw_wp_form_contact_data_page.php:489
|
553 |
msgid "Updated date"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: system/mw_wp_form_contact_data_page.php:490
|
557 |
msgid "Created date"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: system/mw_wp_form_contact_data_page.php:498
|
561 |
msgid "cases"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: system/mw_wp_form_contact_data_page.php:520
|
565 |
msgid "« Back to the list"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: system/mw_wp_form_file.php:180
|
569 |
msgid "Uploaded from "
|
570 |
msgstr ""
|
571 |
|
593 |
msgid "The number of characters is invalid."
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: validation_rules/mw_validation_rule_between.php:73
|
597 |
msgid "The range of the number of characters"
|
598 |
msgstr ""
|
599 |
|
609 |
msgid "This is not in agreement."
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: validation_rules/mw_validation_rule_eq.php:54
|
613 |
msgid "The key at same value"
|
614 |
msgstr ""
|
615 |
|
617 |
msgid "This file size is too big."
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: validation_rules/mw_validation_rule_filesize.php:56
|
621 |
msgid "Permitted file size"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: validation_rules/mw_validation_rule_filesize.php:57
|
625 |
msgid "bytes"
|
626 |
msgstr ""
|
627 |
|
629 |
msgid "This file is invalid."
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: validation_rules/mw_validation_rule_filetype.php:59
|
633 |
msgid "Permitted Extension"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: validation_rules/mw_validation_rule_filetype.php:60
|
637 |
msgid "Example:jpg or jpg,txt,…"
|
638 |
msgstr ""
|
639 |
|
669 |
msgid "The number of characters is a few."
|
670 |
msgstr ""
|
671 |
|
672 |
+
#: validation_rules/mw_validation_rule_minlength.php:54
|
673 |
msgid "The number of the minimum characters"
|
674 |
msgstr ""
|
675 |
|
mw-wp-form.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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: 1.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
@@ -102,6 +102,7 @@ class mw_wp_form {
|
|
102 |
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_data.php' );
|
103 |
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_validation_rule.php' );
|
104 |
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_form_field.php' );
|
|
|
105 |
}
|
106 |
|
107 |
/**
|
@@ -114,6 +115,7 @@ class mw_wp_form {
|
|
114 |
// 管理画面の実行
|
115 |
$this->MW_WP_Form_Admin_Page = new MW_WP_Form_Admin_Page();
|
116 |
$MW_WP_Form_Contact_Data_Page = new MW_WP_Form_Contact_Data_Page();
|
|
|
117 |
add_action( 'init', array( $this, 'register_post_type' ) );
|
118 |
|
119 |
// フォームフィールドの読み込み、インスタンス化
|
@@ -208,6 +210,7 @@ class mw_wp_form {
|
|
208 |
|
209 |
if ( empty( $data_post_ids ) ) return;
|
210 |
foreach ( $data_post_ids as $data_post_id ) {
|
|
|
211 |
$data_posts = get_posts( array(
|
212 |
'post_type' => MWF_Config::DBDATA . $data_post_id,
|
213 |
'posts_per_page' => -1,
|
@@ -221,6 +224,8 @@ class mw_wp_form {
|
|
221 |
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_file.php' );
|
222 |
$File = new MW_WP_Form_File();
|
223 |
$File->removeTempDir();
|
|
|
|
|
224 |
}
|
225 |
|
226 |
/**
|
@@ -702,7 +707,7 @@ class mw_wp_form {
|
|
702 |
/**
|
703 |
* redirect
|
704 |
* 現在のURLと引数で渡されたリダイレクトURLが同じであればリダイレクトしない
|
705 |
-
* @param
|
706 |
*/
|
707 |
private function redirect( $url ) {
|
708 |
$redirect = ( empty( $url ) ) ? $this->get_request_uri() : $url;
|
@@ -853,8 +858,8 @@ class mw_wp_form {
|
|
853 |
/**
|
854 |
* replace_user_property
|
855 |
* ユーザーがログイン中の場合、{ユーザー情報のプロパティ}を置換する。
|
856 |
-
* @param
|
857 |
-
* @return
|
858 |
*/
|
859 |
protected function replace_user_property( $content ) {
|
860 |
$user = wp_get_current_user();
|
@@ -884,8 +889,8 @@ class mw_wp_form {
|
|
884 |
/**
|
885 |
* get_post_property_from_querystring
|
886 |
* 引数 post_id が有効の場合、投稿情報を取得するために preg_replace_callback から呼び出される。
|
887 |
-
* @param
|
888 |
-
* @return
|
889 |
*/
|
890 |
public function get_post_property_from_querystring( $matches ) {
|
891 |
if ( isset( $this->options_by_formkey['querystring'] ) )
|
@@ -909,8 +914,8 @@ class mw_wp_form {
|
|
909 |
/**
|
910 |
* get_post_property_from_this
|
911 |
* 引数 post_id が無効の場合、投稿情報を取得するために preg_replace_callback から呼び出される。
|
912 |
-
* @param
|
913 |
-
* @return
|
914 |
*/
|
915 |
public function get_post_property_from_this( $matches ) {
|
916 |
global $post;
|
@@ -989,7 +994,7 @@ class mw_wp_form {
|
|
989 |
* set_admin_mail_reaquire_params
|
990 |
* 管理者メールに必須の項目を設定
|
991 |
* @param MW_Mail $Mail
|
992 |
-
* @return
|
993 |
*/
|
994 |
private function set_admin_mail_reaquire_params( MW_Mail $Mail ) {
|
995 |
$admin_mail_to = get_bloginfo( 'admin_email' );
|
@@ -1012,7 +1017,7 @@ class mw_wp_form {
|
|
1012 |
* set_reply_mail_reaquire_params
|
1013 |
* 自動返信メールに必須の項目を設定
|
1014 |
* @param MW_Mail $Mail
|
1015 |
-
* @return
|
1016 |
*/
|
1017 |
private function set_reply_mail_reaquire_params( MW_Mail $Mail ) {
|
1018 |
$reply_mail_from = get_bloginfo( 'admin_email' );
|
@@ -1031,7 +1036,7 @@ class mw_wp_form {
|
|
1031 |
* set_admin_mail_raw_params
|
1032 |
* 管理者メールに項目を設定
|
1033 |
* @param MW_Mail $Mail
|
1034 |
-
* @return
|
1035 |
*/
|
1036 |
private function set_admin_mail_raw_params( MW_Mail $Mail ) {
|
1037 |
if ( $this->options_by_formkey ) {
|
@@ -1084,7 +1089,7 @@ class mw_wp_form {
|
|
1084 |
* set_reply_mail_raw_params
|
1085 |
* 自動返信メールに項目を設定
|
1086 |
* @param MW_Mail $Mail
|
1087 |
-
* @return
|
1088 |
*/
|
1089 |
private function set_reply_mail_raw_params( MW_Mail $Mail ) {
|
1090 |
$Mail->to = '';
|
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: 1.9.0
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
102 |
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_data.php' );
|
103 |
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_validation_rule.php' );
|
104 |
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_form_field.php' );
|
105 |
+
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_chart_page.php' );
|
106 |
}
|
107 |
|
108 |
/**
|
115 |
// 管理画面の実行
|
116 |
$this->MW_WP_Form_Admin_Page = new MW_WP_Form_Admin_Page();
|
117 |
$MW_WP_Form_Contact_Data_Page = new MW_WP_Form_Contact_Data_Page();
|
118 |
+
$MW_WP_Form_Chart_Page = new MW_WP_Form_Chart_Page();
|
119 |
add_action( 'init', array( $this, 'register_post_type' ) );
|
120 |
|
121 |
// フォームフィールドの読み込み、インスタンス化
|
210 |
|
211 |
if ( empty( $data_post_ids ) ) return;
|
212 |
foreach ( $data_post_ids as $data_post_id ) {
|
213 |
+
delete_option( MWF_Config::NAME . '-chart-' . $data_post_id );
|
214 |
$data_posts = get_posts( array(
|
215 |
'post_type' => MWF_Config::DBDATA . $data_post_id,
|
216 |
'posts_per_page' => -1,
|
224 |
include_once( plugin_dir_path( __FILE__ ) . 'system/mw_wp_form_file.php' );
|
225 |
$File = new MW_WP_Form_File();
|
226 |
$File->removeTempDir();
|
227 |
+
|
228 |
+
delete_option( MWF_Config::NAME );
|
229 |
}
|
230 |
|
231 |
/**
|
707 |
/**
|
708 |
* redirect
|
709 |
* 現在のURLと引数で渡されたリダイレクトURLが同じであればリダイレクトしない
|
710 |
+
* @param string リダイレクトURL
|
711 |
*/
|
712 |
private function redirect( $url ) {
|
713 |
$redirect = ( empty( $url ) ) ? $this->get_request_uri() : $url;
|
858 |
/**
|
859 |
* replace_user_property
|
860 |
* ユーザーがログイン中の場合、{ユーザー情報のプロパティ}を置換する。
|
861 |
+
* @param string フォーム内容
|
862 |
+
* @return string フォーム内容
|
863 |
*/
|
864 |
protected function replace_user_property( $content ) {
|
865 |
$user = wp_get_current_user();
|
889 |
/**
|
890 |
* get_post_property_from_querystring
|
891 |
* 引数 post_id が有効の場合、投稿情報を取得するために preg_replace_callback から呼び出される。
|
892 |
+
* @param array $matches
|
893 |
+
* @return string
|
894 |
*/
|
895 |
public function get_post_property_from_querystring( $matches ) {
|
896 |
if ( isset( $this->options_by_formkey['querystring'] ) )
|
914 |
/**
|
915 |
* get_post_property_from_this
|
916 |
* 引数 post_id が無効の場合、投稿情報を取得するために preg_replace_callback から呼び出される。
|
917 |
+
* @param array $matches
|
918 |
+
* @return string
|
919 |
*/
|
920 |
public function get_post_property_from_this( $matches ) {
|
921 |
global $post;
|
994 |
* set_admin_mail_reaquire_params
|
995 |
* 管理者メールに必須の項目を設定
|
996 |
* @param MW_Mail $Mail
|
997 |
+
* @return MW_Mail $Mail
|
998 |
*/
|
999 |
private function set_admin_mail_reaquire_params( MW_Mail $Mail ) {
|
1000 |
$admin_mail_to = get_bloginfo( 'admin_email' );
|
1017 |
* set_reply_mail_reaquire_params
|
1018 |
* 自動返信メールに必須の項目を設定
|
1019 |
* @param MW_Mail $Mail
|
1020 |
+
* @return MW_Mail $Mail
|
1021 |
*/
|
1022 |
private function set_reply_mail_reaquire_params( MW_Mail $Mail ) {
|
1023 |
$reply_mail_from = get_bloginfo( 'admin_email' );
|
1036 |
* set_admin_mail_raw_params
|
1037 |
* 管理者メールに項目を設定
|
1038 |
* @param MW_Mail $Mail
|
1039 |
+
* @return MW_Mail $Mail
|
1040 |
*/
|
1041 |
private function set_admin_mail_raw_params( MW_Mail $Mail ) {
|
1042 |
if ( $this->options_by_formkey ) {
|
1089 |
* set_reply_mail_raw_params
|
1090 |
* 自動返信メールに項目を設定
|
1091 |
* @param MW_Mail $Mail
|
1092 |
+
* @return MW_Mail $Mail
|
1093 |
*/
|
1094 |
private function set_reply_mail_raw_params( MW_Mail $Mail ) {
|
1095 |
$Mail->to = '';
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== MW WP Form ===
|
2 |
Contributors: inc2734, ryu263
|
3 |
Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
|
4 |
-
Tags: plugin, form, confirm, preview, shortcode, mail
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -15,9 +15,11 @@ MW WP Form can create mail form with a confirmation screen using shortcode.
|
|
15 |
MW WP Form can create mail form with a confirmation screen using shortcode.
|
16 |
|
17 |
* Form created using shortcodes
|
18 |
-
* Using confirmation page
|
19 |
* The page changes by the same URL or individual URL are possible.
|
20 |
* Many validation rules
|
|
|
|
|
21 |
|
22 |
MW WP Form はショートコードを使って確認画面付きのメールフォームを作成することができるプラグインです。
|
23 |
|
@@ -25,11 +27,18 @@ MW WP Form はショートコードを使って確認画面付きのメールフ
|
|
25 |
* 確認画面が表示可能
|
26 |
* 同一URL・個別URLでの画面変遷が可能
|
27 |
* 豊富なバリデーションルール
|
|
|
|
|
28 |
|
29 |
= Official =
|
30 |
|
31 |
http://plugins.2inc.org/mw-wp-form/
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
= Contributors =
|
34 |
|
35 |
* [Takashi Kitajima](http://2inc.org) ( [inc2734](http://profiles.wordpress.org/inc2734) )
|
@@ -50,10 +59,23 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
50 |
|
51 |
== Screenshots ==
|
52 |
|
53 |
-
1.
|
|
|
|
|
|
|
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
= 1.8.3 =
|
58 |
* Bug fix : Fix bug that file is not uploaded when validation is not set in the file field.
|
59 |
|
1 |
=== MW WP Form ===
|
2 |
Contributors: inc2734, ryu263
|
3 |
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: 3.9.1
|
7 |
+
Stable tag: 1.9.0
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
15 |
MW WP Form can create mail form with a confirmation screen using shortcode.
|
16 |
|
17 |
* Form created using shortcodes
|
18 |
+
* Using confirmation page is possible.
|
19 |
* The page changes by the same URL or individual URL are possible.
|
20 |
* Many validation rules
|
21 |
+
* Saving contact data is possible.
|
22 |
+
* Displaying Chart using saved contact data is possible.
|
23 |
|
24 |
MW WP Form はショートコードを使って確認画面付きのメールフォームを作成することができるプラグインです。
|
25 |
|
27 |
* 確認画面が表示可能
|
28 |
* 同一URL・個別URLでの画面変遷が可能
|
29 |
* 豊富なバリデーションルール
|
30 |
+
* 問い合わせデータを保存可能
|
31 |
+
* 保存した問い合わせデータをグラフ可能
|
32 |
|
33 |
= Official =
|
34 |
|
35 |
http://plugins.2inc.org/mw-wp-form/
|
36 |
|
37 |
+
== The following third-party resources ==
|
38 |
+
|
39 |
+
Google Charts
|
40 |
+
Source: https://developers.google.com/chart/
|
41 |
+
|
42 |
= Contributors =
|
43 |
|
44 |
* [Takashi Kitajima](http://2inc.org) ( [inc2734](http://profiles.wordpress.org/inc2734) )
|
59 |
|
60 |
== Screenshots ==
|
61 |
|
62 |
+
1. Form creation page.
|
63 |
+
2. Form item create box. You can easily insert the form.
|
64 |
+
3. Supports saving inquiry data to database.
|
65 |
+
4. List page of inquiry data that has been saved.
|
66 |
+
5. Supports chart display of saved inquiry data.
|
67 |
|
68 |
== Changelog ==
|
69 |
|
70 |
+
= 1.9.0 =
|
71 |
+
* Added : Add chart function.
|
72 |
+
* Added : Add separator attribute in checkbox tag generator.
|
73 |
+
* Bug fix : Fix bug that can not change display option in saving contact data list page.
|
74 |
+
* Bug fix : Fix bug that display wrong number of inquiries.
|
75 |
+
|
76 |
+
= 1.8.4 =
|
77 |
+
* Bug fix : Fix bug that can not be set maxlength in mwform_text shortcode.
|
78 |
+
|
79 |
= 1.8.3 =
|
80 |
* Bug fix : Fix bug that file is not uploaded when validation is not set in the file field.
|
81 |
|
system/mw_wp_form_admin_page.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Name: MW WP Form Admin Page
|
4 |
* Description: 管理画面クラス
|
5 |
-
* Version: 1.
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : February 21, 2013
|
@@ -205,8 +205,8 @@ class MW_WP_Form_Admin_Page {
|
|
205 |
$post_type = get_post_type();
|
206 |
if ( isset( $_GET['post_type'] ) && MWF_Config::NAME === $_GET['post_type'] || MWF_Config::NAME == $post_type ) {
|
207 |
$url = plugin_dir_url( __FILE__ );
|
208 |
-
wp_register_style( MWF_Config::
|
209 |
-
wp_enqueue_style( MWF_Config::
|
210 |
}
|
211 |
}
|
212 |
|
@@ -217,8 +217,10 @@ class MW_WP_Form_Admin_Page {
|
|
217 |
public function admin_scripts() {
|
218 |
if ( MWF_Config::NAME == get_post_type() ) {
|
219 |
$url = plugin_dir_url( __FILE__ );
|
220 |
-
wp_register_script( MWF_Config::
|
221 |
-
wp_enqueue_script( MWF_Config::
|
|
|
|
|
222 |
wp_enqueue_script( 'jquery-ui-dialog' );
|
223 |
|
224 |
global $wp_scripts;
|
@@ -507,25 +509,27 @@ class MW_WP_Form_Admin_Page {
|
|
507 |
// 空の隠れバリデーションフィールド(コピー元)を挿入
|
508 |
array_unshift( $postdata, $validation_keys );
|
509 |
?>
|
510 |
-
<b
|
511 |
<?php foreach ( $postdata as $key => $value ) : $value = array_merge( $validation_keys, $value ); ?>
|
512 |
-
<div class="
|
513 |
-
<div class="
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
<
|
519 |
-
<
|
520 |
-
|
521 |
-
<?php $
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
|
|
|
|
529 |
<?php
|
530 |
}
|
531 |
|
2 |
/**
|
3 |
* Name: MW WP Form Admin Page
|
4 |
* Description: 管理画面クラス
|
5 |
+
* Version: 1.11.0
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : February 21, 2013
|
205 |
$post_type = get_post_type();
|
206 |
if ( isset( $_GET['post_type'] ) && MWF_Config::NAME === $_GET['post_type'] || MWF_Config::NAME == $post_type ) {
|
207 |
$url = plugin_dir_url( __FILE__ );
|
208 |
+
wp_register_style( MWF_Config::NAME . '-admin', $url . '../css/admin.css' );
|
209 |
+
wp_enqueue_style( MWF_Config::NAME . '-admin' );
|
210 |
}
|
211 |
}
|
212 |
|
217 |
public function admin_scripts() {
|
218 |
if ( MWF_Config::NAME == get_post_type() ) {
|
219 |
$url = plugin_dir_url( __FILE__ );
|
220 |
+
wp_register_script( MWF_Config::NAME . '-repeatable', $url . '../js/mw-wp-form-repeatable.js' );
|
221 |
+
wp_enqueue_script( MWF_Config::NAME . '-repeatable' );
|
222 |
+
wp_register_script( MWF_Config::NAME . '-admin', $url . '../js/admin.js' );
|
223 |
+
wp_enqueue_script( MWF_Config::NAME . '-admin' );
|
224 |
wp_enqueue_script( 'jquery-ui-dialog' );
|
225 |
|
226 |
global $wp_scripts;
|
509 |
// 空の隠れバリデーションフィールド(コピー元)を挿入
|
510 |
array_unshift( $postdata, $validation_keys );
|
511 |
?>
|
512 |
+
<b class="add-btn"><?php esc_html_e( 'Add Validation rule', MWF_Config::DOMAIN ); ?></b>
|
513 |
<?php foreach ( $postdata as $key => $value ) : $value = array_merge( $validation_keys, $value ); ?>
|
514 |
+
<div class="repeatable-boxes">
|
515 |
+
<div class="repeatable-box"<?php if ( $key === 0 ) : ?> style="display:none"<?php endif; ?>>
|
516 |
+
<div class="remove-btn"><b>×</b></div>
|
517 |
+
<div class="open-btn"><span><?php echo esc_attr( $value['target'] ); ?></span><b>▼</b></div>
|
518 |
+
<div class="repeatable-box-content">
|
519 |
+
<?php esc_html_e( 'The key which applies validation', MWF_Config::DOMAIN ); ?>:<input type="text" class="targetKey" value="<?php echo esc_attr( $value['target'] ); ?>" name="<?php echo MWF_Config::NAME; ?>[validation][<?php echo $key; ?>][target]" />
|
520 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
521 |
+
<tr>
|
522 |
+
<td colspan="2">
|
523 |
+
<?php foreach ( $this->validation_rules as $validation_rule => $instance ) : ?>
|
524 |
+
<?php $instance->admin( $key, $value ); ?>
|
525 |
+
<?php endforeach; ?>
|
526 |
+
</td>
|
527 |
+
</tr>
|
528 |
+
</table>
|
529 |
+
<!-- end .repeatable-box-content --></div>
|
530 |
+
<!-- end .repeatable-box --></div>
|
531 |
+
<?php endforeach; ?>
|
532 |
+
<!-- end .repeatable-boxes --></div>
|
533 |
<?php
|
534 |
}
|
535 |
|
system/mw_wp_form_chart_page.php
ADDED
@@ -0,0 +1,337 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Name: MW WP Form Chart Page
|
4 |
+
* Description: グラフ画面クラス
|
5 |
+
* Version: 1.0.0
|
6 |
+
* Author: Takashi Kitajima
|
7 |
+
* Author URI: http://2inc.org
|
8 |
+
* Created : August 30, 2014
|
9 |
+
* Modified:
|
10 |
+
* License: GPLv2
|
11 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
+
*/
|
13 |
+
class MW_WP_Form_Chart_Page {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* formkey
|
17 |
+
*/
|
18 |
+
private $formkey;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* フォームの設定データ
|
22 |
+
*/
|
23 |
+
private $postdata = array();
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Settings API グループ名
|
27 |
+
*/
|
28 |
+
private $option_group;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* __construct
|
32 |
+
*/
|
33 |
+
public function __construct() {
|
34 |
+
add_action( 'admin_menu', array( $this, 'add_menu' ) );
|
35 |
+
add_action( 'admin_init', array( $this, 'register_setting' ) );
|
36 |
+
add_action( 'admin_print_styles', array( $this, 'admin_print_styles' ) );
|
37 |
+
$this->option_group = MWF_Config::NAME . '-' . 'chart-group';
|
38 |
+
if ( !empty( $_GET['formkey'] ) ) {
|
39 |
+
$this->formkey = $_GET['formkey'];
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* admin_print_styles
|
45 |
+
*/
|
46 |
+
public function admin_print_styles() {
|
47 |
+
?>
|
48 |
+
<style>
|
49 |
+
#menu-posts-mw-wp-form .wp-submenu li:last-child {
|
50 |
+
display: none;
|
51 |
+
}
|
52 |
+
</style>
|
53 |
+
<?php
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* add_menu
|
58 |
+
*/
|
59 |
+
public function add_menu() {
|
60 |
+
$submenu_page = add_submenu_page(
|
61 |
+
'edit.php?post_type=' . MWF_Config::NAME,
|
62 |
+
esc_html__( 'Chart', MWF_Config::DOMAIN ),
|
63 |
+
esc_html__( 'Chart', MWF_Config::DOMAIN ),
|
64 |
+
MWF_Config::CAPABILITY,
|
65 |
+
MWF_Config::NAME . '-chart',
|
66 |
+
array( $this, 'display' )
|
67 |
+
);
|
68 |
+
add_action( 'load-' . $submenu_page, array( $this, 'load' ) );
|
69 |
+
}
|
70 |
+
public function load() {
|
71 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts') );
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* admin_enqueue_scripts
|
76 |
+
*/
|
77 |
+
public function admin_enqueue_scripts() {
|
78 |
+
global $wp_scripts;
|
79 |
+
$ui = $wp_scripts->query( 'jquery-ui-core' );
|
80 |
+
wp_enqueue_style( 'jquery.ui', '//ajax.googleapis.com/ajax/libs/jqueryui/' . $ui->ver . '/themes/smoothness/jquery-ui.min.css', array( 'jquery' ), $ui->ver );
|
81 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
82 |
+
|
83 |
+
$url = plugin_dir_url( __FILE__ );
|
84 |
+
|
85 |
+
wp_register_script( 'jsapi', 'https://www.google.com/jsapi' );
|
86 |
+
wp_enqueue_script( 'jsapi' );
|
87 |
+
|
88 |
+
wp_register_script(
|
89 |
+
MWF_Config::NAME . '-repeatable',
|
90 |
+
$url . '../js/mw-wp-form-repeatable.js',
|
91 |
+
array( 'jquery' ),
|
92 |
+
null,
|
93 |
+
true
|
94 |
+
);
|
95 |
+
wp_enqueue_script( MWF_Config::NAME . '-repeatable' );
|
96 |
+
|
97 |
+
wp_register_script(
|
98 |
+
MWF_Config::NAME . '-google-chart',
|
99 |
+
$url . '../js/mw-wp-form-google-chart.js',
|
100 |
+
array( 'jquery' ),
|
101 |
+
null,
|
102 |
+
true
|
103 |
+
);
|
104 |
+
wp_enqueue_script( MWF_Config::NAME . '-google-chart' );
|
105 |
+
|
106 |
+
wp_register_script(
|
107 |
+
MWF_Config::NAME . '-admin-chart',
|
108 |
+
$url . '../js/admin-chart.js',
|
109 |
+
array( 'jquery', 'jquery-ui-sortable' ),
|
110 |
+
null,
|
111 |
+
true
|
112 |
+
);
|
113 |
+
wp_enqueue_script( MWF_Config::NAME . '-admin-chart' );
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* display
|
118 |
+
*/
|
119 |
+
public function display() {
|
120 |
+
if ( !empty( $this->formkey ) ) {
|
121 |
+
$this->formkey = $_GET['formkey'];
|
122 |
+
$form_posts = get_posts( array(
|
123 |
+
'post_type' => $this->formkey,
|
124 |
+
'posts_per_page' => -1,
|
125 |
+
) );
|
126 |
+
} else {
|
127 |
+
exit;
|
128 |
+
}
|
129 |
+
$custom_keys = array();
|
130 |
+
foreach ( $form_posts as $post ) {
|
131 |
+
setup_postdata( $post );
|
132 |
+
$post_custom_keys = get_post_custom_keys( $post->ID );
|
133 |
+
if ( !empty( $post_custom_keys ) && is_array( $post_custom_keys ) ) {
|
134 |
+
foreach ( $post_custom_keys as $post_custom_key ) {
|
135 |
+
if ( preg_match( '/^_/', $post_custom_key ) )
|
136 |
+
continue;
|
137 |
+
$custom_keys[$post_custom_key][get_post_meta( $post->ID, $post_custom_key, true )][] = $post->ID;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
wp_reset_postdata();
|
142 |
+
|
143 |
+
if ( ! $postdata = $this->get_option_data( 'chart' ) ) {
|
144 |
+
$postdata = array();
|
145 |
+
}
|
146 |
+
$default_keys = array(
|
147 |
+
'target' => '',
|
148 |
+
'separator' => '',
|
149 |
+
'chart' => '',
|
150 |
+
);
|
151 |
+
// 空の隠れフィールド(コピー元)を挿入
|
152 |
+
array_unshift( $postdata, $default_keys );
|
153 |
+
?>
|
154 |
+
<div class="wrap">
|
155 |
+
<h2><?php esc_html_e( 'Chart', MWF_Config::DOMAIN ); ?> : <?php echo esc_html( get_the_title( preg_replace( '/^(.+_)(\d+)$/', '$2', $this->formkey ) ) ); ?></h2>
|
156 |
+
<form method="post" action="options.php">
|
157 |
+
<?php
|
158 |
+
settings_fields( $this->option_group );
|
159 |
+
do_settings_sections( $this->option_group );
|
160 |
+
?>
|
161 |
+
<div id="<?php echo esc_attr( MWF_Config::NAME . '_chart' ); ?>" class="postbox">
|
162 |
+
<div class="inside">
|
163 |
+
<b class="add-btn"><?php esc_html_e( 'Add Chart', MWF_Config::DOMAIN ); ?></b>
|
164 |
+
<div class="repeatable-boxes">
|
165 |
+
<?php foreach ( $postdata as $key => $value ) : ?>
|
166 |
+
<div class="repeatable-box"<?php if ( $key === 0 ) : ?> style="display:none"<?php endif; ?>>
|
167 |
+
<div class="remove-btn"><b>×</b></div>
|
168 |
+
<div class="open-btn"><span><?php echo esc_attr( $value['target'] ); ?></span><b>▼</b></div>
|
169 |
+
<div class="repeatable-box-content">
|
170 |
+
<?php esc_html_e( 'Item that create chart', MWF_Config::DOMAIN ); ?>
|
171 |
+
<select class="targetKey" name="<?php echo esc_attr( sprintf( '%s-chart-%s[chart][%s][target]', MWF_Config::NAME, $this->formkey, $key ) ); ?>">
|
172 |
+
<option value=""><?php esc_html_e( 'Select this.', MWF_Config::DOMAIN ); ?></option>
|
173 |
+
<?php foreach ( $custom_keys as $custom_key_name => $custom_key_value ) : ?>
|
174 |
+
<option value="<?php echo esc_attr( $custom_key_name ); ?>" <?php selected( $value['target'], $custom_key_name ); ?>><?php echo esc_html( $custom_key_name ); ?></option>
|
175 |
+
<?php endforeach; ?>
|
176 |
+
</select>
|
177 |
+
<br />
|
178 |
+
<?php esc_html_e( 'Chart type', MWF_Config::DOMAIN ); ?>
|
179 |
+
<select name="<?php echo esc_attr( sprintf( '%s-chart-%s[chart][%s][chart]', MWF_Config::NAME, $this->formkey, $key ) ); ?>">
|
180 |
+
<?php
|
181 |
+
$chart_options = array(
|
182 |
+
'pie' => esc_html__( 'Pie chart', MWF_Config::DOMAIN ),
|
183 |
+
'bar' => esc_html__( 'Bar chart', MWF_Config::DOMAIN ),
|
184 |
+
);
|
185 |
+
foreach ( $chart_options as $chart_option_key => $chart_option ) {
|
186 |
+
printf(
|
187 |
+
'<option value="%s" %s>%s</option>',
|
188 |
+
esc_attr( $chart_option_key ),
|
189 |
+
selected( $value['chart'], $chart_option_key, false ),
|
190 |
+
esc_html( $chart_option )
|
191 |
+
);
|
192 |
+
}
|
193 |
+
?>
|
194 |
+
</select>
|
195 |
+
<br />
|
196 |
+
<?php esc_html_e( 'Separator string (If the check box. If the separator attribute is not set to ",")', MWF_Config::DOMAIN ); ?>
|
197 |
+
<input type="text" name="<?php echo esc_attr( sprintf( '%s-chart-%s[chart][%s][separator]', MWF_Config::NAME, $this->formkey, $key ) ); ?>" value="<?php echo esc_attr( $value['separator'] ); ?>" size="5" />
|
198 |
+
<!-- end .repeatable-box-content --></div>
|
199 |
+
<!-- end .repeatable-box --></div>
|
200 |
+
<?php endforeach; ?>
|
201 |
+
<!-- end .repeatable-boxes --></div>
|
202 |
+
<input type="hidden" name="<?php echo esc_attr( sprintf( '%s-formkey', MWF_Config::NAME ) ); ?>" value="<?php echo esc_attr( $this->formkey ); ?>" />
|
203 |
+
<?php submit_button(); ?>
|
204 |
+
<!-- end .inside --></div>
|
205 |
+
<!-- end #mw-wp-form_chart --></div>
|
206 |
+
</form>
|
207 |
+
|
208 |
+
<?php
|
209 |
+
foreach ( $postdata as $postdata_key => $chart ) {
|
210 |
+
if ( !isset( $custom_keys[$chart['target']] ) ) {
|
211 |
+
unset( $postdata[$postdata_key] );
|
212 |
+
continue;
|
213 |
+
}
|
214 |
+
printf(
|
215 |
+
'<h3>%s <span style="font-weight:normal;font-size:14px">( %s: %d )</span></h3><div class="%s" style="width: 100%%; max-width: 800px"></div>',
|
216 |
+
esc_html( $chart['target'] ),
|
217 |
+
esc_html__( 'The number of inquiries', MWF_Config::DOMAIN ),
|
218 |
+
count( $form_posts ),
|
219 |
+
esc_attr( MWF_Config::NAME . '-chart-div-' . $postdata_key )
|
220 |
+
);
|
221 |
+
}
|
222 |
+
|
223 |
+
$chart_data = array();
|
224 |
+
foreach ( $postdata as $postdata_key => $chart ) {
|
225 |
+
$data = array();
|
226 |
+
$raw_data = array();
|
227 |
+
foreach ( $custom_keys[$chart['target']] as $item => $values ) {
|
228 |
+
if ( $chart['separator'] && strstr( $item, $chart['separator'] ) ) {
|
229 |
+
$item = explode( $chart['separator'] , $item );
|
230 |
+
}
|
231 |
+
if ( is_array( $item ) ) {
|
232 |
+
foreach ( $item as $_item ) {
|
233 |
+
if ( $_item === '' ) {
|
234 |
+
$_item = '(Empty)';
|
235 |
+
}
|
236 |
+
if ( empty( $raw_data[$_item] ) ) {
|
237 |
+
$raw_data[$_item] = count( $values );
|
238 |
+
} else {
|
239 |
+
$raw_data[$_item] += count( $values );
|
240 |
+
}
|
241 |
+
}
|
242 |
+
} else {
|
243 |
+
if ( $item === '' ) {
|
244 |
+
$item = '(Empty)';
|
245 |
+
}
|
246 |
+
if ( empty( $raw_data[$item] ) ) {
|
247 |
+
$raw_data[$item] = count( $values );
|
248 |
+
} else {
|
249 |
+
$raw_data[$item] += count( $values );
|
250 |
+
}
|
251 |
+
}
|
252 |
+
}
|
253 |
+
$data[] = array( '', '' );
|
254 |
+
foreach ( $raw_data as $raw_data_key => $raw_data_value ) {
|
255 |
+
if ( $chart['chart'] === 'bar' ) {
|
256 |
+
$value = $raw_data_value / count( $form_posts );
|
257 |
+
} else {
|
258 |
+
$value = $raw_data_value;
|
259 |
+
}
|
260 |
+
$data[] = array(
|
261 |
+
$raw_data_key,
|
262 |
+
$value,
|
263 |
+
);
|
264 |
+
}
|
265 |
+
$chart_data[$postdata_key] = array(
|
266 |
+
'chart' => $chart['chart'],
|
267 |
+
'data' => $data,
|
268 |
+
);
|
269 |
+
}
|
270 |
+
?>
|
271 |
+
<script>
|
272 |
+
google.load( 'visualization', 1, { packages:['corechart'] } );
|
273 |
+
google.setOnLoadCallback( mwformDrawCharts );
|
274 |
+
function mwformDrawCharts() {
|
275 |
+
jQuery( function( $ ) {
|
276 |
+
<?php foreach ( $chart_data as $postdata_key => $chart ) : ?>
|
277 |
+
$( '.<?php echo esc_js( MWF_Config::NAME . '-chart-div-' . $postdata_key ); ?>' )
|
278 |
+
.mw_wp_form_google_chart( {
|
279 |
+
chart: <?php echo json_encode( $chart['chart'] ); ?>,
|
280 |
+
data : <?php echo json_encode( $chart['data'] ); ?>
|
281 |
+
} );
|
282 |
+
<?php endforeach; ?>
|
283 |
+
} );
|
284 |
+
}
|
285 |
+
</script>
|
286 |
+
<!-- end .wrap --></div>
|
287 |
+
<?php
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* register_setting
|
292 |
+
*/
|
293 |
+
public function register_setting() {
|
294 |
+
if ( !empty( $this->formkey ) ) {
|
295 |
+
$formkey = $this->formkey;
|
296 |
+
} elseif ( !empty( $_POST[MWF_Config::NAME . '-formkey'] ) ) {
|
297 |
+
$formkey = $_POST[MWF_Config::NAME . '-formkey'];
|
298 |
+
}
|
299 |
+
if ( !empty( $formkey ) ) {
|
300 |
+
register_setting(
|
301 |
+
$this->option_group,
|
302 |
+
MWF_Config::NAME . '-chart-' . $formkey,
|
303 |
+
array( $this, 'sanitize' )
|
304 |
+
);
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* sanitize
|
310 |
+
* @param array $input フォームから送信されたデータ
|
311 |
+
* @return array
|
312 |
+
*/
|
313 |
+
public function sanitize( $input ) {
|
314 |
+
$new_input = array();
|
315 |
+
if ( is_array( $input ) && isset( $input['chart'] ) && is_array( $input['chart'] ) ) {
|
316 |
+
foreach ( $input['chart'] as $key => $value ) {
|
317 |
+
if ( !empty( $value['target'] ) ) {
|
318 |
+
$new_input['chart'][$key] = $value;
|
319 |
+
}
|
320 |
+
}
|
321 |
+
}
|
322 |
+
return $new_input;
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* get_option_data
|
327 |
+
* フォームの設定データを返す
|
328 |
+
* @param string $key 設定データのキー
|
329 |
+
* @return mixed 設定データ
|
330 |
+
*/
|
331 |
+
protected function get_option_data( $key ) {
|
332 |
+
$option = get_option( MWF_Config::NAME . '-chart-' . $this->formkey );
|
333 |
+
if ( is_array( $option ) && isset( $option[$key] ) ) {
|
334 |
+
return $option[$key];
|
335 |
+
}
|
336 |
+
}
|
337 |
+
}
|
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,7 @@ 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 |
<?php wp_nonce_field( MWF_Config::NAME ); ?>
|
167 |
</form>
|
168 |
<?php
|
@@ -179,8 +180,10 @@ class MW_WP_Form_Contact_Data_Page {
|
|
179 |
|
180 |
$post_type = $_GET['post_type'];
|
181 |
|
182 |
-
if ( in_array( $post_type, $this->form_post_type ) &&
|
183 |
-
|
|
|
|
|
184 |
|
185 |
$posts_mwf = get_posts( array(
|
186 |
'post_type' => $post_type,
|
@@ -484,6 +487,7 @@ class MW_WP_Form_Contact_Data_Page {
|
|
484 |
<table class="wp-list-table widefat fixed" cellspacing="0">
|
485 |
<thead>
|
486 |
<th class="<?php echo MWF_Config::NAME; ?>-table-title"><?php esc_html_e( 'Form title', MWF_Config::DOMAIN ); ?></th>
|
|
|
487 |
<th class="<?php echo MWF_Config::NAME; ?>-table-count"><?php esc_html_e( 'The number of inquiries', MWF_Config::DOMAIN ); ?></th>
|
488 |
<th class="<?php echo MWF_Config::NAME; ?>-table-date"><?php esc_html_e( 'Updated date', MWF_Config::DOMAIN ); ?></th>
|
489 |
<th class="<?php echo MWF_Config::NAME; ?>-table-date"><?php esc_html_e( 'Created date', MWF_Config::DOMAIN ); ?></th>
|
@@ -493,7 +497,8 @@ class MW_WP_Form_Contact_Data_Page {
|
|
493 |
<?php $post_type_object = get_post_type_object( $post_type ); ?>
|
494 |
<tr <?php if ( $i % 2 == 1 ) echo 'class="alternate"'; ?>>
|
495 |
<td class="<?php echo MWF_Config::NAME; ?>-table-title"><?php echo esc_html( $post_type_object->labels->singular_name ) ; ?></td>
|
496 |
-
<td class="<?php echo MWF_Config::NAME; ?>-table-
|
|
|
497 |
<td class="<?php echo MWF_Config::NAME; ?>-table-date"><?php echo esc_html( $this->get_modified_datetime( $post_type ) ); ?></td>
|
498 |
<td class="<?php echo MWF_Config::NAME; ?>-table-date"><?php echo esc_html( $this->get_created_datetime( $post_type ) ); ?></td>
|
499 |
</tr>
|
@@ -528,11 +533,11 @@ class MW_WP_Form_Contact_Data_Page {
|
|
528 |
*/
|
529 |
private function get_count( $post_type ) {
|
530 |
global $wpdb;
|
531 |
-
$
|
532 |
-
|
533 |
-
|
534 |
-
);
|
535 |
-
return
|
536 |
}
|
537 |
|
538 |
/**
|
2 |
/**
|
3 |
* Name: MW WP Form Contact Data Page
|
4 |
* Description: DB保存データを扱うクラス
|
5 |
+
* Version: 1.2.1
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
+
* Modified: September 1, 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 |
+
<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>
|
169 |
<?php
|
180 |
|
181 |
$post_type = $_GET['post_type'];
|
182 |
|
183 |
+
if ( in_array( $post_type, $this->form_post_type ) &&
|
184 |
+
!empty( $_POST ) &&
|
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' => $post_type,
|
487 |
<table class="wp-list-table widefat fixed" cellspacing="0">
|
488 |
<thead>
|
489 |
<th class="<?php echo MWF_Config::NAME; ?>-table-title"><?php esc_html_e( 'Form title', MWF_Config::DOMAIN ); ?></th>
|
490 |
+
<th class="<?php echo MWF_Config::NAME; ?>-table-chart"><?php esc_html_e( 'Display Chart', MWF_Config::DOMAIN ); ?></th>
|
491 |
<th class="<?php echo MWF_Config::NAME; ?>-table-count"><?php esc_html_e( 'The number of inquiries', MWF_Config::DOMAIN ); ?></th>
|
492 |
<th class="<?php echo MWF_Config::NAME; ?>-table-date"><?php esc_html_e( 'Updated date', MWF_Config::DOMAIN ); ?></th>
|
493 |
<th class="<?php echo MWF_Config::NAME; ?>-table-date"><?php esc_html_e( 'Created date', MWF_Config::DOMAIN ); ?></th>
|
497 |
<?php $post_type_object = get_post_type_object( $post_type ); ?>
|
498 |
<tr <?php if ( $i % 2 == 1 ) echo 'class="alternate"'; ?>>
|
499 |
<td class="<?php echo MWF_Config::NAME; ?>-table-title"><?php echo esc_html( $post_type_object->labels->singular_name ) ; ?></td>
|
500 |
+
<td class="<?php echo MWF_Config::NAME; ?>-table-chart"><a href="<?php echo admin_url( 'edit.php?post_type=' . MWF_Config::NAME . '&page=' . MWF_Config::NAME . '-chart&formkey=' . $post_type ); ?>"><?php esc_html_e( 'Display Chart', MWF_Config::DOMAIN ); ?></td>
|
501 |
+
<td class="<?php echo MWF_Config::NAME; ?>-table-count"><a href="<?php echo admin_url( 'edit.php?post_type=' . $post_type ); ?>"><?php echo esc_html( $this->get_count( $post_type ) ) ?> <?php esc_html_e( 'cases', MWF_Config::DOMAIN ); ?></a></td>
|
502 |
<td class="<?php echo MWF_Config::NAME; ?>-table-date"><?php echo esc_html( $this->get_modified_datetime( $post_type ) ); ?></td>
|
503 |
<td class="<?php echo MWF_Config::NAME; ?>-table-date"><?php echo esc_html( $this->get_created_datetime( $post_type ) ); ?></td>
|
504 |
</tr>
|
533 |
*/
|
534 |
private function get_count( $post_type ) {
|
535 |
global $wpdb;
|
536 |
+
$posts_contact = get_posts( array(
|
537 |
+
'post_type' => $post_type,
|
538 |
+
'posts_per_page' => -1,
|
539 |
+
) );
|
540 |
+
return count( $posts_contact );
|
541 |
}
|
542 |
|
543 |
/**
|
system/mw_wp_form_file.php
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
/**
|
3 |
* Name: MW WP Form File
|
4 |
* Description: Tempディレクトリ、ファイルアップロードの処理を行うクラス
|
5 |
-
* Version: 1.0.
|
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 |
*/
|
@@ -34,7 +34,7 @@ class MW_WP_Form_File {
|
|
34 |
* checkFileType
|
35 |
* @param string $filepath アップロードされたファイルのパス
|
36 |
* @param string $filename ファイル名(未アップロード時の$_FILEの検査の場合、temp_nameは乱数になっているため)
|
37 |
-
* @return
|
38 |
*/
|
39 |
protected function checkFileType( $filepath, $filename = '' ) {
|
40 |
// WordPress( get_allowed_mime_types ) で許可されたファイルタイプ限定
|
@@ -134,7 +134,7 @@ class MW_WP_Form_File {
|
|
134 |
* _fileUpload
|
135 |
* ファイルアップロードの実処理。
|
136 |
* @param arary $file $_FILES['hoge'] の配列
|
137 |
-
* @return アップロードしたファイルの URL
|
138 |
*/
|
139 |
protected function _fileUpload( $file ) {
|
140 |
if ( empty( $file['tmp_name'] ) )
|
@@ -196,8 +196,8 @@ class MW_WP_Form_File {
|
|
196 |
/**
|
197 |
* setUploadFileName
|
198 |
* 一時ファイル名を生成。Tempディレクトリの生成に失敗していた場合はUploadディレクトリを使用
|
199 |
-
* @param
|
200 |
-
* @return
|
201 |
*/
|
202 |
protected function setUploadFileName( $extension ) {
|
203 |
$count = 0;
|
@@ -225,7 +225,7 @@ class MW_WP_Form_File {
|
|
225 |
/**
|
226 |
* getTempDir
|
227 |
* Tempディレクトリ名(パス、URL)を返す。ディレクトリの存在可否は関係なし
|
228 |
-
* @return
|
229 |
*/
|
230 |
protected function getTempDir() {
|
231 |
$wp_upload_dir = wp_upload_dir();
|
@@ -238,7 +238,7 @@ class MW_WP_Form_File {
|
|
238 |
/**
|
239 |
* createTempDir
|
240 |
* Tempディレクトリを作成
|
241 |
-
* @return
|
242 |
*/
|
243 |
protected function createTempDir() {
|
244 |
$_ret = false;
|
@@ -255,6 +255,7 @@ class MW_WP_Form_File {
|
|
255 |
/**
|
256 |
* removeTempDir
|
257 |
* Tempディレクトリを削除
|
|
|
258 |
*/
|
259 |
public function removeTempDir( $sub_dir = '' ) {
|
260 |
$temp_dir = $this->getTempDir();
|
2 |
/**
|
3 |
* Name: MW WP Form File
|
4 |
* Description: Tempディレクトリ、ファイルアップロードの処理を行うクラス
|
5 |
+
* Version: 1.0.7
|
6 |
* Author: Takashi Kitajima
|
7 |
* Author URI: http://2inc.org
|
8 |
* Created : October 10, 2013
|
9 |
+
* Modified: September 1, 2014
|
10 |
* License: GPLv2
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
*/
|
34 |
* checkFileType
|
35 |
* @param string $filepath アップロードされたファイルのパス
|
36 |
* @param string $filename ファイル名(未アップロード時の$_FILEの検査の場合、temp_nameは乱数になっているため)
|
37 |
+
* @return bool
|
38 |
*/
|
39 |
protected function checkFileType( $filepath, $filename = '' ) {
|
40 |
// WordPress( get_allowed_mime_types ) で許可されたファイルタイプ限定
|
134 |
* _fileUpload
|
135 |
* ファイルアップロードの実処理。
|
136 |
* @param arary $file $_FILES['hoge'] の配列
|
137 |
+
* @return string アップロードしたファイルの URL
|
138 |
*/
|
139 |
protected function _fileUpload( $file ) {
|
140 |
if ( empty( $file['tmp_name'] ) )
|
196 |
/**
|
197 |
* setUploadFileName
|
198 |
* 一時ファイル名を生成。Tempディレクトリの生成に失敗していた場合はUploadディレクトリを使用
|
199 |
+
* @param string 拡張子 ( ex: jpg )
|
200 |
+
* @return array ( file =>, url => )
|
201 |
*/
|
202 |
protected function setUploadFileName( $extension ) {
|
203 |
$count = 0;
|
225 |
/**
|
226 |
* getTempDir
|
227 |
* Tempディレクトリ名(パス、URL)を返す。ディレクトリの存在可否は関係なし
|
228 |
+
* @return array ( dir => Tempディレクトリのパス, url => Tempディレクトリのurl )
|
229 |
*/
|
230 |
protected function getTempDir() {
|
231 |
$wp_upload_dir = wp_upload_dir();
|
238 |
/**
|
239 |
* createTempDir
|
240 |
* Tempディレクトリを作成
|
241 |
+
* @return bool
|
242 |
*/
|
243 |
protected function createTempDir() {
|
244 |
$_ret = false;
|
255 |
/**
|
256 |
* removeTempDir
|
257 |
* Tempディレクトリを削除
|
258 |
+
* @param string $sub_dir サブディレクトリ名
|
259 |
*/
|
260 |
public function removeTempDir( $sub_dir = '' ) {
|
261 |
$temp_dir = $this->getTempDir();
|