MW WP Form - Version 1.5.5

Version Description

  • Added : Selected file reset button has been added.
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin MW WP Form
Version 1.5.5
Comparing to
See all releases

Code changes from version 1.5.4 to 1.5.5

Files changed (5) hide show
  1. css/style.css +5 -0
  2. js/form.js +12 -0
  3. mw-wp-form.php +2 -2
  4. readme.txt +5 -2
  5. system/mw_form.php +3 -3
css/style.css CHANGED
@@ -20,3 +20,8 @@
20
  margin: 0 0 5px;
21
  padding: 5px;
22
  }
 
 
 
 
 
20
  margin: 0 0 5px;
21
  padding: 5px;
22
  }
23
+
24
+ .mwform-file-delete {
25
+ cursor: pointer;
26
+ display: none;
27
+ }
js/form.js CHANGED
@@ -8,5 +8,17 @@ jQuery( function( $ ) {
8
  $( this ).val( half );
9
  } );
10
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  } );
12
 
8
  $( this ).val( half );
9
  } );
10
 
11
+ var file_delete = $( '.mw_wp_form .mwform-file-delete' );
12
+ $( '.mw_wp_form input[type="file"]' ).change( function() {
13
+ var name = $( this ).attr( 'name' );
14
+ file_delete.closest( '[data-mwform-file-delete="' + name + '"]' ).show();
15
+ } );
16
+ file_delete.click( function() {
17
+ $( this ).hide();
18
+ var target = $( this ).data( 'mwform-file-delete' );
19
+ var field = $( 'input[type="file"][name="' + target + '"]' );
20
+ field.replaceWith( field.clone( true ) );
21
+ } );
22
+
23
  } );
24
 
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.4
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: April 17, 2014
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.5
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: April 18, 2014
11
  * Text Domain: mw-wp-form
12
  * Domain Path: /languages/
13
  * License: GPL2
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: inc2734
3
  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.8.3
7
- Stable tag: 1.5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -54,6 +54,9 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
54
 
55
  == Changelog ==
56
 
 
 
 
57
  = 1.5.4 =
58
  * Bug fix : fixed spelling mistake in admin page.
59
  * Added : Convert full-pitch character to half character in text shortcode.
3
  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.5
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.5 =
58
+ * Added : Selected file reset button has been added.
59
+
60
  = 1.5.4 =
61
  * Bug fix : fixed spelling mistake in admin page.
62
  * Added : Convert full-pitch character to half character in text shortcode.
system/mw_form.php CHANGED
@@ -3,11 +3,11 @@
3
  * Name: MW Form
4
  * URI: http://2inc.org
5
  * Description: フォームクラス
6
- * Version: 1.3.11
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
- * Modified: April 5, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
@@ -745,7 +745,7 @@ class MW_Form {
745
  );
746
  $id = $this->get_attr_id( $options['id'] );
747
  $options = array_merge( $defaults, $options );
748
- return sprintf( '<input type="file" name="%s" size="%d" %s />',
749
  esc_attr( $name ), esc_attr( $options['size'] ), $id
750
  );
751
  }
3
  * Name: MW Form
4
  * URI: http://2inc.org
5
  * Description: フォームクラス
6
+ * Version: 1.3.12
7
  * Author: Takashi Kitajima
8
  * Author URI: http://2inc.org
9
  * Created : September 25, 2012
10
+ * Modified: April 18, 2014
11
  * License: GPL2
12
  *
13
  * Copyright 2014 Takashi Kitajima (email : inc@2inc.org)
745
  );
746
  $id = $this->get_attr_id( $options['id'] );
747
  $options = array_merge( $defaults, $options );
748
+ return sprintf( '<input type="file" name="%s" size="%d" %s /><span data-mwform-file-delete="%1$s" class="mwform-file-delete">&times;</span>',
749
  esc_attr( $name ), esc_attr( $options['size'] ), $id
750
  );
751
  }