Commit b5c6a6c2 authored by Kevin Stover's avatar Kevin Stover

Merge branch 'release/v2.8.5'

parents ded82f45 c8453fed
......@@ -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.8
Tested up to: 4.0
Stable tag: 2.8.4
Stable tag: 2.8.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.
......
(function(e,t){e.widget("ui.combobox",{version:"@VERSION",widgetEventPrefix:"combobox",uiCombo:null,uiInput:null,_wasOpen:false,_create:function(){var t=this,n=this.element.hide(),r,i;r=this.uiInput=e("<input />").insertAfter(n).addClass("ui-widget ui-widget-content ui-corner-left ui-combobox-input").val(n.children(":selected").text()).attr("tabindex",n.attr("tabindex"));i=this.uiCombo=r.wrap("<span>").parent().addClass("ui-combobox").insertAfter(n);r.autocomplete({delay:0,minLength:0,appendTo:i,source:e.proxy(this,"_linkSelectList")});e("<button>").attr("tabIndex",-1).attr("type","button").insertAfter(r).button({icons:{primary:"ui-icon-triangle-1-s"},text:false}).removeClass("ui-corner-all").addClass("ui-corner-right ui-button-icon ui-combobox-button");r.data("ui-autocomplete")._renderItem=function(t,n){return e("<li>").append(e("<a>").html(n.label)).appendTo(t)};this._on(this._events)},_linkSelectList:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(t.term),"i");n(this.element.children("option").map(function(){var n=e(this).text();if(this.value&&(!t.term||r.test(n))){var i={label:n,value:n,option:this};if(t.term){i.label=n.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+e.ui.autocomplete.escapeRegex(t.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")}return i}}))},_events:{"autocompletechange input":function(t,n){var r=e(t.currentTarget);var i=n.item?n.item.option:null;if(!n.item){var s=new RegExp("^"+e.ui.autocomplete.escapeRegex(r.val())+"$","i"),o=false,u=null,a=0,f=-1,l=-1,c=null;if(this.options.autofillsinglematch){u=new RegExp(e.ui.autocomplete.escapeRegex(r.val()),"i")}this.element.children("option").each(function(){var t=e(this).text();if(t.match(s)){this.selected=o=true;return false}if(u){f++;if(t.match(u)){a++;c=e(this);l=f}}});if(!o){if(a==1){i=c[0];i.selected=true;var h=c.text();r.val(h);r.data("ui-autocomplete").term=h;this.element.prop("selectedIndex",l);console.log("Found single match with '"+h+"'")}else{r.val("");r.data("ui-autocomplete").term="";this.element.prop("selectedIndex",-1)}}}this._trigger("change",t,{item:i})},"autocompleteselect input":function(e,t){t.item.option.selected=true;this._trigger("select",e,{item:t.item.option})},"autocompleteopen input":function(e,t){this.uiCombo.children(".ui-autocomplete").outerWidth(this.uiCombo.outerWidth(true))},"mousedown .ui-combobox-button":function(e){this._wasOpen=this.uiInput.autocomplete("widget").is(":visible")},"click .ui-combobox-button":function(e){this.uiInput.focus();if(this._wasOpen)return;this.uiInput.autocomplete("search","")}},value:function(e){var t=this.element,n=false,r;if(!arguments.length){r=t.children(":selected");return r.length>0?r.val():null}t.prop("selectedIndex",-1);t.children("option").each(function(){if(this.value==e){this.selected=n=true;return false}});if(n){this.uiInput.val(t.children(":selected").text())}else{this.uiInput.val("");this.element.prop("selectedIndex",-1)}},_destroy:function(){this.element.show();this.uiCombo.replaceWith(this.element)},widget:function(){return this.uiCombo},_getCreateEventData:function(){return{select:this.element,combo:this.uiCombo,input:this.uiInput}}})})(jQuery)
\ No newline at end of file
jQuery(document).ready(function(e){e("#settings-type").change(function(){var t=this.value;e(".notification-type").hide();e("#notification-"+t).show()});e(document).on("click",".notification-delete",function(t){t.preventDefault();var n=confirm(commonL10n.warnDelete);var r=e(this).parent().parent().parent().parent();var i=e(this).data("n_id");console.log(i);if(n){e.post(ajaxurl,{n_id:i,action:"nf_delete_notification"},function(t){e(r).css("background-color","#FF0000").fadeOut("slow",function(){e(this).remove()})})}});e(document).on("click",".notification-activate",function(t){t.preventDefault();var n=e(this).parent().parent().parent().parent();var r=e(this).data("action");var i=e(this).data("n_id");var s=this;e.post(ajaxurl,{n_id:i,activate_action:r,action:"nf_"+r+"_notification"},function(t){e(n).removeClass("nf-notification-active");e(n).removeClass("nf-notification-inactive");if(r=="activate"){e(n).addClass("nf-notification-active");e(s).html(nf_notifications.deactivate);e(s).data("action","deactivate")}else{e(n).addClass("nf-notification-inactive");e(s).html(nf_notifications.activate);e(s).data("action","activate")}})});e(".nf-tokenize").each(function(){var t=e(this).data("token-limit");var n=e(this).data("key");var r=e(this).data("type");e(this).tokenfield({autocomplete:{source:nf_notifications.search_fields[r],delay:100},tokens:nf_notifications.tokens[n],delimiter:["`"],showAutocompleteOnFocus:true,beautify:false,limit:t,createTokensOnBlur:true})});e(document).on("click",".nf-insert-field",function(t){t.preventDefault();var n=e(this).prev().prev(".nf-fields-combobox").val();if(n!=""&&n!=null){var r="[ninja_forms_field id="+n+"]";window.parent.send_to_editor(r)}});e(document).on("click",".nf-insert-all-fields",function(e){e.preventDefault();var t="[ninja_forms_all_fields]";window.parent.send_to_editor(t)});e(".nf-fields-combobox").combobox();e(".ui-combobox-input").focus(function(t){var n=e(this).parent().prev(".nf-fields-combobox").val();if(n==""||n==null){this.value=""}else{e(this).select()}});e(".ui-combobox-input").mouseup(function(e){e.preventDefault()});e(".ui-combobox-input").blur(function(t){if(this.value==""){this.value=e(this).parent().prev(".nf-fields-combobox").data("first-option")}});e("#filter-type").change(function(t){if(this.value==""){var n=nf_notifications.filter_type}else{var n=nf_notifications.filter_type+"&type="+this.value}e(".spinner").show();document.location.href=n});e("#toggle_email_advanced").click(function(t){t.preventDefault();e("#email_advanced").toggle()})})
\ No newline at end of file
jQuery(document).ready(function(e){var t=e("#progressbar"),n=e(".progress-label");t.progressbar({value:false,change:function(){var e=parseInt(t.progressbar("value"));if(e==90){r.currentLabel=1}else if(e%10==0){r.changeTextLabel()}var i=r.getTextLabel();n.text(i+" "+t.progressbar("value")+"%")},complete:function(){n.text("Complete!")}});if(nfProcessingAction!="none"){var r={labels:{0:"Lacing Our Tabis",1:"Cleaning The Dojo",2:"Doing Splits",3:"Buffing Bo Staff",4:"Intimidating Gaze",5:"Sparring",6:"Packing Smoke Bombs",7:"Polishing Shuriken",8:"Throwing Sais",9:"Calling Our Mom",10:"Practicing Katas",11:"Swinging Nunchucks",12:"Sharpening Swords",13:"Ironing Ninja Gi",14:"Eating Breakfast",15:"Cutting Stuff",16:"Doing Dishes",17:"Climbing Walls"},getTextLabel:function(){var e=this.labels[this.currentLabel];return e},changeTextLabel:function(){var e=Object.keys(this.labels).length-1;var t=Math.floor(Math.random()*(e-2+1))+2;this.currentLabel=t},currentLabel:0};var i={setup:function(){this.interval=Math.floor(100/parseInt(this.totalSteps))},process:function(){e.post(ajaxurl,{step:this.step,total_steps:i.totalSteps,args:this.args,action:nfProcessingAction},function(n){n=e.parseJSON(n);i.step=n.step;i.totalSteps=n.total_steps;i.args=n.args;if(i.runSetup==1){i.setup();i.runSetup=0}if(!n.complete){i.progress();i.process()}else{t.progressbar("value",100);if(typeof n.redirect!="undefined"&&n.redirect!=""){document.location.href=n.redirect}}})},progress:function(){var e=t.progressbar("value")||0;t.progressbar("value",e+this.interval)},step:"loading",totalSteps:0,runSetup:1,interval:0,args:nfProcessingArgs};i.process()}})
\ No newline at end of file
jQuery(document).ready(function(e){var t={init:function(){e("#id-hide").parent().remove();var t=this;e(document).on("click",".hide-column-tog",t.save_hidden_columns)},save_hidden_columns:function(){var t=columns.hidden();e.post(ajaxurl,{form_id:nf_sub.form_id,hidden:t,action:"nf_hide_columns"})},move_row_actions:function(){e("#the-list tr").each(function(t){var n=e(this).find("td:visible").eq(0);if(typeof e(n).html()=="undefined"){n=e(this).find("td:first")}e(this).find("td div.row-actions").detach().appendTo(n)})}};t.init();e(".datepicker").datepicker({dateFormat:nf_sub.date_format});e(document).on("change",".nf-form-jump",function(t){e("#posts-filter").submit()});e(document).on("submit",function(t){e(".spinner").show();if(e('select[name="action"]').val()=="export"||e('select[name="action2"]').val()=="export"){setTimeout(function(){e("input:checkbox").attr("checked",false);e(".spinner").hide();e('select[name="action"]').val("-1");e('select[name="action2"]').val("-1")},2e3)}});e(".screen-options").prepend(e("#nf-subs-screen-options").html());e("#nf-subs-screen-options").remove()})
\ No newline at end of file
......@@ -267,7 +267,8 @@ class NF_Notification_Email extends NF_Notification_Base_Type
}
$message = $this->process_setting( $id, 'email_message' );
$message = $message[0];
if ( is_array ( $message ) )
$message = $message[0];
if ( $email_format != 'plain' )
$message = apply_filters( 'ninja_forms_admin_email_message_wpautop', wpautop( $message ) );
......
......@@ -260,9 +260,9 @@ class NF_Notifications
</select>
</td>
</tr>
</tbody>
<?php
do_action( 'nf_edit_notification_settings', $id );
foreach ( $this->get_types() as $slug => $nicename ) {
if ( $this_type == $slug ) {
$display = '';
......
......@@ -169,7 +169,6 @@ function ninja_forms_tab_form_list($form_id, $data){
$link = remove_query_arg( array( 'paged' ) );
$edit_link = esc_url( add_query_arg( array( 'tab' => 'form_settings', 'form_id' => $form_id ), $link ) );
$subs_link = admin_url( 'edit.php?post_status=all&post_type=nf_sub&action=-1&m=0&form_id=' . $form_id . '&paged=1&mode=list&action2=-1' );
$export_link = esc_url( add_query_arg( array( 'export_form' => 1, 'form_id' => $form_id ), $link ) );
$duplicate_link = esc_url( add_query_arg( array( 'duplicate_form' => 1, 'form_id' => $form_id ), $link ) );
$shortcode = apply_filters ( "ninja_forms_form_list_shortcode", "[ninja_forms_display_form id=" . $form_id . "]", $form_id );
$template_function = apply_filters ( "ninja_forms_form_list_template_function", "<pre>if( function_exists( 'ninja_forms_display_form' ) ){ ninja_forms_display_form( " . "$form_id" . " ); }</pre>", $form_id );
......@@ -185,7 +184,6 @@ function ninja_forms_tab_form_list($form_id, $data){
<div class="row-actions">
<span class="edit"><a href="<?php echo $edit_link;?>"><?php _e( 'Edit', 'ninja-forms' ); ?></a> | </span>
<span class="trash"><a class="ninja-forms-delete-form" title="<?php _e( 'Delete this form', 'ninja-forms' ); ?>" href="#" id="ninja_forms_delete_form_<?php echo $form_id;?>"><?php _e( 'Delete', 'ninja-forms' ); ?></a> | </span>
<span class="export"><a href="<?php echo $export_link;?>" title="<?php _e( 'Export Form', 'ninja-forms' ); ?>"><?php _e( 'Export', 'ninja-forms' ); ?></a> | </span>
<span class="duplicate"><a href="<?php echo $duplicate_link;?>" title="<?php _e( 'Duplicate Form', 'ninja-forms' ); ?>"><?php _e( 'Duplicate', 'ninja-forms' ); ?></a> | </span>
<span class="bleep"><?php echo ninja_forms_preview_link( $form_id ); ?> | </span>
<span class="subs"><a href="<?php echo $subs_link;?>" class="" title="<?php _e( 'View Submissions', 'ninja-forms' ); ?>"><?php _e( 'View Submissions', 'ninja-forms' ); ?></a></span>
......
......@@ -52,7 +52,7 @@ class NF_Convert_Notifications extends NF_Step_Processing {
// Remove old email settings.
nf_change_email_fav();
nf_update_email_field_settings();
nf_remove_old_email_settings();
// Get our total number of forms.
$form_count = nf_get_form_count();
......
......@@ -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.8.4
Version: 2.8.5
Author: The WP Ninjas
Author URI: http://ninjaforms.com
Text Domain: ninja-forms
......@@ -267,7 +267,7 @@ class Ninja_Forms {
// Plugin version
if ( ! defined( 'NF_PLUGIN_VERSION' ) )
define( 'NF_PLUGIN_VERSION', '2.8.4' );
define( 'NF_PLUGIN_VERSION', '2.8.5' );
// Plugin Folder Path
if ( ! defined( 'NF_PLUGIN_DIR' ) )
......@@ -297,7 +297,7 @@ class Ninja_Forms {
// Ninja Forms debug mode
if ( ! defined( 'NINJA_FORMS_JS_DEBUG' ) )
define( 'NINJA_FORMS_JS_DEBUG', true );
define( 'NINJA_FORMS_JS_DEBUG', false );
// Ninja Forms plugin directory
if ( ! defined( 'NINJA_FORMS_DIR' ) )
......
......@@ -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.8
Tested up to: 4.0
Stable tag: 2.8.4
Stable tag: 2.8.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,22 +76,13 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 2.8.4 (17 September 2014 ) =
*Changes:*
* Moving reply to, cc, and bcc to an advanced settings section for email notifications.
* Any field can now be inserted into the from name, address, to, subject, reply to, cc, and bcc fields.
* Added a custom short code parser that will prevent other plugins from tampering with email and success message ninja forms short codes.
= 2.8.5 (23 September 2014 ) =
*Bugs:*
* Fixed an issue where short codes were being parsed in the admin.
* Fixed a bug that could cause phantom emails to be sent to users who filled out forms.
* Settings labels should now populate correctly upon activation.
* New installs should not see upgrade notices.
* Favourite fields can now be removed properly in all installations.
* Fixed PHP notices.
* Fixed a bug with notifications that could prevent notifciations from converting properly in some instances.
* Fixed a bug with changing email message content via the filter.
* Properly included minified JS files.
*Security:*
......
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