Commit d9eb7f7c authored by Kevin Stover's avatar Kevin Stover

Fixing a bug with multiple imports and builder link errors.

parent 149f8fd3
Pipeline #537 passed with stage
in 1 minute and 29 seconds
......@@ -32,9 +32,8 @@ jQuery( document ).ready( function( $ ) {
// If we don't get back a form ID, then bail.
if ( 'undefined' == typeof response.form_id ) return false;
jQuery( '#nf-import-file' ).val('');
var url = jQuery( '#nf-import-url' ).attr( 'href' );
jQuery( '#nf-import-url' ).attr( 'href', url + response.form_id );
jQuery( '#nf-import-file' ).val('');;
jQuery( '#nf-import-url' ).attr( 'href', nfAdmin.builderURL + response.form_id );
jQuery( '#row-nf-import-response' ).show();
}
}
......
......@@ -162,13 +162,14 @@ final class NF_Admin_Menus_ImportExport extends NF_Abstracts_Submenu
wp_enqueue_script( 'ninja_forms_admin_import_export' );
wp_localize_script( 'ninja_forms_admin_import_export', 'nfAdmin', array(
'ajax_url' => admin_url( 'admin-ajax.php' ),
'batchNonce' => wp_create_nonce( 'ninja_forms_batch_nonce' ),
'i18n' => array(
'trashExpiredSubsMessage' => __( 'Are you sure you want to trash all expired submissions?', 'ninja-forms' ),
'trashExpiredSubsButtonPrimary' => __( 'Trash', 'ninja-forms' ),
'trashExpiredSubsButtonSecondary' => __( 'Cancel', 'ninja-forms' ),
'ajax_url' => admin_url( 'admin-ajax.php' ),
'batchNonce' => wp_create_nonce( 'ninja_forms_batch_nonce' ),
'i18n' => array(
'trashExpiredSubsMessage' => __( 'Are you sure you want to trash all expired submissions?', 'ninja-forms' ),
'trashExpiredSubsButtonPrimary' => __( 'Trash', 'ninja-forms' ),
'trashExpiredSubsButtonSecondary' => __( 'Cancel', 'ninja-forms' ),
),
'builderURL' => admin_url( 'admin.php?page=ninja-forms&form_id=' ),
));
wp_enqueue_script( 'jBox', Ninja_Forms::$url . 'assets/js/lib/jBox.min.js', array( 'jquery' ) );
......
......@@ -3,7 +3,7 @@
<tbody>
<tr id="row-nf-import-response" style="display:none;background-color:#ffc;">
<th></th>
<td><?php printf( __( 'Form Imported Successfully. %sView Form%s', 'ninja-forms' ), '<a id="nf-import-url" href="' . admin_url( 'admin.php?page=ninja-forms&form_id=' ) . '">', '</a>' ); ?></td>
<td><?php printf( __( 'Form Imported Successfully. %sView Form%s', 'ninja-forms' ), '<a id="nf-import-url" href="#">', '</a>' ); ?></td>
</tr>
<tr id="row_nf_import_form">
<th scope="row">
......
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