Version Description
- Bug fix : Fix Selected file reset button bug in Firefox.
- Changed : Change file field's default size attribute.
Download this release
Release Info
Developer | inc2734 |
Plugin | MW WP Form |
Version | 1.5.6 |
Comparing to | |
See all releases |
Code changes from version 1.5.5 to 1.5.6
- css/style.css +1 -1
- form_fields/mw_form_field_file.php +3 -3
- form_fields/mw_form_field_image.php +3 -3
- js/form.js +19 -8
- mw-wp-form.php +2 -2
- readme.txt +7 -3
- system/mw_form.php +3 -3
css/style.css
CHANGED
@@ -23,5 +23,5 @@
|
|
23 |
|
24 |
.mwform-file-delete {
|
25 |
cursor: pointer;
|
26 |
-
|
27 |
}
|
23 |
|
24 |
.mwform-file-delete {
|
25 |
cursor: pointer;
|
26 |
+
visibility: hidden;
|
27 |
}
|
form_fields/mw_form_field_file.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Name: MW Form Field File
|
4 |
* URI: http://2inc.org
|
5 |
* Description: 画像アップロードフィールドを出力。
|
6 |
-
* Version: 1.4.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : May 17, 2013
|
10 |
-
* Modified: April
|
11 |
* License: GPL2
|
12 |
*
|
13 |
* Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
|
@@ -48,7 +48,7 @@ class mw_form_field_file extends mw_form_field {
|
|
48 |
return array(
|
49 |
'name' => '',
|
50 |
'id' => '',
|
51 |
-
'size' =>
|
52 |
'show_error' => 'true',
|
53 |
);
|
54 |
}
|
3 |
* Name: MW Form Field File
|
4 |
* URI: http://2inc.org
|
5 |
* Description: 画像アップロードフィールドを出力。
|
6 |
+
* Version: 1.4.1
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : May 17, 2013
|
10 |
+
* Modified: April 19, 2014
|
11 |
* License: GPL2
|
12 |
*
|
13 |
* Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
|
48 |
return array(
|
49 |
'name' => '',
|
50 |
'id' => '',
|
51 |
+
'size' => 20,
|
52 |
'show_error' => 'true',
|
53 |
);
|
54 |
}
|
form_fields/mw_form_field_image.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Name: MW Form Field Image
|
4 |
* URI: http://2inc.org
|
5 |
* Description: 画像アップロードフィールドを出力。
|
6 |
-
* Version: 1.4.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : May 17, 2013
|
10 |
-
* Modified: April
|
11 |
* License: GPL2
|
12 |
*
|
13 |
* Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
|
@@ -48,7 +48,7 @@ class mw_form_field_image extends mw_form_field {
|
|
48 |
return array(
|
49 |
'name' => '',
|
50 |
'id' => '',
|
51 |
-
'size' =>
|
52 |
'show_error' => 'true',
|
53 |
);
|
54 |
}
|
3 |
* Name: MW Form Field Image
|
4 |
* URI: http://2inc.org
|
5 |
* Description: 画像アップロードフィールドを出力。
|
6 |
+
* Version: 1.4.1
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : May 17, 2013
|
10 |
+
* Modified: April 19, 2014
|
11 |
* License: GPL2
|
12 |
*
|
13 |
* Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
|
48 |
return array(
|
49 |
'name' => '',
|
50 |
'id' => '',
|
51 |
+
'size' => '20',
|
52 |
'show_error' => 'true',
|
53 |
);
|
54 |
}
|
js/form.js
CHANGED
@@ -9,15 +9,26 @@ jQuery( function( $ ) {
|
|
9 |
} );
|
10 |
|
11 |
var file_delete = $( '.mw_wp_form .mwform-file-delete' );
|
12 |
-
|
13 |
-
var
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
} );
|
16 |
-
|
17 |
-
$( this ).
|
18 |
-
|
19 |
-
var field = $( 'input[type="file"][name="' + target + '"]' );
|
20 |
-
field.replaceWith( field.clone( true ) );
|
21 |
} );
|
22 |
|
23 |
} );
|
9 |
} );
|
10 |
|
11 |
var file_delete = $( '.mw_wp_form .mwform-file-delete' );
|
12 |
+
file_delete.each( function( i, e ) {
|
13 |
+
var target = $( e ).data( 'mwform-file-delete' );
|
14 |
+
var hidden_field = $( 'input[type="hidden"][name="' + target + '"]' );
|
15 |
+
if ( hidden_field.val() ) {
|
16 |
+
$( e ).css( 'visibility', 'visible' );
|
17 |
+
}
|
18 |
+
$( e ).click( function() {
|
19 |
+
var file_field = $( 'input[type="file"][name="' + target + '"]' );
|
20 |
+
var new_field = $( file_field[0].outerHTML );
|
21 |
+
$( this ).css( 'visibility', 'hidden' );
|
22 |
+
file_field.replaceWith( new_field );
|
23 |
+
|
24 |
+
var img = $( 'img[src="' + hidden_field.val() + '"]' );
|
25 |
+
hidden_field.remove();
|
26 |
+
img.remove();
|
27 |
+
} );
|
28 |
} );
|
29 |
+
$( document ).on( 'change', '.mw_wp_form input[type="file"]', function() {
|
30 |
+
var name = $( this ).attr( 'name' );
|
31 |
+
file_delete.closest( '[data-mwform-file-delete="' + name + '"]' ).css( 'visibility', 'visible' );
|
|
|
|
|
32 |
} );
|
33 |
|
34 |
} );
|
mw-wp-form.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin Name: MW WP Form
|
4 |
* Plugin URI: http://plugins.2inc.org/mw-wp-form/
|
5 |
* Description: MW WP Form can create mail form with a confirmation screen.
|
6 |
-
* Version: 1.5.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
-
* Modified: April
|
11 |
* Text Domain: mw-wp-form
|
12 |
* Domain Path: /languages/
|
13 |
* License: GPL2
|
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.5.6
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: April 19, 2014
|
11 |
* Text Domain: mw-wp-form
|
12 |
* Domain Path: /languages/
|
13 |
* License: GPL2
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
|
|
4 |
Tags: plugin, form, confirm, preview, shortcode, mail
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 3.9.0
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -54,11 +54,15 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
|
|
57 |
= 1.5.5 =
|
58 |
* Added : Selected file reset button has been added.
|
59 |
|
60 |
= 1.5.4 =
|
61 |
-
* Bug fix :
|
62 |
* Added : Convert full-pitch character to half character in text shortcode.
|
63 |
|
64 |
= 1.5.3 =
|
@@ -79,7 +83,7 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
|
|
79 |
* Deprecated: Deprecated mw_form_field::set_qtags()
|
80 |
|
81 |
= 1.4.1 =
|
82 |
-
* Changed :
|
83 |
* Bug fix : Fix tel validation.
|
84 |
|
85 |
= 1.4.0 =
|
4 |
Tags: plugin, form, confirm, preview, shortcode, mail
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 3.9.0
|
7 |
+
Stable tag: 1.5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
54 |
|
55 |
== Changelog ==
|
56 |
|
57 |
+
= 1.5.6 =
|
58 |
+
* Bug fix : Fix Selected file reset button bug in Firefox.
|
59 |
+
* Changed : Change file field's default size attribute.
|
60 |
+
|
61 |
= 1.5.5 =
|
62 |
* Added : Selected file reset button has been added.
|
63 |
|
64 |
= 1.5.4 =
|
65 |
+
* Bug fix : Fix spelling mistake in admin page.
|
66 |
* Added : Convert full-pitch character to half character in text shortcode.
|
67 |
|
68 |
= 1.5.3 =
|
83 |
* Deprecated: Deprecated mw_form_field::set_qtags()
|
84 |
|
85 |
= 1.4.1 =
|
86 |
+
* Changed : Change flow to read saving inquiry data.
|
87 |
* Bug fix : Fix tel validation.
|
88 |
|
89 |
= 1.4.0 =
|
system/mw_form.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Name: MW Form
|
4 |
* URI: http://2inc.org
|
5 |
* Description: フォームクラス
|
6 |
-
* Version: 1.3.
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
-
* Modified: April
|
11 |
* License: GPL2
|
12 |
*
|
13 |
* Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
|
@@ -741,7 +741,7 @@ class MW_Form {
|
|
741 |
public function file( $name, $options = array() ) {
|
742 |
$defaults = array(
|
743 |
'id' => '',
|
744 |
-
'size' =>
|
745 |
);
|
746 |
$id = $this->get_attr_id( $options['id'] );
|
747 |
$options = array_merge( $defaults, $options );
|
3 |
* Name: MW Form
|
4 |
* URI: http://2inc.org
|
5 |
* Description: フォームクラス
|
6 |
+
* Version: 1.3.13
|
7 |
* Author: Takashi Kitajima
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created : September 25, 2012
|
10 |
+
* Modified: April 19, 2014
|
11 |
* License: GPL2
|
12 |
*
|
13 |
* Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
|
741 |
public function file( $name, $options = array() ) {
|
742 |
$defaults = array(
|
743 |
'id' => '',
|
744 |
+
'size' => 20,
|
745 |
);
|
746 |
$id = $this->get_attr_id( $options['id'] );
|
747 |
$options = array_merge( $defaults, $options );
|