Commit 7bef5809 authored by Kevin Stover's avatar Kevin Stover

Merge branch 'release/v2.6.5'

parents a0f981b7 956490c5
......@@ -4,7 +4,7 @@
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.6
Tested up to: 3.9
Stable tag: 2.6.3
Stable tag: 2.6.4
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.
......
......@@ -402,4 +402,4 @@
}/* Progressbar
----------------------------------*/
.ui-progressbar { height:1em; text-align: left; }
.ui-progressbar-value { height:100%; margin: -1px; font-size: .3 em; text-align: right; background-color: #0CF); }
.ui-progressbar-value { height:100%; margin: -1px; font-size: .3em; text-align: right; background-color: #0CF; }
......@@ -12,7 +12,9 @@ function ninja_forms_edit_field_input_limit( $field_id ) {
$field_row = ninja_forms_get_field_by_id($field_id);
$field_type = $field_row['type'];
if ( $field_type != '_text' and $field_type != '_textarea' )
$allowed_types = apply_filters( 'nf_input_limit_types', array( '_text', '_textarea' ) );
if ( ! in_array( $field_type, $allowed_types ) )
return false;
$field_data = $field_row['data'];
......
......@@ -10,24 +10,6 @@ function ninja_forms_inside_label_hidden( $field_id, $data ){
$label = '';
}
if(isset($data['req'])){
$req = $data['req'];
}else{
$req = '';
}
if(isset($plugin_settings['req_field_symbol'])){
$req_symbol = $plugin_settings['req_field_symbol'];
}else{
$req_symbol = '';
}
if( $req == 1 ){
$req_span = "<span class='ninja-forms-req-symbol'>$req_symbol</span>";
}else{
$req_span = '';
}
?>
<input type="hidden" id="ninja_forms_field_<?php echo $field_id;?>_label_hidden" value="<?php echo $label;?>">
<?php
......
......@@ -106,8 +106,9 @@ function ninja_forms_display_label_inside( $data, $field_id ){
$req_symbol = '*';
}
if ( isset ( $data['req'] ) and $data['req'] == 1 and $label_pos == 'inside' ) {
if ( isset ( $data['req'] ) and $data['req'] == 1 and $label_pos == 'inside' and ! isset ( $data['req_added'] ) ) {
$data['label'] .= ' '.$req_symbol;
$data['req_added'] = 1;
}
if ( isset( $data['label'] ) ) {
......
......@@ -81,14 +81,15 @@ function ninja_forms_page_append_check(){
$ninja_forms_append_page_form_id = array();
}
$form_ids = ninja_forms_get_form_ids_by_post_id($post->ID);
if(is_array($form_ids) AND !empty($form_ids)){
foreach($form_ids as $form_id){
$ninja_forms_append_page_form_id[] = $form_id;
//remove_filter('the_content', 'wpautop');
add_filter( 'the_content', 'ninja_forms_append_to_page', 9999 );
}
if ( $post ) {
$form_ids = ninja_forms_get_form_ids_by_post_id($post->ID);
if(is_array($form_ids) AND !empty($form_ids)){
foreach($form_ids as $form_id){
$ninja_forms_append_page_form_id[] = $form_id;
//remove_filter('the_content', 'wpautop');
add_filter( 'the_content', 'ninja_forms_append_to_page', 9999 );
}
}
}
}
......
......@@ -7,54 +7,61 @@
function ninja_forms_display_response_message( $form_id ){
global $ninja_forms_processing;
if ( isset ( $ninja_forms_processing ) and $ninja_forms_processing->get_form_ID() != $form_id )
return;
$plugin_settings = nf_get_settings();
$form_row = ninja_forms_get_form_by_id($form_id);
if( isset( $form_row['data']['ajax'] ) ){
$ajax = $form_row['data']['ajax'];
}else{
$ajax = 0;
}
if( $ajax == 0 AND ( is_object( $ninja_forms_processing ) AND !$ninja_forms_processing->get_all_errors() AND !$ninja_forms_processing->get_all_success_msgs() ) ){
$display = 'display:none;';
}else{
$display = '';
}
if( is_object( $ninja_forms_processing ) ){
if( $ninja_forms_processing->get_errors_by_location('general') ){
$class = 'ninja-forms-error-msg';
}else if( $ninja_forms_processing->get_all_success_msgs() ){
$class = 'ninja-forms-success-msg';
echo '<div id="ninja_forms_form_' . $form_id . '_response_msg" style="' . $display . '" class="ninja-forms-response-msg '.$class.'">';
if ( isset ( $ninja_forms_processing ) && $ninja_forms_processing->get_form_ID() == $form_id ) {
if( is_object( $ninja_forms_processing ) ){
if( $ninja_forms_processing->get_errors_by_location('general') ){
$class = 'ninja-forms-error-msg';
}else if( $ninja_forms_processing->get_all_success_msgs() ){
$class = 'ninja-forms-success-msg';
}else{
$class = '';
}
}else{
$class = '';
}
}else{
$class = '';
}
echo '<div id="ninja_forms_form_' . $form_id . '_response_msg" style="' . $display . '" class="ninja-forms-response-msg '.$class.'">';
if( is_object( $ninja_forms_processing ) ){
if( $ninja_forms_processing->get_form_ID() == $form_id ){
if( $ninja_forms_processing->get_errors_by_location('general') ){
foreach($ninja_forms_processing->get_errors_by_location('general') as $error){
echo '<div>';
echo $error['msg'];
echo '</div>';
if( is_object( $ninja_forms_processing ) ){
if( $ninja_forms_processing->get_form_ID() == $form_id ){
if( $ninja_forms_processing->get_errors_by_location('general') ){
foreach($ninja_forms_processing->get_errors_by_location('general') as $error){
echo '<div>';
echo $error['msg'];
echo '</div>';
}
}
}
if( $ninja_forms_processing->get_all_success_msgs()){
foreach($ninja_forms_processing->get_all_success_msgs() as $success){
echo '<div>';
echo $success;
echo '</div>';
if( $ninja_forms_processing->get_all_success_msgs()){
foreach($ninja_forms_processing->get_all_success_msgs() as $success){
echo '<div>';
echo $success;
echo '</div>';
}
}
}
}
}
echo '</div>';
}
......
......@@ -26,7 +26,7 @@ function ninja_forms_post_process(){
if( $ninja_forms_processing->get_form_setting( 'landing_page' ) != '' ){
ninja_forms_set_transient();
header( 'Location: '.$ninja_forms_processing->get_form_setting( 'landing_page' ) );
wp_redirect( $ninja_forms_processing->get_form_setting( 'landing_page' ) );
die();
}
}
......
......@@ -247,9 +247,9 @@ function ninja_forms_display_js( $form_id, $local_vars = '' ) {
$currency_symbol = $plugin_settings['currency_symbol'];
$password_mismatch = esc_html(stripslashes($plugin_settings['password_mismatch']));
$msg_format = $plugin_settings['msg_format'];
$msg_format = 'inline';
$msg_format = 'inline';
wp_enqueue_script( 'ninja-forms-display',
NINJA_FORMS_URL . '/js/' . $src .'/ninja-forms-display' . $suffix . '.js',
array( 'jquery', 'jquery-form' ) );
......@@ -282,4 +282,4 @@ function ninja_forms_display_css(){
wp_enqueue_style( 'jquery-qtip', NINJA_FORMS_URL .'/css/qtip.css' );
wp_enqueue_style( 'jquery-rating', NINJA_FORMS_URL .'/css/jquery.rating.css' );
}
add_action( 'ninja_forms_display_css', 'ninja_forms_display_css', 10, 2 );
\ No newline at end of file
add_action( 'ninja_forms_display_css', 'ninja_forms_display_css', 10, 2 );
......@@ -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.6.4
Version: 2.6.5
Author: The WP Ninjas
Author URI: http://ninjaforms.com
Text Domain: ninja-forms
......@@ -54,7 +54,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.6.4");
define("NINJA_FORMS_VERSION", "2.6.5");
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, mordauk, bftrick, helgatheviking
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.6
Tested up to: 3.9
Stable tag: 2.6.4
Stable tag: 2.6.5
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,11 +76,17 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 2.6.4 (05/15/2014) =
= 2.6.5 (06/10/2014) =
*Changes:*
* Modified CSS styling slightly for default contact forms.
* Added a filter for setting which field types are shown the input limiter.
* Changed the header( 'Location....') php function with wp_redirect().
*Bugs:*
* Fixed a bug that could cause the required symbol to be added twice if the label position was set inside.
* Wrapped the $post global in an if check to prevent errors on some WP pages.
== Requested Features ==
......@@ -88,6 +94,18 @@ If you have any feature requests, please feel free to visit [ninjaforms.com](htt
== Changelog ==
= 2.6.5 (06/10/2014) =
*Changes:*
* Added a filter for setting which field types are shown the input limiter.
* Changed the header( 'Location....') php function with wp_redirect().
*Bugs:*
* Fixed a bug that could cause the required symbol to be added twice if the label position was set inside.
* Wrapped the $post global in an if check to prevent errors on some WP pages.
= 2.6.4 (05/15/2014) =
*Changes:*
......
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