Commit eb4c0e21 authored by Kevin Stover's avatar Kevin Stover

Merge branch 'release/v2.6'

parents b77f5d2a 10f6654a
......@@ -181,22 +181,15 @@ TEXT FIELDS & TEXTAREAS
.text-wrap.label-above input,
.text-wrap.label-below input,
.text-wrap.label-inside input,
.textarea-wrap.label-above textarea,
.textarea-wrap.label-below textarea,
.textarea-wrap.label-inside textarea,
.list-dropdown-wrap.label-above select,
.list-dropdown-wrap.label-below select {
width: 100%;
}
.text-wrap.label-inside input,
.textarea-wrap.label-inside textarea {
width: 100%;
}
.text-wrap.label-inside input.ninja-forms-req,
.textarea-wrap.label-inside textarea.ninja-forms-req {
width: 95%;
}
.textarea-wrap textarea {
height: 100px;
}
......@@ -294,3 +287,15 @@ HONEYPOT
.honeypot-wrap {
display: none;
}
/* ---------------------------------
Kevin's Test Stuff
----------------------------------*/
/*#test_test {
background: url('../images/loading.gif') no-repeat top left;
padding-left: 16px;
height: 16px;
}*/
......@@ -78,8 +78,8 @@ function ninja_forms_register_label_settings_metabox(){
array(
'name' => 'process_label',
'type' => 'text',
'label' => __( 'Ajax submitting message', 'ninja-forms' ),
'desc' => __( 'If your form is submitted via ajax, what message should appear to let users know it is being processed?', 'ninja-forms' ),
'label' => __( 'Processing Submission Label', 'ninja-forms' ),
'desc' => __( 'This message is shown inside the submit button whenever a user clicks "submit" to let them know it is processing.', 'ninja-forms' ),
),
),
);
......
......@@ -13,9 +13,11 @@ function ninja_forms_register_sidebar_select_subs(){
if( is_admin() AND isset( $_REQUEST['page'] ) AND $_REQUEST['page'] == 'ninja-forms-subs' ){
if( !isset( $_REQUEST['paged'] ) AND !isset( $_REQUEST['form_id'] ) ){
unset( $_SESSION['ninja_forms_form_id'] );
unset( $_SESSION['ninja_forms_begin_date'] );
unset( $_SESSION['ninja_forms_end_date'] );
if ( isset ( $_SESSION ) ) {
unset( $_SESSION['ninja_forms_form_id'] );
unset( $_SESSION['ninja_forms_begin_date'] );
unset( $_SESSION['ninja_forms_end_date'] );
}
}
}
}
......
......@@ -109,19 +109,19 @@ function ninja_forms_tab_view_subs(){
if( $current_page > 1 ){
$start = ( ( $current_page - 1 ) * $limit );
if( $sub_count < $limit ){
$end = $sub_count;
}else{
$end = $current_page * $limit;
//$end = $end - 1;
}
if( $end > $sub_count ){
$end = $sub_count;
}
// if( $sub_count < $limit ){
// $end = $sub_count;
// }else{
// $end = $current_page * $limit;
// //$end = $end - 1;
// }
// if( $end > $sub_count ){
// $end = $sub_count;
// }
}else{
$start = 0;
$end = $limit;
//$end = $limit;
}
$args = apply_filters( 'ninja_forms_view_subs_args', array(
......@@ -312,82 +312,84 @@ function ninja_forms_tab_view_subs(){
if( is_array( $sub_results ) AND !empty( $sub_results ) AND $edit_sub_form != 1 AND $current_page <= $page_count ){
for ($i = 0; $i < $limit; $i++) {
$sub = $sub_results[$i];
$data = apply_filters( 'ninja_forms_view_sub_data', $sub['data'], $sub['id'] );
?>
<tr id="ninja_forms_sub_<?php echo $sub['id'];?>_tr">
<th scope="row" class="check-column">
<input type="checkbox" id="" name="ninja_forms_sub[]" value="<?php echo $sub['id'];?>" class="ninja-forms-subs-bulk-action">
</th>
<td>
<?php
$date = $sub['date_updated'];
$date = strtotime($date);
$date = date($date_format, $date);
echo $date;
?>
<div class="row-actions">
if ( isset ( $sub_results[$i] ) ) {
$sub = $sub_results[$i];
$data = apply_filters( 'ninja_forms_view_sub_data', $sub['data'], $sub['id'] );
?>
<tr id="ninja_forms_sub_<?php echo $sub['id'];?>_tr">
<th scope="row" class="check-column">
<input type="checkbox" id="" name="ninja_forms_sub[]" value="<?php echo $sub['id'];?>" class="ninja-forms-subs-bulk-action">
</th>
<td>
<?php
/**
* ninja_forms_sub_table_row_actions hook
* hook in here to allow extra row actions
*
* @hooked ninja_forms_sub_table_row_actions_edit - 10
* @hooked ninja_forms_sub_table_row_actions_delete - 20
* @hooked ninja_forms_sub_table_row_actions_export - 30
*/
$row_actions = apply_filters( 'ninja_forms_sub_table_row_actions', array(), $data, $sub['id'], $form_id );
echo implode(" | ", $row_actions);
$date = $sub['date_updated'];
$date = strtotime($date);
$date = date($date_format, $date);
echo $date;
?>
</div>
</td>
<?php
do_action( 'ninja_forms_view_sub_table_row', $form_id, $sub['id'] );
$x = 0;
while($x <= $col_count){
if(isset($field_results[$x]['id'])){
$field_id = $field_results[$x]['id'];
?>
<div class="row-actions">
<?php
/**
* ninja_forms_sub_table_row_actions hook
* hook in here to allow extra row actions
*
* @hooked ninja_forms_sub_table_row_actions_edit - 10
* @hooked ninja_forms_sub_table_row_actions_delete - 20
* @hooked ninja_forms_sub_table_row_actions_export - 30
*/
$row_actions = apply_filters( 'ninja_forms_sub_table_row_actions', array(), $data, $sub['id'], $form_id );
echo implode(" | ", $row_actions);
?>
</div>
</td>
<?php
do_action( 'ninja_forms_view_sub_table_row', $form_id, $sub['id'] );
$x = 0;
while($x <= $col_count){
if(isset($field_results[$x]['id'])){
$field_id = $field_results[$x]['id'];
?>
<td id="ninja_forms_sub_<?php echo $sub['id'];?>_field_<?php echo $field_id;?>">
<?php
if ( is_array( $data ) ) {
foreach( $data as $d ) {
if ( $field_id == $d['field_id'] ) {
/**
* ninja_forms_view_sub_td hook
* hook in here to format the submission table data cells
*
* @hooked ninja_forms_strip_sub_td_slashes - 10
* @hooked ninja_forms_strip_sub_td_tags - 20
*/
$user_value = apply_filters('ninja_forms_view_sub_td', $d['user_value'], $d['field_id'], $sub['id'] );
if(is_array($user_value) AND !empty($user_value)){
$y = 1;
foreach($user_value as $val){
echo ninja_forms_stripslashes_deep($val);
if($y != count($user_value)){
echo ", ";
<td id="ninja_forms_sub_<?php echo $sub['id'];?>_field_<?php echo $field_id;?>">
<?php
if ( is_array( $data ) ) {
foreach( $data as $d ) {
if ( $field_id == $d['field_id'] ) {
/**
* ninja_forms_view_sub_td hook
* hook in here to format the submission table data cells
*
* @hooked ninja_forms_strip_sub_td_slashes - 10
* @hooked ninja_forms_strip_sub_td_tags - 20
*/
$user_value = apply_filters('ninja_forms_view_sub_td', $d['user_value'], $d['field_id'], $sub['id'] );
if(is_array($user_value) AND !empty($user_value)){
$y = 1;
foreach($user_value as $val){
echo ninja_forms_stripslashes_deep($val);
if($y != count($user_value)){
echo ", ";
}
$y++;
}
$y++;
}else{
echo stripslashes($user_value);
}
}else{
echo stripslashes($user_value);
}
}
}
?>
</td>
<?php
}
?>
</td>
<?php
$x++;
}
$x++;
}
?>
?>
</tr>
<?php
</tr>
<?php
}
}
}else if($edit_sub_form == 1){
$sub_row = ninja_forms_get_sub_by_id($sub_id);
......
This diff is collapsed.
......@@ -283,6 +283,8 @@ function ninja_forms_field_list_display( $field_id, $data ){
$value = $option['label'];
}
$value = htmlspecialchars( $value, ENT_QUOTES );
if(isset($option['label'])){
$label = $option['label'];
}else{
......@@ -301,7 +303,7 @@ function ninja_forms_field_list_display( $field_id, $data ){
$disabled = '';
}
$label = htmlspecialchars( $label );
$label = htmlspecialchars( $label, ENT_QUOTES );
$label = stripslashes( $label );
......@@ -313,6 +315,7 @@ function ninja_forms_field_list_display( $field_id, $data ){
$value = $label;
}
if ( $selected_value == $value OR ( is_array( $selected_value ) AND in_array( $value, $selected_value ) ) ) {
$selected = 'selected';
}else if( ( $selected_value == '' OR $selected_value == $field_label ) AND isset( $option['selected'] ) AND $option['selected'] == 1 ){
......@@ -344,6 +347,8 @@ function ninja_forms_field_list_display( $field_id, $data ){
$value = $option['label'];
}
$value = htmlspecialchars( $value, ENT_QUOTES );
if(isset($option['label'])){
$label = $option['label'];
}else{
......@@ -356,6 +361,8 @@ function ninja_forms_field_list_display( $field_id, $data ){
$display_style = '';
}
$label = htmlspecialchars( $label, ENT_QUOTES );
$label = stripslashes($label);
if($list_show_value == 0){
......@@ -386,6 +393,8 @@ function ninja_forms_field_list_display( $field_id, $data ){
$value = $option['label'];
}
$value = htmlspecialchars( $value, ENT_QUOTES );
if(isset($option['label'])){
$label = $option['label'];
}else{
......@@ -398,7 +407,9 @@ function ninja_forms_field_list_display( $field_id, $data ){
$display_style = '';
}
$label = stripslashes($label);
$label = htmlspecialchars( $label, ENT_QUOTES );
$label = stripslashes( $label) ;
if($list_show_value == 0){
$value = $label;
......@@ -441,6 +452,8 @@ function ninja_forms_field_list_display( $field_id, $data ){
$value = $option['label'];
}
$value = htmlspecialchars( $value, ENT_QUOTES );
if(isset($option['label'])){
$label = $option['label'];
}else{
......@@ -453,6 +466,8 @@ function ninja_forms_field_list_display( $field_id, $data ){
$display_style = '';
}
$label = htmlspecialchars( $label, ENT_QUOTES );
$label = stripslashes($label);
if($list_show_value == 0){
......@@ -486,6 +501,8 @@ function ninja_forms_field_list_display( $field_id, $data ){
$value = $option['label'];
}
$value = htmlspecialchars( $value, ENT_QUOTES );
if(isset($option['label'])){
$label = $option['label'];
}else{
......@@ -498,7 +515,9 @@ function ninja_forms_field_list_display( $field_id, $data ){
$display_style = '';
}
$label = stripslashes($label);
$label = htmlspecialchars( $label, ENT_QUOTES );
$label = stripslashes( $label );
if($list_show_value == 0){
$value = $label;
......
......@@ -28,6 +28,13 @@ function ninja_forms_register_field_submit(){
add_action('init', 'ninja_forms_register_field_submit');
function ninja_forms_field_submit_display($field_id, $data){
global $ninja_forms_loading, $ninja_forms_processing;
if ( isset ( $ninja_forms_loading ) ) {
$form_id = $ninja_forms_loading->get_form_ID();
} else {
$form_id = $ninja_forms_processing->get_form_ID();
}
if(isset($data['show_field'])){
$show_field = $data['show_field'];
......@@ -41,9 +48,17 @@ function ninja_forms_field_submit_display($field_id, $data){
}else{
$label = 'Submit';
}
$plugin_settings = nf_get_settings();
if ( isset ( $plugin_settings['process_label'] ) ) {
$processing_msg = $plugin_settings['process_label'];
}
?>
<input type="submit" name="_ninja_forms_field_<?php echo $field_id;?>" class="<?php echo $field_class;?>" id="ninja_forms_field_<?php echo $field_id;?>" value="<?php echo $label;?>" rel="<?php echo $field_id;?>" >
<div id="nf_submit_<?php echo $form_id; ?>">
<input type="submit" name="_ninja_forms_field_<?php echo $field_id;?>" class="<?php echo $field_class;?>" id="ninja_forms_field_<?php echo $field_id;?>" value="<?php echo $label;?>" rel="<?php echo $field_id;?>" >
</div>
<div id="nf_processing_<?php echo $form_id; ?>" style="display:none;">
<input type="submit" name="" class="<?php echo $field_class; ?>" value="<?php echo $processing_msg; ?>" rel="<?php echo $field_id;?>" disabled>
</div>
<?php
}
\ No newline at end of file
}
......@@ -199,6 +199,10 @@ function ninja_forms_field_text_display( $field_id, $data ){
global $current_user;
$field_class = ninja_forms_get_field_class( $field_id );
if ( isset( $data['email'] ) ) {
$field_class .= ' email';
}
if(isset($data['default_value'])){
$default_value = $data['default_value'];
}else{
......
......@@ -34,7 +34,7 @@ jQuery(document).ready(function(jQuery) {
if( jQuery.fn.mask ){
jQuery(".ninja-forms-mask").each(function(){
var mask = jQuery(this).data('mask');
mask = mask.toString();
mask = mask.toString();
jQuery(this).mask(mask);
});
......@@ -78,7 +78,7 @@ jQuery(document).ready(function(jQuery) {
var input_limit_type = jQuery(this).data( 'input-limit-type' );
var input_limit_msg = jQuery(this).data( 'input-limit-msg' );
jQuery(this).counter( {
count: 'down',
count: 'down',
goal: input_limit,
type: input_limit_type,
msg: input_limit_msg
......@@ -686,6 +686,10 @@ jQuery(document).ready(function(jQuery) {
}); //End document.ready
function ninja_forms_before_submit(formData, jqForm, options){
var form_id = jQuery( jqForm ).prop( 'id' ).replace( 'ninja_forms_form_', '' );
jQuery( '#nf_submit_' + form_id ).hide();
jQuery( '#nf_processing_' + form_id ).show();
var result = jQuery(jqForm).triggerHandler('beforeSubmit', [ formData, jqForm, options ]);
if ( result !== false ) {
result = jQuery('body').triggerHandler('beforeSubmit', [ formData, jqForm, options ]);
......@@ -698,6 +702,10 @@ function ninja_forms_before_submit(formData, jqForm, options){
function ninja_forms_response(responseText, statusText, xhr, jQueryform){
//alert(responseText);
var form_id = responseText.form_id;
jQuery( '#nf_processing_' + form_id ).hide();
jQuery( '#nf_submit_' + form_id ).show();
if( ninja_forms_settings.ajax_msg_format == 'inline' ){
var result = jQuery(jQueryform).triggerHandler('submitResponse', [ responseText ]);
if ( result !== false ) {
......@@ -728,7 +736,7 @@ function ninja_forms_default_before_submit(formData, jqForm, options){
var form_id = jQuery(jqForm).prop("id").replace("ninja_forms_form_", "" );
// Show the ajax spinner and processing message.
jQuery("#ninja_forms_form_" + form_id + "_process_msg").show();
//jQuery("#ninja_forms_form_" + form_id + "_process_msg").show();
jQuery("#ninja_forms_form_" + form_id + "_response_msg").prop("innerHTML", "");
jQuery("#ninja_forms_form_" + form_id + "_response_msg").removeClass("ninja-forms-error-msg");
jQuery("#ninja_forms_form_" + form_id + "_response_msg").removeClass("ninja-forms-success-msg");
......@@ -740,7 +748,7 @@ function ninja_forms_default_before_submit(formData, jqForm, options){
function ninja_forms_default_response(response){
var form_id = response.form_id;
jQuery("#ninja_forms_form_" + form_id + "_process_msg").hide();
//jQuery("#ninja_forms_form_" + form_id + "_process_msg").hide();
ninja_forms_update_error_msgs(response)
ninja_forms_update_success_msg(response)
......@@ -929,4 +937,4 @@ function ninja_forms_var_operator(op) {
return param1 / param2;
}
}
}
\ No newline at end of file
}
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.5.3
Version: 2.6
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.5.3");
define("NINJA_FORMS_VERSION", "2.6");
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");
......@@ -106,7 +106,7 @@ require_once( NINJA_FORMS_DIR . "/includes/display/fields/label.php" );
require_once( NINJA_FORMS_DIR . "/includes/display/fields/help.php" );
require_once( NINJA_FORMS_DIR . "/includes/display/fields/desc.php" );
require_once( NINJA_FORMS_DIR . "/includes/display/form/form-title.php" );
require_once( NINJA_FORMS_DIR . "/includes/display/form/process-message.php" );
//require_once( NINJA_FORMS_DIR . "/includes/display/form/process-message.php" );
require_once( NINJA_FORMS_DIR . "/includes/display/fields/field-error-message.php" );
require_once( NINJA_FORMS_DIR . "/includes/display/form/form-wrap.php" );
require_once( NINJA_FORMS_DIR . "/includes/display/form/form-cont.php" );
......@@ -289,6 +289,8 @@ require_once( NINJA_FORMS_DIR . "/includes/admin/save.php" );
// Set $_SESSION variable used for storing items in transient variables
function ninja_forms_set_transient_id(){
if( !session_id() )
session_start();
if ( !isset ( $_SESSION['ninja_forms_transient_id'] ) AND !is_admin() ) {
$t_id = ninja_forms_random_string();
// Make sure that our transient ID isn't currently in use.
......
......@@ -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.8.1
Stable tag: 2.5.3
Stable tag: 2.6
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,20 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 2.5.3 =
= 2.6 =
*Changes:*
* The "Processing Message" above the form has been removed in favour of changing the text of the submit button and disabling it.
* This change in processing notification will make it easier for users to see that a submission is being processed and prevent them from clicking the "submit" button again.
* Updated the label of the "Processing" label to make it clearer.
* Added a credit card field that can be enabled by extensions that need to use it.
*Bugs:*
* Fixed a bug that could prevent AJAX submissions from working properly.
* Fixed a bug introduced in version 2.5.3 which prevented Sessions from starting properly on some server setups.
* Fixed some PHP warnings/notices.
* List items should now properly escape html when displayed.
== Requested Features ==
......@@ -88,6 +97,21 @@ If you have any feature requests, please feel free to visit [ninjaforms.com](htt
== Changelog ==
= 2.6 =
*Changes:*
* The "Processing Message" above the form has been removed in favour of changing the text of the submit button and disabling it.
* This change in processing notification will make it easier for users to see that a submission is being processed and prevent them from clicking the "submit" button again.
* Updated the label of the "Processing" label to make it clearer.
* Added a credit card field that can be enabled by extensions that need to use it.
*Bugs:*
* Fixed a bug introduced in version 2.5.3 which prevented Sessions from starting properly on some server setups.
* Fixed some PHP warnings/notices.
* List items should now properly escape html when displayed.
= 2.5.3 =
*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