Commit 220429a1 authored by Kevin Stover's avatar Kevin Stover

Merge branch 'release/v2.2.50'

parents 3ac377b9 047dd41b
......@@ -78,94 +78,6 @@ function ninja_forms_delete_form( $form_id = '' ){
}
add_action('wp_ajax_ninja_forms_add_conditional', 'ninja_forms_add_conditional');
function ninja_forms_add_conditional(){
global $wpdb, $ninja_forms_fields;
$field_id = $_REQUEST['field_id'];
$x = $_REQUEST['x'];
ninja_forms_field_conditional_output($field_id, $x);
die();
}
add_action('wp_ajax_ninja_forms_add_cr', 'ninja_forms_add_cr');
function ninja_forms_add_cr(){
global $wpdb, $ninja_forms_fields;
$field_id = $_REQUEST['field_id'];
$x = $_REQUEST['x'];
$y = $_REQUEST['y'];
$new_html = ninja_forms_return_echo('ninja_forms_field_conditional_cr_output', $field_id, $x, $y);
header("Content-type: application/json");
$array = array ('new_html' => $new_html, 'field_id' => $field_id, 'x' => $x, 'y' => $y);
echo json_encode($array);
die();
}
add_action('wp_ajax_ninja_forms_change_action', 'ninja_forms_change_action');
function ninja_forms_change_action(){
global $wpdb, $ninja_forms_fields;
$form_id = $_REQUEST['form_id'];
$action_slug = $_REQUEST['action_slug'];
$field_id = $_REQUEST['field_id'];
$x = $_REQUEST['x'];
$field_data = $_REQUEST['field_data'];
$field_data = $field_data['ninja_forms_field_'.$field_id];
$field_row = ninja_forms_get_field_by_id($field_id);
$type = $field_row['type'];
$reg_field = $ninja_forms_fields[$type];
if( isset( $reg_field['conditional']['action'][$action_slug] ) ){
$conditional = $reg_field['conditional']['action'][$action_slug];
}else if( $action_slug == 'change_value'){
$conditional = array( 'output' => 'text' );
}else{
$conditional = '';
}
header("Content-type: application/json");
if( isset( $conditional['output'] ) ){
$new_type = $conditional['output'];
}else{
$new_type = '';
}
$new_html = ninja_forms_return_echo( 'ninja_forms_field_conditional_action_output', $field_id, $x, $conditional, '', $field_data );
$array = array('new_html' => $new_html, 'new_type' => $new_type );
echo json_encode($array);
die();
}
add_action('wp_ajax_ninja_forms_change_cr_field', 'ninja_forms_change_cr_field');
function ninja_forms_change_cr_field(){
global $wpdb, $ninja_forms_fields;
$field_id = $_REQUEST['field_id'];
$field_value = $_REQUEST['field_value'];
$x = $_REQUEST['x'];
$y = $_REQUEST['y'];
$field_row = ninja_forms_get_field_by_id($field_value);
$type = $field_row['type'];
$reg_field = $ninja_forms_fields[$type];
$conditional = $reg_field['conditional'];
header("Content-type: application/json");
$new_html = '';
if(isset($conditional['value']) AND is_array($conditional['value'])){
$new_html = ninja_forms_return_echo('ninja_forms_field_conditional_cr_value_output', $field_id, $x, $y, $conditional);
$array = array('new_html' => $new_html, 'new_type' => $conditional['value']['type'] );
echo json_encode($array);
}
die();
}
add_action('wp_ajax_ninja_forms_add_list_option', 'ninja_forms_add_list_options');
function ninja_forms_add_list_options(){
global $wpdb;
......
......@@ -72,6 +72,12 @@ function ninja_forms_display_fields($form_id){
$display_style = $data['display_style'];
}else{
$display_style = '';
}
if( isset( $data['visible'] ) ){
$visible = $data['visible'];
}else{
$visible = true;
}
if ( $display_style != '' ) {
......@@ -96,7 +102,7 @@ function ninja_forms_display_fields($form_id){
$field_wrap_class = apply_filters( 'ninja_forms_field_wrap_class', $field_wrap_class, $field_id );
do_action( 'ninja_forms_display_before_opening_field_wrap', $field_id, $data );
?>
<div class="<?php echo $field_wrap_class;?>" <?php echo $display_style;?> id="ninja_forms_field_<?php echo $field_id;?>_div_wrap">
<div class="<?php echo $field_wrap_class;?>" <?php echo $display_style;?> id="ninja_forms_field_<?php echo $field_id;?>_div_wrap" data-visible="<?php echo $visible;?>">
<?php
do_action( 'ninja_forms_display_after_opening_field_wrap', $field_id, $data );
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
Plugin Name: Ninja Forms
Plugin URI: http://ninjaforms.com/
Description: Ninja Forms is a webform builder with unparalleled ease of use and features.
Version: 2.2.49
Version: 2.2.50
Author: The WP Ninjas
Author URI: http://ninjaforms.com
Text Domain: ninja-forms
......@@ -51,7 +51,7 @@ global $wpdb, $wp_version;
define("NINJA_FORMS_DIR", WP_PLUGIN_DIR."/".basename( dirname( __FILE__ ) ) );
define("NINJA_FORMS_URL", plugins_url()."/".basename( dirname( __FILE__ ) ) );
define("NINJA_FORMS_VERSION", "2.2.49");
define("NINJA_FORMS_VERSION", "2.2.50");
define("NINJA_FORMS_TABLE_NAME", $wpdb->prefix . "ninja_forms");
define("NINJA_FORMS_FIELDS_TABLE_NAME", $wpdb->prefix . "ninja_forms_fields");
define("NINJA_FORMS_FAV_FIELDS_TABLE_NAME", $wpdb->prefix . "ninja_forms_fav_fields");
......
......@@ -3,7 +3,7 @@ Contributors: kstover, jameslaws, daveshine
Tags: form, forms, contact form, custom form, form builder, form creator, form manager, form creation, contact forms, custom forms, forms builder, forms creator, forms manager, forms creation, form administration,
Requires at least: 3.4
Tested up to: 3.6
Stable tag: 2.2.49
Stable tag: 2.2.50
License: GPLv2 or later
Forms created with a simple drag and drop interface. Contact forms, Email collection forms, or any other form you want on your WordPress site.
......@@ -76,14 +76,17 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 2.2.49 =
= 2.2.50 =
*Bugs:*
* Duplicated or imported forms that use the [ninja_forms_field] shortcode should now have their references automatically changed after duplication/import.
* Fixed a bug that caused the Total calculation field to work incorrectly with Tax and Subtotals.
* Fixed a major bug that could cause calculation fields to not work when using the currencty input mask.
* Fixed a bug that caused special characters to appear incorrectly in List fields.
* Fixed a major bug that could prevent calculation fields from working properly when more than one calculation referenced the same field.
* Fixed a bug that caused calculation fields to work incorrectly with the Conditional Logic extension.
*Changes:*
* Added the "visible" HTML5 data attribute to fields.
* Removed functions from core that were specific to the Conditional Logic extension.
== Requested Features ==
......@@ -91,6 +94,18 @@ If you have any feature requests, please feel free to visit [ninjaforms.com](htt
== Changelog ==
= 2.2.50 =
*Bugs:*
* Fixed a major bug that could prevent calculation fields from working properly when more than one calculation referenced the same field.
* Fixed a bug that caused calculation fields to work incorrectly with the Conditional Logic extension.
*Changes:*
* Added the "visible" HTML5 data attribute to fields.
* Removed functions from core that were specific to the Conditional Logic extension.
= 2.2.49 =
*Bugs:*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment