Commit 17d1d07b authored by Eric Windham's avatar Eric Windham

changes to iFrame url and fixed deprecated warnings

parent cba9fb03
......@@ -7,7 +7,8 @@
var el = element.createElement, // function to create elements
// TextControl = blocks.InspectorControls.TextControl, // not needed
SelectControl = blocks.InspectorControls.SelectControl, // select control
SelectControl = components.SelectControl, // select control
InspectorControls = blocks.InspectorControls, // sidebar controls
Sandbox = components.Sandbox; // needed to register the block
......@@ -49,7 +50,7 @@
return [
el( 'div', { className: 'nf-iframe-container' },
el( 'div', { className: 'nf-iframe-overlay' } ),
el( 'iframe', { src: '/?nf_preview_form=' + formID + '&nf_iframe', height: '0', width: '500' })
el( 'iframe', { src: ninjaFormsBlock.siteUrl + '?nf_preview_form=' + formID + '&nf_iframe', height: '0', width: '500' })
),
!! focus && inspectorControls
];
......
......@@ -21,7 +21,6 @@ class NF_FormBlock {
function nf_form_block() {
$js_dir = Ninja_Forms::$url . 'assets/js/min/';
$css_dir = Ninja_Forms::$url . 'assets/css/';
......@@ -56,8 +55,10 @@ class NF_FormBlock {
'label' => $form->get_setting( 'title' ),
];
}
wp_localize_script( 'ninja-forms-block', 'ninjaFormsBlock', array(
'forms' => $forms,
'siteUrl' => get_site_url()
) );
wp_enqueue_style( 'ninja-forms-block-style' );
wp_enqueue_style( 'ninja-forms-block-editor' );
......
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