Version Description
- New: Added a new applications page for displaying available Formidable application templates.
- New: Imported views and pages with [formidable] and [display-frm-data] shortcodes will now replace old form and view ids with the new imported ids.
- New: Imported forms will now replace the old field ids with new field ids when the id is used in a field_id shortcode option.
- Fix: Field id values were not always properly updating when duplicating a form depending on the order of the fields.
Download this release
Release Info
Developer | formidableforms |
Plugin | Formidable Forms – Form Builder for WordPress |
Version | 5.3 |
Comparing to | |
See all releases |
Code changes from version 5.2.07 to 5.3
- classes/controllers/FrmAddonsController.php +3 -0
- classes/controllers/FrmAppController.php +76 -97
- classes/controllers/FrmApplicationsController.php +154 -0
- classes/controllers/FrmFormsController.php +34 -6
- classes/controllers/FrmHooksController.php +5 -0
- classes/controllers/FrmXMLController.php +9 -2
- classes/helpers/FrmAppHelper.php +42 -31
- classes/helpers/FrmFieldsHelper.php +4 -0
- classes/helpers/FrmXMLHelper.php +139 -5
- classes/models/FrmAddon.php +3 -0
- classes/models/FrmApplicationApi.php +29 -0
- classes/models/FrmApplicationTemplate.php +202 -0
- classes/models/FrmForm.php +67 -0
- classes/views/applications/header.php +35 -0
- classes/views/applications/index.php +10 -0
- classes/views/frm-entries/no_entries.php +2 -2
- classes/views/frm-forms/_embed_form_icons.php +1 -19
- classes/views/frm-forms/_no_forms.php +2 -2
- classes/views/frm-forms/_publish_box.php +0 -2
- classes/views/frm-forms/list.php +0 -1
- classes/views/frm-forms/new-form-overlay.php +4 -11
- classes/views/shared/add-button.php +9 -0
- classes/views/shared/edit-page-js.php +61 -0
- classes/views/shared/views-info.php +1 -1
- classes/views/xml/posts_xml.php +1 -1
- classes/views/xml/xml.php +14 -4
- css/admin/applications.css +271 -0
- css/admin/frm_admin_global.css +9 -0
- css/frm_admin.css +108 -49
- formidable.php +1 -1
- images/applications/custom-applications.svg +1 -0
- images/applications/folder.svg +1 -0
- images/applications/placeholder.png +0 -0
- images/applications/thumbnails/business-hours.png +0 -0
- images/applications/thumbnails/faq-template-wordpress.png +0 -0
- images/applications/thumbnails/placeholder.svg +1 -0
- images/applications/thumbnails/product-review.png +0 -0
- images/applications/thumbnails/real-estate-listings.png +0 -0
- images/applications/thumbnails/restaurant-menu.png +0 -0
- images/applications/thumbnails/team-directory.png +0 -0
- images/applications/toolbar.png +0 -0
- js/admin/applications.js +497 -0
- js/admin/dom.js +534 -0
- js/admin/embed.js +504 -0
- js/formidable_admin.js +142 -676
- languages/formidable.pot +734 -667
- readme.txt +8 -2
classes/controllers/FrmAddonsController.php
CHANGED
@@ -10,6 +10,9 @@ class FrmAddonsController {
|
|
10 |
*/
|
11 |
protected static $plugin;
|
12 |
|
|
|
|
|
|
|
13 |
public static function menu() {
|
14 |
if ( ! current_user_can( 'activate_plugins' ) ) {
|
15 |
return;
|
10 |
*/
|
11 |
protected static $plugin;
|
12 |
|
13 |
+
/**
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
public static function menu() {
|
17 |
if ( ! current_user_can( 'activate_plugins' ) ) {
|
18 |
return;
|
classes/controllers/FrmAppController.php
CHANGED
@@ -98,16 +98,26 @@ class FrmAppController {
|
|
98 |
'formidable-styles2',
|
99 |
'formidable-inbox',
|
100 |
'formidable-welcome',
|
|
|
101 |
);
|
102 |
|
103 |
$get_page = FrmAppHelper::simple_get( 'page', 'sanitize_title' );
|
104 |
-
$is_white_page = in_array( $get_page, $white_pages );
|
105 |
|
106 |
if ( ! $is_white_page ) {
|
107 |
$screen = get_current_screen();
|
108 |
$is_white_page = ( $screen && strpos( $screen->id, 'frm_display' ) !== false );
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
return $is_white_page;
|
112 |
}
|
113 |
|
@@ -254,10 +264,20 @@ class FrmAppController {
|
|
254 |
* @since 3.04.02
|
255 |
*/
|
256 |
public static function include_upgrade_overlay() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
wp_enqueue_script( 'jquery-ui-dialog' );
|
258 |
wp_enqueue_style( 'jquery-ui-dialog' );
|
259 |
-
|
260 |
-
add_action( 'admin_footer', 'FrmAppController::upgrade_overlay_html' );
|
261 |
}
|
262 |
|
263 |
/**
|
@@ -330,14 +350,12 @@ class FrmAppController {
|
|
330 |
}
|
331 |
|
332 |
public static function include_info_overlay() {
|
333 |
-
|
334 |
-
wp_enqueue_style( 'jquery-ui-dialog' );
|
335 |
-
|
336 |
add_action( 'admin_footer', 'FrmAppController::info_overlay_html' );
|
337 |
}
|
338 |
|
339 |
public static function info_overlay_html() {
|
340 |
-
include
|
341 |
}
|
342 |
|
343 |
/**
|
@@ -441,10 +459,30 @@ class FrmAppController {
|
|
441 |
* @return void
|
442 |
*/
|
443 |
public static function admin_js() {
|
444 |
-
$
|
|
|
|
|
445 |
FrmAppHelper::load_admin_wide_js();
|
446 |
|
447 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
'formidable_admin_global',
|
449 |
'jquery',
|
450 |
'jquery-ui-core',
|
@@ -453,20 +491,18 @@ class FrmAppController {
|
|
453 |
'bootstrap_tooltip',
|
454 |
'bootstrap-multiselect',
|
455 |
'wp-i18n',
|
|
|
|
|
456 |
);
|
457 |
|
458 |
if ( FrmAppHelper::is_admin_page( 'formidable-styles' ) || FrmAppHelper::is_admin_page( 'formidable-styles2' ) ) {
|
459 |
-
$
|
460 |
}
|
461 |
|
462 |
-
|
463 |
-
wp_register_script( 'formidable_admin', FrmAppHelper::plugin_url() . '/js/formidable_admin.js', $dependecies, $version, true );
|
464 |
-
wp_register_style( 'formidable-admin', FrmAppHelper::plugin_url() . '/css/frm_admin.css', array(), $version );
|
465 |
-
wp_register_script( 'bootstrap_tooltip', FrmAppHelper::plugin_url() . '/js/bootstrap.min.js', array( 'jquery', 'popper' ), '4.6.1', true );
|
466 |
-
wp_register_style( 'formidable-grids', FrmAppHelper::plugin_url() . '/css/frm_grids.css', array(), $version );
|
467 |
|
468 |
-
if ( 'formidable' ===
|
469 |
-
$action = FrmAppHelper::get_param( 'frm_action'
|
470 |
$is_form_index = ! $action || in_array( $action, array( 'list', 'trash' ), true );
|
471 |
if ( $is_form_index ) {
|
472 |
// For the existing page dropdown in the Form embed modal.
|
@@ -474,9 +510,8 @@ class FrmAppController {
|
|
474 |
}
|
475 |
}
|
476 |
|
477 |
-
wp_register_script( 'bootstrap-multiselect',
|
478 |
|
479 |
-
$page = FrmAppHelper::simple_get( 'page', 'sanitize_title' );
|
480 |
$post_type = FrmAppHelper::simple_get( 'post_type', 'sanitize_title' );
|
481 |
|
482 |
global $pagenow;
|
@@ -486,6 +521,7 @@ class FrmAppController {
|
|
486 |
wp_enqueue_style( 'widgets' );
|
487 |
self::maybe_deregister_popper2();
|
488 |
wp_enqueue_script( 'formidable_admin' );
|
|
|
489 |
FrmAppHelper::localize_script( 'admin' );
|
490 |
|
491 |
wp_enqueue_style( 'formidable-admin' );
|
@@ -564,7 +600,7 @@ class FrmAppController {
|
|
564 |
}
|
565 |
|
566 |
/**
|
567 |
-
* Automatically insert a Formidable block when loading Gutenberg
|
568 |
*
|
569 |
* @since 5.2
|
570 |
*
|
@@ -581,73 +617,16 @@ class FrmAppController {
|
|
581 |
return;
|
582 |
}
|
583 |
|
584 |
-
|
585 |
-
|
586 |
-
( function() {
|
587 |
-
const handleDomReady = () => {
|
588 |
-
if ( 'undefined' === typeof wp || 'undefined' === typeof wp.data || 'function' !== typeof wp.data.subscribe ) {
|
589 |
-
return;
|
590 |
-
}
|
591 |
-
|
592 |
-
const closeListener = wp.data.subscribe(
|
593 |
-
() => {
|
594 |
-
const editor = wp.data.select( 'core/editor' );
|
595 |
-
|
596 |
-
if ( 'function' !== typeof editor.__unstableIsEditorReady ) {
|
597 |
-
closeListener();
|
598 |
-
return;
|
599 |
-
}
|
600 |
-
|
601 |
-
const isReady = editor.__unstableIsEditorReady();
|
602 |
-
if ( isReady ) {
|
603 |
-
closeListener();
|
604 |
-
requestAnimationFrame( () => injectFormidableBlock() );
|
605 |
-
}
|
606 |
-
}
|
607 |
-
);
|
608 |
-
}
|
609 |
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
}
|
618 |
-
);
|
619 |
-
|
620 |
-
const getBlocks = () => wp.data.select( 'core/editor' ).getBlocks();
|
621 |
-
const blockList = getBlocks();
|
622 |
-
|
623 |
-
const closeListener = wp.data.subscribe(
|
624 |
-
() => {
|
625 |
-
const currentBlocks = getBlocks();
|
626 |
-
if ( currentBlocks === blockList ) {
|
627 |
-
return;
|
628 |
-
}
|
629 |
-
|
630 |
-
closeListener();
|
631 |
-
const block = currentBlocks[ currentBlocks.length - 1 ];
|
632 |
-
const interval = setInterval(
|
633 |
-
() => {
|
634 |
-
const scrollTarget = document.getElementById( 'block-' + block.clientId );
|
635 |
-
const form = scrollTarget.querySelector( 'form' );
|
636 |
-
if ( form ) {
|
637 |
-
scrollTarget.scrollIntoView({ behavior: 'smooth' });
|
638 |
-
clearInterval( interval );
|
639 |
-
}
|
640 |
-
},
|
641 |
-
50
|
642 |
-
);
|
643 |
-
}
|
644 |
-
);
|
645 |
-
|
646 |
-
wp.data.dispatch( 'core/block-editor' ).insertBlocks( insertedBlock );
|
647 |
-
};
|
648 |
-
}() );
|
649 |
-
</script>
|
650 |
-
<?php
|
651 |
}
|
652 |
|
653 |
public static function load_lang() {
|
@@ -815,17 +794,6 @@ class FrmAppController {
|
|
815 |
return $text;
|
816 |
}
|
817 |
|
818 |
-
/**
|
819 |
-
* Include icons on page for Embed Form modal.
|
820 |
-
*
|
821 |
-
* @since 5.2
|
822 |
-
*
|
823 |
-
* @return void
|
824 |
-
*/
|
825 |
-
public static function include_embed_form_icons() {
|
826 |
-
require_once FrmAppHelper::plugin_path() . '/classes/views/frm-forms/_embed_form_icons.php';
|
827 |
-
}
|
828 |
-
|
829 |
/**
|
830 |
* @deprecated 1.07.05
|
831 |
* @codeCoverageIgnore
|
@@ -867,4 +835,15 @@ class FrmAppController {
|
|
867 |
public static function page_route( $content ) {
|
868 |
return FrmDeprecated::page_route( $content );
|
869 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
870 |
}
|
98 |
'formidable-styles2',
|
99 |
'formidable-inbox',
|
100 |
'formidable-welcome',
|
101 |
+
'formidable-applications',
|
102 |
);
|
103 |
|
104 |
$get_page = FrmAppHelper::simple_get( 'page', 'sanitize_title' );
|
105 |
+
$is_white_page = in_array( $get_page, $white_pages, true );
|
106 |
|
107 |
if ( ! $is_white_page ) {
|
108 |
$screen = get_current_screen();
|
109 |
$is_white_page = ( $screen && strpos( $screen->id, 'frm_display' ) !== false );
|
110 |
}
|
111 |
|
112 |
+
/**
|
113 |
+
* Allow another add on to style a page as a Formidable "white page", which adds a white background color.
|
114 |
+
*
|
115 |
+
* @since 5.3
|
116 |
+
*
|
117 |
+
* @param bool $is_white_page
|
118 |
+
*/
|
119 |
+
$is_white_page = apply_filters( 'frm_is_white_page', $is_white_page );
|
120 |
+
|
121 |
return $is_white_page;
|
122 |
}
|
123 |
|
264 |
* @since 3.04.02
|
265 |
*/
|
266 |
public static function include_upgrade_overlay() {
|
267 |
+
self::enqueue_dialog_assets();
|
268 |
+
add_action( 'admin_footer', 'FrmAppController::upgrade_overlay_html' );
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Enqueue scripts and styles required for modals.
|
273 |
+
*
|
274 |
+
* @since 5.3
|
275 |
+
*
|
276 |
+
* @return void
|
277 |
+
*/
|
278 |
+
public static function enqueue_dialog_assets() {
|
279 |
wp_enqueue_script( 'jquery-ui-dialog' );
|
280 |
wp_enqueue_style( 'jquery-ui-dialog' );
|
|
|
|
|
281 |
}
|
282 |
|
283 |
/**
|
350 |
}
|
351 |
|
352 |
public static function include_info_overlay() {
|
353 |
+
self::enqueue_dialog_assets();
|
|
|
|
|
354 |
add_action( 'admin_footer', 'FrmAppController::info_overlay_html' );
|
355 |
}
|
356 |
|
357 |
public static function info_overlay_html() {
|
358 |
+
include FrmAppHelper::plugin_path() . '/classes/views/shared/info-overlay.php';
|
359 |
}
|
360 |
|
361 |
/**
|
459 |
* @return void
|
460 |
*/
|
461 |
public static function admin_js() {
|
462 |
+
$plugin_url = FrmAppHelper::plugin_url();
|
463 |
+
$version = FrmAppHelper::plugin_version();
|
464 |
+
|
465 |
FrmAppHelper::load_admin_wide_js();
|
466 |
|
467 |
+
wp_register_style( 'formidable_admin_global', $plugin_url . '/css/admin/frm_admin_global.css', array(), $version );
|
468 |
+
wp_enqueue_style( 'formidable_admin_global' );
|
469 |
+
|
470 |
+
wp_register_style( 'formidable-admin', $plugin_url . '/css/frm_admin.css', array(), $version );
|
471 |
+
wp_register_style( 'formidable-grids', $plugin_url . '/css/frm_grids.css', array(), $version );
|
472 |
+
|
473 |
+
wp_register_script( 'formidable_dom', $plugin_url . '/js/admin/dom.js', array( 'jquery', 'jquery-ui-dialog', 'wp-i18n' ), $version, true );
|
474 |
+
wp_register_script( 'formidable_embed', $plugin_url . '/js/admin/embed.js', array( 'formidable_dom', 'jquery-ui-autocomplete' ), $version, true );
|
475 |
+
self::register_popper1();
|
476 |
+
wp_register_script( 'bootstrap_tooltip', $plugin_url . '/js/bootstrap.min.js', array( 'jquery', 'popper' ), '4.6.1', true );
|
477 |
+
|
478 |
+
$page = FrmAppHelper::simple_get( 'page', 'sanitize_title' );
|
479 |
+
|
480 |
+
if ( 'formidable-applications' === $page ) {
|
481 |
+
FrmApplicationsController::load_assets();
|
482 |
+
return;
|
483 |
+
}
|
484 |
+
|
485 |
+
$dependencies = array(
|
486 |
'formidable_admin_global',
|
487 |
'jquery',
|
488 |
'jquery-ui-core',
|
491 |
'bootstrap_tooltip',
|
492 |
'bootstrap-multiselect',
|
493 |
'wp-i18n',
|
494 |
+
'formidable_dom',
|
495 |
+
'formidable_embed',
|
496 |
);
|
497 |
|
498 |
if ( FrmAppHelper::is_admin_page( 'formidable-styles' ) || FrmAppHelper::is_admin_page( 'formidable-styles2' ) ) {
|
499 |
+
$dependencies[] = 'wp-color-picker';
|
500 |
}
|
501 |
|
502 |
+
wp_register_script( 'formidable_admin', $plugin_url . '/js/formidable_admin.js', $dependencies, $version, true );
|
|
|
|
|
|
|
|
|
503 |
|
504 |
+
if ( 'formidable' === $page ) {
|
505 |
+
$action = FrmAppHelper::get_param( 'frm_action' );
|
506 |
$is_form_index = ! $action || in_array( $action, array( 'list', 'trash' ), true );
|
507 |
if ( $is_form_index ) {
|
508 |
// For the existing page dropdown in the Form embed modal.
|
510 |
}
|
511 |
}
|
512 |
|
513 |
+
wp_register_script( 'bootstrap-multiselect', $plugin_url . '/js/bootstrap-multiselect.js', array( 'jquery', 'bootstrap_tooltip', 'popper' ), '1.1.1', true );
|
514 |
|
|
|
515 |
$post_type = FrmAppHelper::simple_get( 'post_type', 'sanitize_title' );
|
516 |
|
517 |
global $pagenow;
|
521 |
wp_enqueue_style( 'widgets' );
|
522 |
self::maybe_deregister_popper2();
|
523 |
wp_enqueue_script( 'formidable_admin' );
|
524 |
+
wp_enqueue_script( 'formidable_embed' );
|
525 |
FrmAppHelper::localize_script( 'admin' );
|
526 |
|
527 |
wp_enqueue_style( 'formidable-admin' );
|
600 |
}
|
601 |
|
602 |
/**
|
603 |
+
* Automatically insert a Formidable block when loading Gutenberg when $_GET['frmForm' is set.
|
604 |
*
|
605 |
* @since 5.2
|
606 |
*
|
617 |
return;
|
618 |
}
|
619 |
|
620 |
+
self::add_js_to_inject_gutenberg_block( 'formidable/simple-form', 'formId', $form_id );
|
621 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
|
623 |
+
/**
|
624 |
+
* @since 5.3
|
625 |
+
*
|
626 |
+
* @return void
|
627 |
+
*/
|
628 |
+
public static function add_js_to_inject_gutenberg_block( $block_name, $object_key, $object_id ) {
|
629 |
+
require FrmAppHelper::plugin_path() . '/classes/views/shared/edit-page-js.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
630 |
}
|
631 |
|
632 |
public static function load_lang() {
|
794 |
return $text;
|
795 |
}
|
796 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
/**
|
798 |
* @deprecated 1.07.05
|
799 |
* @codeCoverageIgnore
|
835 |
public static function page_route( $content ) {
|
836 |
return FrmDeprecated::page_route( $content );
|
837 |
}
|
838 |
+
|
839 |
+
/**
|
840 |
+
* Include icons on page for Embed Form modal.
|
841 |
+
*
|
842 |
+
* @since 5.2
|
843 |
+
*
|
844 |
+
* @return void
|
845 |
+
*/
|
846 |
+
public static function include_embed_form_icons() {
|
847 |
+
_deprecated_function( __METHOD__, '5.3' );
|
848 |
+
}
|
849 |
}
|
classes/controllers/FrmApplicationsController.php
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* @since 5.3
|
8 |
+
*/
|
9 |
+
class FrmApplicationsController {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Add Applications menu item to sidebar and define Applications index page.
|
13 |
+
*
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
public static function menu() {
|
17 |
+
$label = __( 'Applications', 'formidable' );
|
18 |
+
$new_pill = '<span class="frm-new-pill">NEW</span>';
|
19 |
+
add_submenu_page( 'formidable', 'Formidable | ' . $label, $label . $new_pill, 'frm_edit_forms', 'formidable-applications', array( __CLASS__, 'landing_page' ) );
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Render Applications index page.
|
24 |
+
*
|
25 |
+
* @return void
|
26 |
+
*/
|
27 |
+
public static function landing_page() {
|
28 |
+
require self::get_view_path() . 'index.php';
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get path to application views.
|
33 |
+
*
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
private static function get_view_path() {
|
37 |
+
return FrmAppHelper::plugin_path() . '/classes/views/applications/';
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Get information about applications via AJAX action.
|
42 |
+
*
|
43 |
+
* @return void
|
44 |
+
*/
|
45 |
+
public static function get_applications_data() {
|
46 |
+
FrmAppHelper::permission_check( 'frm_edit_forms' );
|
47 |
+
|
48 |
+
$view = FrmAppHelper::get_param( 'view', '', 'get', 'sanitize_text_field' );
|
49 |
+
$data = array();
|
50 |
+
if ( 'applications' !== $view ) {
|
51 |
+
// view may be 'applications', 'templates', or empty.
|
52 |
+
$data['templates'] = self::get_prepared_template_data();
|
53 |
+
$data['categories'] = FrmApplicationTemplate::get_categories();
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @param array $data
|
58 |
+
*/
|
59 |
+
$data = apply_filters( 'frm_applications_data', $data );
|
60 |
+
|
61 |
+
wp_send_json_success( $data );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Retrieve API data and return a reduced set back with some restructuring applied to make it easier to read.
|
66 |
+
*
|
67 |
+
* @return array<array>
|
68 |
+
*/
|
69 |
+
private static function get_prepared_template_data() {
|
70 |
+
$api = new FrmApplicationApi();
|
71 |
+
$applications = $api->get_api_info();
|
72 |
+
$applications = array_filter( $applications, 'is_array' );
|
73 |
+
$applications = self::sort_templates( $applications );
|
74 |
+
|
75 |
+
FrmApplicationTemplate::init();
|
76 |
+
|
77 |
+
return array_reduce( $applications, array( __CLASS__, 'reduce_template' ), array() );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @param array $total the accumulated array of reduced application data.
|
82 |
+
* @param array $current data for the current template from the API.
|
83 |
+
* @return array<array>
|
84 |
+
*/
|
85 |
+
private static function reduce_template( $total, $current ) {
|
86 |
+
$template = new FrmApplicationTemplate( $current );
|
87 |
+
$total[] = $template->as_js_object();
|
88 |
+
return $total;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Sort applications alphabetically.
|
93 |
+
*
|
94 |
+
* @param array<array> $applications
|
95 |
+
* @return array<array>
|
96 |
+
*/
|
97 |
+
private static function sort_templates( $applications ) {
|
98 |
+
usort(
|
99 |
+
$applications,
|
100 |
+
function( $a, $b ) {
|
101 |
+
return strcmp( $a['name'], $b['name'] );
|
102 |
+
}
|
103 |
+
);
|
104 |
+
return $applications;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @return void
|
109 |
+
*/
|
110 |
+
public static function load_assets() {
|
111 |
+
$plugin_url = FrmAppHelper::plugin_url();
|
112 |
+
$version = FrmAppHelper::plugin_version();
|
113 |
+
|
114 |
+
wp_enqueue_style( 'formidable-admin' );
|
115 |
+
wp_enqueue_style( 'formidable-grids' );
|
116 |
+
|
117 |
+
$js_dependencies = array(
|
118 |
+
'wp-i18n',
|
119 |
+
'formidable_dom',
|
120 |
+
);
|
121 |
+
wp_register_script( 'formidable_applications', $plugin_url . '/js/admin/applications.js', $js_dependencies, $version, true );
|
122 |
+
wp_register_style( 'formidable_applications', $plugin_url . '/css/admin/applications.css', array(), $version );
|
123 |
+
|
124 |
+
$js_vars = array(
|
125 |
+
'proUpgradeUrl' => FrmAppHelper::admin_upgrade_link( 'applications' ),
|
126 |
+
);
|
127 |
+
wp_localize_script( 'formidable_applications', 'frmApplicationsVars', $js_vars );
|
128 |
+
|
129 |
+
wp_enqueue_script( 'formidable_applications' );
|
130 |
+
wp_enqueue_style( 'formidable_applications' );
|
131 |
+
|
132 |
+
do_action( 'frm_applications_assets' );
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* @return void
|
137 |
+
*/
|
138 |
+
public static function dequeue_scripts() {
|
139 |
+
if ( 'formidable-applications' === FrmAppHelper::simple_get( 'page', 'sanitize_title' ) ) {
|
140 |
+
// Avoid extra scripts loading on applications index that aren't needed.
|
141 |
+
wp_dequeue_script( 'frm-surveys-admin' );
|
142 |
+
wp_dequeue_script( 'frm-quizzes-form-action' );
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* @param string $title
|
148 |
+
* @param string $context values include 'index', 'list', and 'edit'.
|
149 |
+
* @return void
|
150 |
+
*/
|
151 |
+
public static function render_applications_header( $title, $context ) {
|
152 |
+
require self::get_view_path() . 'header.php';
|
153 |
+
}
|
154 |
+
}
|
classes/controllers/FrmFormsController.php
CHANGED
@@ -572,6 +572,12 @@ class FrmFormsController {
|
|
572 |
);
|
573 |
|
574 |
$form_id = FrmForm::create( $new_values );
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
|
576 |
self::create_default_email_action( $form_id );
|
577 |
|
@@ -2337,15 +2343,23 @@ class FrmFormsController {
|
|
2337 |
|
2338 |
check_ajax_referer( 'frm_ajax', 'nonce' );
|
2339 |
|
2340 |
-
$
|
2341 |
-
if ( ! $
|
2342 |
die( 0 );
|
2343 |
}
|
2344 |
|
2345 |
-
$
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2349 |
|
2350 |
$name = FrmAppHelper::get_post_param( 'name', '', 'sanitize_text_field' );
|
2351 |
if ( $name ) {
|
@@ -2364,6 +2378,20 @@ class FrmFormsController {
|
|
2364 |
);
|
2365 |
}
|
2366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2367 |
/**
|
2368 |
* Get page dropdown for AJAX request for embedding form in an existing page.
|
2369 |
*
|
572 |
);
|
573 |
|
574 |
$form_id = FrmForm::create( $new_values );
|
575 |
+
/**
|
576 |
+
* @since 5.3
|
577 |
+
*
|
578 |
+
* @param int $form_id
|
579 |
+
*/
|
580 |
+
do_action( 'frm_build_new_form', $form_id );
|
581 |
|
582 |
self::create_default_email_action( $form_id );
|
583 |
|
2343 |
|
2344 |
check_ajax_referer( 'frm_ajax', 'nonce' );
|
2345 |
|
2346 |
+
$type = FrmAppHelper::get_post_param( 'type', '', 'sanitize_text_field' );
|
2347 |
+
if ( ! $type || ! in_array( $type, array( 'form', 'view' ), true ) ) {
|
2348 |
die( 0 );
|
2349 |
}
|
2350 |
|
2351 |
+
$object_id = FrmAppHelper::get_post_param( 'object_id', '', 'absint' );
|
2352 |
+
if ( ! $object_id ) {
|
2353 |
+
die( 0 );
|
2354 |
+
}
|
2355 |
+
|
2356 |
+
$postarr = array( 'post_type' => 'page' );
|
2357 |
+
|
2358 |
+
if ( 'form' === $type ) {
|
2359 |
+
$postarr['post_content'] = self::get_page_shortcode_content_for_form( $object_id );
|
2360 |
+
} else {
|
2361 |
+
$postarr['post_content'] = apply_filters( 'frm_create_page_with_' . $type . '_shortcode_content', '', $object_id );
|
2362 |
+
}
|
2363 |
|
2364 |
$name = FrmAppHelper::get_post_param( 'name', '', 'sanitize_text_field' );
|
2365 |
if ( $name ) {
|
2378 |
);
|
2379 |
}
|
2380 |
|
2381 |
+
/**
|
2382 |
+
* @since 5.3
|
2383 |
+
*
|
2384 |
+
* @param string $content
|
2385 |
+
* @param int $form_id
|
2386 |
+
* @return string
|
2387 |
+
*/
|
2388 |
+
private static function get_page_shortcode_content_for_form( $form_id ) {
|
2389 |
+
$shortcode = '[formidable id="' . $form_id . '"]';
|
2390 |
+
$html_comment_start = '<!-- wp:formidable/simple-form {"formId":"' . $form_id . '"} -->';
|
2391 |
+
$html_comment_end = '<!-- /wp:formidable/simple-form -->';
|
2392 |
+
return $html_comment_start . '<div>' . $shortcode . '</div>' . $html_comment_end;
|
2393 |
+
}
|
2394 |
+
|
2395 |
/**
|
2396 |
* Get page dropdown for AJAX request for embedding form in an existing page.
|
2397 |
*
|
classes/controllers/FrmHooksController.php
CHANGED
@@ -164,6 +164,11 @@ class FrmHooksController {
|
|
164 |
|
165 |
add_action( 'admin_init', 'FrmUsageController::schedule_send' );
|
166 |
|
|
|
|
|
|
|
|
|
|
|
167 |
FrmSMTPController::load_hooks();
|
168 |
FrmWelcomeController::load_hooks();
|
169 |
new FrmPluginSearch();
|
164 |
|
165 |
add_action( 'admin_init', 'FrmUsageController::schedule_send' );
|
166 |
|
167 |
+
// Applications Controller.
|
168 |
+
add_action( 'admin_menu', 'FrmApplicationsController::menu', 14 ); // Use the same priority as styles so Applications appear directly under Styles.
|
169 |
+
add_action( 'admin_enqueue_scripts', 'FrmApplicationsController::dequeue_scripts', 15 );
|
170 |
+
add_action( 'wp_ajax_frm_get_applications_data', 'FrmApplicationsController::get_applications_data' );
|
171 |
+
|
172 |
FrmSMTPController::load_hooks();
|
173 |
FrmWelcomeController::load_hooks();
|
174 |
new FrmPluginSearch();
|
classes/controllers/FrmXMLController.php
CHANGED
@@ -486,7 +486,7 @@ class FrmXMLController {
|
|
486 |
header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
|
487 |
|
488 |
echo '<?xml version="1.0" encoding="' . esc_attr( get_bloginfo( 'charset' ) ) . "\" ?>\n";
|
489 |
-
include
|
490 |
}
|
491 |
|
492 |
private static function prepare_types_array( &$type ) {
|
@@ -508,6 +508,8 @@ class FrmXMLController {
|
|
508 |
*
|
509 |
* @since 3.06
|
510 |
*
|
|
|
|
|
511 |
* @return string
|
512 |
*/
|
513 |
private static function get_file_name( $args, $type, $records ) {
|
@@ -534,7 +536,12 @@ class FrmXMLController {
|
|
534 |
$filename = $sitename . 'formidable.' . gmdate( 'Y-m-d' ) . '.xml';
|
535 |
}
|
536 |
|
537 |
-
|
|
|
|
|
|
|
|
|
|
|
538 |
}
|
539 |
|
540 |
public static function generate_csv( $atts ) {
|
486 |
header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
|
487 |
|
488 |
echo '<?xml version="1.0" encoding="' . esc_attr( get_bloginfo( 'charset' ) ) . "\" ?>\n";
|
489 |
+
include FrmAppHelper::plugin_path() . '/classes/views/xml/xml.php';
|
490 |
}
|
491 |
|
492 |
private static function prepare_types_array( &$type ) {
|
508 |
*
|
509 |
* @since 3.06
|
510 |
*
|
511 |
+
* @param array $type
|
512 |
+
* @param array $records
|
513 |
* @return string
|
514 |
*/
|
515 |
private static function get_file_name( $args, $type, $records ) {
|
536 |
$filename = $sitename . 'formidable.' . gmdate( 'Y-m-d' ) . '.xml';
|
537 |
}
|
538 |
|
539 |
+
/**
|
540 |
+
* @since 5.3
|
541 |
+
*
|
542 |
+
* @param string $filename
|
543 |
+
*/
|
544 |
+
return apply_filters( 'frm_xml_filename', $filename );
|
545 |
}
|
546 |
|
547 |
public static function generate_csv( $atts ) {
|
classes/helpers/FrmAppHelper.php
CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
|
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
-
public static $plug_version = '5.
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
@@ -1022,7 +1022,7 @@ class FrmAppHelper {
|
|
1022 |
* @since 4.0.02
|
1023 |
*/
|
1024 |
public static function include_svg() {
|
1025 |
-
include_once
|
1026 |
}
|
1027 |
|
1028 |
/**
|
@@ -1085,29 +1085,37 @@ class FrmAppHelper {
|
|
1085 |
}
|
1086 |
|
1087 |
/**
|
|
|
|
|
1088 |
* @since 3.0
|
1089 |
-
* @param array $atts
|
|
|
|
|
|
|
|
|
|
|
|
|
1090 |
*/
|
1091 |
public static function add_new_item_link( $atts ) {
|
1092 |
-
if (
|
1093 |
-
?>
|
1094 |
-
<a href="<?php echo esc_url( $atts['new_link'] ); ?>" class="button button-primary frm-button-primary frm-with-plus">
|
1095 |
-
<?php self::icon_by_class( 'frmfont frm_plus_icon frm_svg15' ); ?>
|
1096 |
-
<?php esc_html_e( 'Add New', 'formidable' ); ?>
|
1097 |
-
</a>
|
1098 |
-
<?php
|
1099 |
-
} elseif ( ! empty( $atts['trigger_new_form_modal'] ) ) {
|
1100 |
-
?>
|
1101 |
-
<a href="#" class="button button-primary frm-button-primary frm-with-plus frm-trigger-new-form-modal">
|
1102 |
-
<?php
|
1103 |
-
self::icon_by_class( 'frmfont frm_plus_icon frm_svg15' );
|
1104 |
-
esc_html_e( 'Add New', 'formidable' );
|
1105 |
-
?>
|
1106 |
-
</a>
|
1107 |
-
<?php
|
1108 |
-
} elseif ( isset( $atts['link_hook'] ) ) {
|
1109 |
do_action( $atts['link_hook']['hook'], $atts['link_hook']['param'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1110 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
}
|
1112 |
|
1113 |
/**
|
@@ -1360,13 +1368,15 @@ class FrmAppHelper {
|
|
1360 |
* Hide the WordPress menus on some pages.
|
1361 |
*
|
1362 |
* @since 4.0
|
|
|
|
|
1363 |
*/
|
1364 |
public static function is_full_screen() {
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
}
|
1371 |
|
1372 |
/**
|
@@ -2675,12 +2685,13 @@ class FrmAppHelper {
|
|
2675 |
wp_register_script( 'formidable_admin_global', self::plugin_url() . '/js/formidable_admin_global.js', array( 'jquery' ), $version );
|
2676 |
|
2677 |
$global_strings = array(
|
2678 |
-
'updating_msg'
|
2679 |
-
'deauthorize'
|
2680 |
-
'url'
|
2681 |
-
'app_url'
|
2682 |
-
'
|
2683 |
-
'
|
|
|
2684 |
);
|
2685 |
wp_localize_script( 'formidable_admin_global', 'frmGlobal', $global_strings );
|
2686 |
|
11 |
/**
|
12 |
* @since 2.0
|
13 |
*/
|
14 |
+
public static $plug_version = '5.3';
|
15 |
|
16 |
/**
|
17 |
* @since 1.07.02
|
1022 |
* @since 4.0.02
|
1023 |
*/
|
1024 |
public static function include_svg() {
|
1025 |
+
include_once self::plugin_path() . '/images/icons.svg';
|
1026 |
}
|
1027 |
|
1028 |
/**
|
1085 |
}
|
1086 |
|
1087 |
/**
|
1088 |
+
* Render a button for a new item (Form, Application, etc).
|
1089 |
+
*
|
1090 |
* @since 3.0
|
1091 |
+
* @param array $atts {
|
1092 |
+
* @type array $link_hook Custom link hook, calls do_action and exits early.
|
1093 |
+
* @type string $new_link Href value, default #.
|
1094 |
+
* @type string $class Custom class names, space separated.
|
1095 |
+
* @type string $button_text Button text. Default "Add New".
|
1096 |
+
* }
|
1097 |
+
* @return void
|
1098 |
*/
|
1099 |
public static function add_new_item_link( $atts ) {
|
1100 |
+
if ( isset( $atts['link_hook'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1101 |
do_action( $atts['link_hook']['hook'], $atts['link_hook']['param'] );
|
1102 |
+
return;
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
$href = ! empty( $atts['new_link'] ) ? esc_url( $atts['new_link'] ) : '#';
|
1106 |
+
$class = 'button button-primary frm-button-primary frm-with-plus';
|
1107 |
+
|
1108 |
+
if ( ! empty( $atts['trigger_new_form_modal'] ) ) {
|
1109 |
+
$class .= ' frm-trigger-new-form-modal';
|
1110 |
}
|
1111 |
+
|
1112 |
+
if ( ! empty( $atts['class'] ) ) {
|
1113 |
+
$class .= ' ' . $atts['class'];
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
$button_text = ! empty( $atts['button_text'] ) ? $atts['button_text'] : __( 'Add New', 'formidable' );
|
1117 |
+
|
1118 |
+
require self::plugin_path() . '/classes/views/shared/add-button.php';
|
1119 |
}
|
1120 |
|
1121 |
/**
|
1368 |
* Hide the WordPress menus on some pages.
|
1369 |
*
|
1370 |
* @since 4.0
|
1371 |
+
*
|
1372 |
+
* @return bool
|
1373 |
*/
|
1374 |
public static function is_full_screen() {
|
1375 |
+
return self::is_form_builder_page() ||
|
1376 |
+
self::is_admin_page( 'formidable-styles' ) ||
|
1377 |
+
self::is_admin_page( 'formidable-styles2' ) ||
|
1378 |
+
self::simple_get( 'frm-full', 'absint' ) ||
|
1379 |
+
self::is_view_builder_page();
|
1380 |
}
|
1381 |
|
1382 |
/**
|
2685 |
wp_register_script( 'formidable_admin_global', self::plugin_url() . '/js/formidable_admin_global.js', array( 'jquery' ), $version );
|
2686 |
|
2687 |
$global_strings = array(
|
2688 |
+
'updating_msg' => __( 'Please wait while your site updates.', 'formidable' ),
|
2689 |
+
'deauthorize' => __( 'Are you sure you want to deauthorize Formidable Forms on this site?', 'formidable' ),
|
2690 |
+
'url' => self::plugin_url(),
|
2691 |
+
'app_url' => 'https://formidableforms.com/',
|
2692 |
+
'applicationsUrl' => admin_url( 'admin.php?page=formidable-applications' ),
|
2693 |
+
'loading' => __( 'Loading…', 'formidable' ),
|
2694 |
+
'nonce' => wp_create_nonce( 'frm_ajax' ),
|
2695 |
);
|
2696 |
wp_localize_script( 'formidable_admin_global', 'frmGlobal', $global_strings );
|
2697 |
|
classes/helpers/FrmFieldsHelper.php
CHANGED
@@ -1347,6 +1347,10 @@ class FrmFieldsHelper {
|
|
1347 |
$replace_with[] = '[' . $new . ']';
|
1348 |
$replace[] = '[' . $old . ' ';
|
1349 |
$replace_with[] = '[' . $new . ' ';
|
|
|
|
|
|
|
|
|
1350 |
unset( $old, $new );
|
1351 |
}
|
1352 |
if ( is_array( $val ) ) {
|
1347 |
$replace_with[] = '[' . $new . ']';
|
1348 |
$replace[] = '[' . $old . ' ';
|
1349 |
$replace_with[] = '[' . $new . ' ';
|
1350 |
+
$replace[] = 'field_id="' . $old . '"';
|
1351 |
+
$replace_with[] = 'field_id="' . $new . '"';
|
1352 |
+
$replace[] = 'field_id=\"' . $old . '\"';
|
1353 |
+
$replace_with[] = 'field_id=\"' . $new . '\"';
|
1354 |
unset( $old, $new );
|
1355 |
}
|
1356 |
if ( is_array( $val ) ) {
|
classes/helpers/FrmXMLHelper.php
CHANGED
@@ -88,7 +88,7 @@ class FrmXMLHelper {
|
|
88 |
if ( ! isset( $imported['form_status'] ) || empty( $imported['form_status'] ) ) {
|
89 |
// Check for an error message in the XML.
|
90 |
if ( isset( $xml->Code ) && isset( $xml->Message ) ) { // phpcs:ignore WordPress.NamingConventions
|
91 |
-
$imported['error'] =
|
92 |
}
|
93 |
}
|
94 |
|
@@ -746,6 +746,9 @@ class FrmXMLHelper {
|
|
746 |
'frm_styles' => 'styles',
|
747 |
);
|
748 |
|
|
|
|
|
|
|
749 |
foreach ( $views as $item ) {
|
750 |
$post = array(
|
751 |
'post_title' => (string) $item->title,
|
@@ -770,19 +773,21 @@ class FrmXMLHelper {
|
|
770 |
'tax_input' => array(),
|
771 |
);
|
772 |
|
|
|
|
|
773 |
$old_id = $post['post_id'];
|
774 |
self::populate_post( $post, $item, $imported );
|
775 |
|
776 |
unset( $item );
|
777 |
|
778 |
$post_id = false;
|
779 |
-
if ( $post['post_type']
|
780 |
$action_control = FrmFormActionsController::get_form_actions( $post['post_excerpt'] );
|
781 |
if ( $action_control && is_object( $action_control ) ) {
|
782 |
$post_id = $action_control->maybe_create_action( $post, $imported['form_status'] );
|
783 |
}
|
784 |
unset( $action_control );
|
785 |
-
} elseif ( $post['post_type']
|
786 |
// Properly encode post content before inserting the post
|
787 |
$post['post_content'] = FrmAppHelper::maybe_json_decode( $post['post_content'] );
|
788 |
$custom_css = isset( $post['post_content']['custom_css'] ) ? $post['post_content']['custom_css'] : '';
|
@@ -803,6 +808,10 @@ class FrmXMLHelper {
|
|
803 |
continue;
|
804 |
}
|
805 |
|
|
|
|
|
|
|
|
|
806 |
self::update_postmeta( $post, $post_id );
|
807 |
self::update_layout( $post, $post_id );
|
808 |
|
@@ -819,16 +828,115 @@ class FrmXMLHelper {
|
|
819 |
|
820 |
$imported['posts'][ (int) $old_id ] = $post_id;
|
821 |
|
|
|
|
|
|
|
|
|
822 |
do_action( 'frm_after_import_view', $post_id, $post );
|
823 |
|
824 |
unset( $post );
|
825 |
}
|
826 |
|
|
|
|
|
|
|
|
|
|
|
827 |
self::maybe_update_stylesheet( $imported );
|
828 |
|
829 |
return $imported;
|
830 |
}
|
831 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
832 |
/**
|
833 |
* @param string $content
|
834 |
* @return string
|
@@ -1108,10 +1216,22 @@ class FrmXMLHelper {
|
|
1108 |
} else {
|
1109 |
self::add_form_link_to_message( $result, $message );
|
1110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
$message .= '</ul>';
|
1112 |
}
|
1113 |
}
|
1114 |
|
|
|
|
|
|
|
|
|
|
|
1115 |
public static function item_count_message( $m, $type, &$s_message ) {
|
1116 |
if ( ! $m ) {
|
1117 |
return;
|
@@ -1127,7 +1247,7 @@ class FrmXMLHelper {
|
|
1127 |
/* translators: %1$s: Number of items */
|
1128 |
'views' => sprintf( _n( '%1$s View', '%1$s Views', $m, 'formidable' ), $m ),
|
1129 |
/* translators: %1$s: Number of items */
|
1130 |
-
'posts' => sprintf( _n( '%1$s Post', '%1$s Posts', $m, 'formidable' ), $m ),
|
1131 |
/* translators: %1$s: Number of items */
|
1132 |
'styles' => sprintf( _n( '%1$s Style', '%1$s Styles', $m, 'formidable' ), $m ),
|
1133 |
/* translators: %1$s: Number of items */
|
@@ -1136,7 +1256,21 @@ class FrmXMLHelper {
|
|
1136 |
'actions' => sprintf( _n( '%1$s Form Action', '%1$s Form Actions', $m, 'formidable' ), $m ),
|
1137 |
);
|
1138 |
|
1139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1140 |
}
|
1141 |
|
1142 |
/**
|
88 |
if ( ! isset( $imported['form_status'] ) || empty( $imported['form_status'] ) ) {
|
89 |
// Check for an error message in the XML.
|
90 |
if ( isset( $xml->Code ) && isset( $xml->Message ) ) { // phpcs:ignore WordPress.NamingConventions
|
91 |
+
$imported['error'] = (string) $xml->Message; // phpcs:ignore WordPress.NamingConventions
|
92 |
}
|
93 |
}
|
94 |
|
746 |
'frm_styles' => 'styles',
|
747 |
);
|
748 |
|
749 |
+
$view_ids = array();
|
750 |
+
$posts_with_shortcodes = array();
|
751 |
+
|
752 |
foreach ( $views as $item ) {
|
753 |
$post = array(
|
754 |
'post_title' => (string) $item->title,
|
773 |
'tax_input' => array(),
|
774 |
);
|
775 |
|
776 |
+
$post['post_content'] = self::switch_form_ids( $post['post_content'], $imported['forms'] );
|
777 |
+
|
778 |
$old_id = $post['post_id'];
|
779 |
self::populate_post( $post, $item, $imported );
|
780 |
|
781 |
unset( $item );
|
782 |
|
783 |
$post_id = false;
|
784 |
+
if ( $post['post_type'] === $form_action_type ) {
|
785 |
$action_control = FrmFormActionsController::get_form_actions( $post['post_excerpt'] );
|
786 |
if ( $action_control && is_object( $action_control ) ) {
|
787 |
$post_id = $action_control->maybe_create_action( $post, $imported['form_status'] );
|
788 |
}
|
789 |
unset( $action_control );
|
790 |
+
} elseif ( $post['post_type'] === 'frm_styles' ) {
|
791 |
// Properly encode post content before inserting the post
|
792 |
$post['post_content'] = FrmAppHelper::maybe_json_decode( $post['post_content'] );
|
793 |
$custom_css = isset( $post['post_content']['custom_css'] ) ? $post['post_content']['custom_css'] : '';
|
808 |
continue;
|
809 |
}
|
810 |
|
811 |
+
if ( false !== strpos( $post['post_content'], '[frm-display-data' ) || false !== strpos( $post['post_content'], '[formidable' ) ) {
|
812 |
+
$posts_with_shortcodes[ $post_id ] = $post;
|
813 |
+
}
|
814 |
+
|
815 |
self::update_postmeta( $post, $post_id );
|
816 |
self::update_layout( $post, $post_id );
|
817 |
|
828 |
|
829 |
$imported['posts'][ (int) $old_id ] = $post_id;
|
830 |
|
831 |
+
if ( $post['post_type'] === 'frm_display' ) {
|
832 |
+
$view_ids[ (int) $old_id ] = $post_id;
|
833 |
+
}
|
834 |
+
|
835 |
do_action( 'frm_after_import_view', $post_id, $post );
|
836 |
|
837 |
unset( $post );
|
838 |
}
|
839 |
|
840 |
+
if ( $posts_with_shortcodes && $view_ids ) {
|
841 |
+
self::maybe_switch_view_ids_after_importing_posts( $posts_with_shortcodes, $view_ids );
|
842 |
+
}
|
843 |
+
unset( $posts_with_shortcodes, $view_ids );
|
844 |
+
|
845 |
self::maybe_update_stylesheet( $imported );
|
846 |
|
847 |
return $imported;
|
848 |
}
|
849 |
|
850 |
+
/**
|
851 |
+
* Replace old form ids with new ones in a string.
|
852 |
+
*
|
853 |
+
* @param string $string
|
854 |
+
* @param array<int> $form_ids new form ids indexed by old form id.
|
855 |
+
* @return string
|
856 |
+
*/
|
857 |
+
private static function switch_form_ids( $string, $form_ids ) {
|
858 |
+
if ( false === strpos( $string, '[formidable' ) ) {
|
859 |
+
// Skip string replacing if there are no form shortcodes in string.
|
860 |
+
return $string;
|
861 |
+
}
|
862 |
+
|
863 |
+
foreach ( $form_ids as $old_id => $new_id ) {
|
864 |
+
$string = str_replace(
|
865 |
+
array(
|
866 |
+
'[formidable id="' . $old_id . '"',
|
867 |
+
'[formidable id=' . $old_id . ']',
|
868 |
+
'[formidable id=' . $old_id . ' ',
|
869 |
+
'"formId":"' . $old_id . '"',
|
870 |
+
),
|
871 |
+
array(
|
872 |
+
'[formidable id="' . $new_id . '"',
|
873 |
+
'[formidable id=' . $new_id . ']',
|
874 |
+
'[formidable id=' . $new_id . ' ',
|
875 |
+
'"formId":"' . $new_id . '"',
|
876 |
+
),
|
877 |
+
$string
|
878 |
+
);
|
879 |
+
}
|
880 |
+
|
881 |
+
return $string;
|
882 |
+
}
|
883 |
+
|
884 |
+
/**
|
885 |
+
* @param array<array> $posts_with_shortcodes indexed by current post id.
|
886 |
+
* @param array<int> $view_ids new view ids indexed by old view id.
|
887 |
+
* @return void
|
888 |
+
*/
|
889 |
+
private static function maybe_switch_view_ids_after_importing_posts( $posts_with_shortcodes, $view_ids ) {
|
890 |
+
foreach ( $posts_with_shortcodes as $imported_post_id => $post ) {
|
891 |
+
$post_content = self::switch_view_ids( $post['post_content'], $view_ids );
|
892 |
+
if ( $post_content === $post['post_content'] ) {
|
893 |
+
continue;
|
894 |
+
}
|
895 |
+
|
896 |
+
wp_update_post(
|
897 |
+
array(
|
898 |
+
'ID' => $imported_post_id,
|
899 |
+
'post_content' => $post_content,
|
900 |
+
)
|
901 |
+
);
|
902 |
+
}
|
903 |
+
}
|
904 |
+
|
905 |
+
/**
|
906 |
+
* Replace old view ids with new ones in a string.
|
907 |
+
*
|
908 |
+
* @param string $string
|
909 |
+
* @param array<int> $view_ids new view ids indexed by old view id.
|
910 |
+
* @return string
|
911 |
+
*/
|
912 |
+
private static function switch_view_ids( $string, $view_ids ) {
|
913 |
+
if ( false === strpos( $string, '[display-frm-data' ) ) {
|
914 |
+
// Skip string replacing if there are no view shortcodes in string.
|
915 |
+
return $string;
|
916 |
+
}
|
917 |
+
|
918 |
+
foreach ( $view_ids as $old_id => $new_id ) {
|
919 |
+
$string = str_replace(
|
920 |
+
array(
|
921 |
+
'[display-frm-data id="' . $old_id . '"',
|
922 |
+
'[display-frm-data id=' . $old_id . ']',
|
923 |
+
'[display-frm-data id=' . $old_id . ' ',
|
924 |
+
'"viewId":"' . $old_id . '"',
|
925 |
+
),
|
926 |
+
array(
|
927 |
+
'[display-frm-data id="' . $new_id . '"',
|
928 |
+
'[display-frm-data id=' . $new_id . ']',
|
929 |
+
'[display-frm-data id=' . $new_id . ' ',
|
930 |
+
'"viewId":"' . $new_id . '"',
|
931 |
+
),
|
932 |
+
$string
|
933 |
+
);
|
934 |
+
unset( $old_id, $new_id );
|
935 |
+
}
|
936 |
+
|
937 |
+
return $string;
|
938 |
+
}
|
939 |
+
|
940 |
/**
|
941 |
* @param string $content
|
942 |
* @return string
|
1216 |
} else {
|
1217 |
self::add_form_link_to_message( $result, $message );
|
1218 |
|
1219 |
+
/**
|
1220 |
+
* @since 5.3
|
1221 |
+
*
|
1222 |
+
* @param string $message
|
1223 |
+
* @param array $result
|
1224 |
+
*/
|
1225 |
+
$message = apply_filters( 'frm_xml_parsed_message', $message, $result );
|
1226 |
$message .= '</ul>';
|
1227 |
}
|
1228 |
}
|
1229 |
|
1230 |
+
/**
|
1231 |
+
* @param int $m
|
1232 |
+
* @param string $type
|
1233 |
+
* @param array<string> $s_message
|
1234 |
+
*/
|
1235 |
public static function item_count_message( $m, $type, &$s_message ) {
|
1236 |
if ( ! $m ) {
|
1237 |
return;
|
1247 |
/* translators: %1$s: Number of items */
|
1248 |
'views' => sprintf( _n( '%1$s View', '%1$s Views', $m, 'formidable' ), $m ),
|
1249 |
/* translators: %1$s: Number of items */
|
1250 |
+
'posts' => sprintf( _n( '%1$s Page/Post', '%1$s Pages/Posts', $m, 'formidable' ), $m ),
|
1251 |
/* translators: %1$s: Number of items */
|
1252 |
'styles' => sprintf( _n( '%1$s Style', '%1$s Styles', $m, 'formidable' ), $m ),
|
1253 |
/* translators: %1$s: Number of items */
|
1256 |
'actions' => sprintf( _n( '%1$s Form Action', '%1$s Form Actions', $m, 'formidable' ), $m ),
|
1257 |
);
|
1258 |
|
1259 |
+
if ( isset( $strings[ $type ] ) ) {
|
1260 |
+
$s_message[] = $strings[ $type ];
|
1261 |
+
} else {
|
1262 |
+
$string = ' ' . $m . ' ' . ucfirst( $type );
|
1263 |
+
|
1264 |
+
/**
|
1265 |
+
* @since 5.3
|
1266 |
+
*
|
1267 |
+
* @param string $string Message string for imported item.
|
1268 |
+
* @param int $m Number of item that was imported.
|
1269 |
+
* }
|
1270 |
+
*/
|
1271 |
+
$string = apply_filters( 'frm_xml_' . $type . '_count_message', $string, $m );
|
1272 |
+
$s_message[] = $string;
|
1273 |
+
}
|
1274 |
}
|
1275 |
|
1276 |
/**
|
classes/models/FrmAddon.php
CHANGED
@@ -282,6 +282,9 @@ class FrmAddon {
|
|
282 |
|
283 |
$api = new FrmFormTemplateApi( $this->license );
|
284 |
$api->reset_cached();
|
|
|
|
|
|
|
285 |
}
|
286 |
|
287 |
/**
|
282 |
|
283 |
$api = new FrmFormTemplateApi( $this->license );
|
284 |
$api->reset_cached();
|
285 |
+
|
286 |
+
$api = new FrmApplicationApi( $this->license );
|
287 |
+
$api->reset_cached();
|
288 |
}
|
289 |
|
290 |
/**
|
classes/models/FrmApplicationApi.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* @since 5.3
|
8 |
+
*/
|
9 |
+
class FrmApplicationApi extends FrmFormApi {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @var string $base_api_url
|
13 |
+
*/
|
14 |
+
private static $base_api_url = 'https://formidableforms.com/wp-json/view-templates/v1/list';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @return string
|
18 |
+
*/
|
19 |
+
protected function api_url() {
|
20 |
+
return self::$base_api_url;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @return void
|
25 |
+
*/
|
26 |
+
protected function set_cache_key() {
|
27 |
+
$this->cache_key = 'frm_applications_l' . ( empty( $this->license ) ? '' : md5( $this->license ) );
|
28 |
+
}
|
29 |
+
}
|
classes/models/FrmApplicationTemplate.php
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
|
6 |
+
/**
|
7 |
+
* @since 5.3
|
8 |
+
*/
|
9 |
+
class FrmApplicationTemplate {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @var array<string>|null $keys
|
13 |
+
*/
|
14 |
+
private static $keys;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @var array<string>|null $keys_with_images
|
18 |
+
*/
|
19 |
+
private static $keys_with_images;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var array<string>|null $categories
|
23 |
+
*/
|
24 |
+
private static $categories;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var array $api_data
|
28 |
+
*/
|
29 |
+
private $api_data;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @param array<string> $keys
|
33 |
+
* @param array<string> $keys_with_images
|
34 |
+
*/
|
35 |
+
public static function init() {
|
36 |
+
/**
|
37 |
+
* @since 5.3
|
38 |
+
*
|
39 |
+
* @param array $keys
|
40 |
+
*/
|
41 |
+
self::$keys = apply_filters(
|
42 |
+
'frm_application_data_keys',
|
43 |
+
array( 'key', 'name', 'description', 'link', 'categories', 'views', 'forms' )
|
44 |
+
);
|
45 |
+
self::$keys_with_images = self::get_template_keys_with_local_images();
|
46 |
+
self::$categories = array();
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Return the template keys that have embedded images. Otherwise, we want to avoid trying to load the URL and use the placeholder instead.
|
51 |
+
*
|
52 |
+
* @return array<string>
|
53 |
+
*/
|
54 |
+
private static function get_template_keys_with_local_images() {
|
55 |
+
return array(
|
56 |
+
'business-hours',
|
57 |
+
'faq-template-wordpress',
|
58 |
+
'restaurant-menu',
|
59 |
+
'team-directory',
|
60 |
+
'product-review',
|
61 |
+
'real-estate-listings',
|
62 |
+
);
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @param array $api_data
|
67 |
+
* @return void
|
68 |
+
*/
|
69 |
+
public function __construct( $api_data ) {
|
70 |
+
$this->api_data = $api_data;
|
71 |
+
|
72 |
+
if ( ! empty( $api_data['categories'] ) ) {
|
73 |
+
self::populate_category_information( $api_data['categories'] );
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* @param array<string> $categories
|
79 |
+
* @return void
|
80 |
+
*/
|
81 |
+
private static function populate_category_information( $categories ) {
|
82 |
+
foreach ( $categories as $category ) {
|
83 |
+
if ( false !== strpos( $category, '+Views' ) || in_array( $category, self::$categories, true ) ) {
|
84 |
+
continue;
|
85 |
+
}
|
86 |
+
self::$categories[] = $category;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @return array<string>
|
92 |
+
*/
|
93 |
+
public static function get_categories() {
|
94 |
+
return isset( self::$categories ) ? self::$categories : array();
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @return array
|
99 |
+
*/
|
100 |
+
public function as_js_object() {
|
101 |
+
$application = array();
|
102 |
+
foreach ( self::$keys as $key ) {
|
103 |
+
$value = $this->api_data[ $key ];
|
104 |
+
|
105 |
+
if ( 'icon' === $key ) {
|
106 |
+
// Icon is an array. The first array item is the image URL.
|
107 |
+
$application[ $key ] = reset( $value );
|
108 |
+
} elseif ( 'categories' === $key ) {
|
109 |
+
$application[ $key ] = array_values(
|
110 |
+
array_filter(
|
111 |
+
$value,
|
112 |
+
function( $category ) {
|
113 |
+
return false === strpos( $category, '+Views' );
|
114 |
+
}
|
115 |
+
)
|
116 |
+
);
|
117 |
+
} else {
|
118 |
+
if ( 'views' === $key ) {
|
119 |
+
$key = 'viewCount';
|
120 |
+
} elseif ( 'forms' === $key ) {
|
121 |
+
$key = 'formCount';
|
122 |
+
}
|
123 |
+
|
124 |
+
if ( 'name' === $key && ' Template' === substr( $value, -9 ) ) {
|
125 |
+
// Strip off the " Template" text at the end of the name as it takes up space.
|
126 |
+
$value = substr( $value, 0, -9 );
|
127 |
+
}
|
128 |
+
$application[ $key ] = $value;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
$application['hasLiteThumbnail'] = in_array( $application['key'], self::$keys_with_images, true );
|
133 |
+
|
134 |
+
if ( ! array_key_exists( 'url', $application ) ) {
|
135 |
+
$purchase_url = $this->is_available_for_purchase();
|
136 |
+
if ( false !== $purchase_url ) {
|
137 |
+
$application['forPurchase'] = true;
|
138 |
+
}
|
139 |
+
$application['upgradeUrl'] = $this->get_admin_upgrade_link();
|
140 |
+
$application['link'] = $application['upgradeUrl'];
|
141 |
+
}
|
142 |
+
|
143 |
+
return $application;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* @return bool
|
148 |
+
*/
|
149 |
+
private function is_available_for_purchase() {
|
150 |
+
if ( ! array_key_exists( 'min_plan', $this->api_data ) ) {
|
151 |
+
return false;
|
152 |
+
}
|
153 |
+
|
154 |
+
$license_type = '';
|
155 |
+
$api = new FrmFormApi();
|
156 |
+
$addons = $api->get_api_info();
|
157 |
+
|
158 |
+
if ( ! array_key_exists( 93790, $addons ) ) {
|
159 |
+
return false;
|
160 |
+
}
|
161 |
+
|
162 |
+
$pro = $addons[93790];
|
163 |
+
if ( ! array_key_exists( 'type', $pro ) ) {
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
|
167 |
+
$license_type = strtolower( $pro['type'] );
|
168 |
+
$args = array(
|
169 |
+
'license_type' => $license_type,
|
170 |
+
'plan_required' => $this->get_required_license(),
|
171 |
+
);
|
172 |
+
if ( ! FrmFormsHelper::plan_is_allowed( $args ) ) {
|
173 |
+
return false;
|
174 |
+
}
|
175 |
+
|
176 |
+
return true;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* @return string
|
181 |
+
*/
|
182 |
+
private function get_required_license() {
|
183 |
+
$required_license = strtolower( $this->api_data['min_plan'] );
|
184 |
+
if ( 'plus' === $required_license ) {
|
185 |
+
$required_license = 'personal';
|
186 |
+
}
|
187 |
+
return $required_license;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* @return string
|
192 |
+
*/
|
193 |
+
private function get_admin_upgrade_link() {
|
194 |
+
return FrmAppHelper::admin_upgrade_link(
|
195 |
+
array(
|
196 |
+
'content' => 'upgrade',
|
197 |
+
'medium' => 'applications',
|
198 |
+
),
|
199 |
+
'/view-templates/' . $this->api_data['slug']
|
200 |
+
);
|
201 |
+
}
|
202 |
+
}
|
classes/models/FrmForm.php
CHANGED
@@ -132,6 +132,73 @@ class FrmForm {
|
|
132 |
global $wpdb;
|
133 |
$wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $new_opts ) ), array( 'id' => $form_id ) );
|
134 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
|
137 |
/**
|
132 |
global $wpdb;
|
133 |
$wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $new_opts ) ), array( 'id' => $form_id ) );
|
134 |
}
|
135 |
+
|
136 |
+
self::switch_field_ids_in_fields( $form_id );
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Switches field ID in fields.
|
141 |
+
*
|
142 |
+
* @since 5.3
|
143 |
+
*
|
144 |
+
* @param int $form_id Form ID.
|
145 |
+
*/
|
146 |
+
private static function switch_field_ids_in_fields( $form_id ) {
|
147 |
+
global $wpdb;
|
148 |
+
|
149 |
+
// Keys of fields that you want to check to replace field ID.
|
150 |
+
$keys = array( 'default_value', 'field_options' );
|
151 |
+
$sql_cols = 'fi.id';
|
152 |
+
foreach ( $keys as $key ) {
|
153 |
+
$sql_cols .= ( ',fi.' . $key );
|
154 |
+
}
|
155 |
+
|
156 |
+
$fields = FrmDb::get_results(
|
157 |
+
"{$wpdb->prefix}frm_fields AS fi LEFT OUTER JOIN {$wpdb->prefix}frm_forms AS fr ON fi.form_id = fr.id",
|
158 |
+
array(
|
159 |
+
'or' => 1,
|
160 |
+
'fi.form_id' => $form_id,
|
161 |
+
'fr.parent_form_id' => $form_id,
|
162 |
+
),
|
163 |
+
$sql_cols
|
164 |
+
);
|
165 |
+
|
166 |
+
if ( ! $fields || ! is_array( $fields ) ) {
|
167 |
+
return;
|
168 |
+
}
|
169 |
+
|
170 |
+
foreach ( $fields as $field ) {
|
171 |
+
self::switch_field_ids_in_field( (array) $field );
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Switches field ID in a field.
|
177 |
+
*
|
178 |
+
* @since 5.3
|
179 |
+
*
|
180 |
+
* @param array $field Field array.
|
181 |
+
*/
|
182 |
+
private static function switch_field_ids_in_field( $field ) {
|
183 |
+
$new_values = array();
|
184 |
+
foreach ( $field as $key => $value ) {
|
185 |
+
if ( 'id' === $key || ! $value ) {
|
186 |
+
continue;
|
187 |
+
}
|
188 |
+
|
189 |
+
if ( ! is_string( $value ) && ! is_array( $value ) ) {
|
190 |
+
continue;
|
191 |
+
}
|
192 |
+
|
193 |
+
$new_val = FrmFieldsHelper::switch_field_ids( $value );
|
194 |
+
if ( $new_val !== $value ) {
|
195 |
+
$new_values[ $key ] = $new_val;
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
if ( ! empty( $new_values ) ) {
|
200 |
+
FrmField::update( $field['id'], $new_values );
|
201 |
+
}
|
202 |
}
|
203 |
|
204 |
/**
|
classes/views/applications/header.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
?>
|
6 |
+
<div id="frm_top_bar">
|
7 |
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable' ) ); ?>" class="frm-header-logo">
|
8 |
+
<?php FrmAppHelper::show_header_logo(); ?>
|
9 |
+
</a>
|
10 |
+
<div id="frm_bs_dropdown">
|
11 |
+
<h1>
|
12 |
+
<span>
|
13 |
+
<?php echo esc_html( $title ); ?>
|
14 |
+
</span>
|
15 |
+
<?php do_action( 'frm_applications_header_inside_title_after_span', $context ); ?>
|
16 |
+
</h1>
|
17 |
+
<?php if ( 'index' === $context && ! FrmAppHelper::pro_is_installed() ) { ?>
|
18 |
+
<?php
|
19 |
+
FrmAddonsController::show_conditional_action_button(
|
20 |
+
array(
|
21 |
+
'addon' => false,
|
22 |
+
'upgrade_link' => FrmAppHelper::admin_upgrade_link(
|
23 |
+
array(
|
24 |
+
'medium' => 'applications-header',
|
25 |
+
'content' => 'applications',
|
26 |
+
)
|
27 |
+
),
|
28 |
+
)
|
29 |
+
);
|
30 |
+
?>
|
31 |
+
<?php } ?>
|
32 |
+
<?php do_action( 'frm_applications_header_after_title', $context ); ?>
|
33 |
+
</div>
|
34 |
+
<div style="clear: both;"></div>
|
35 |
+
</div>
|
classes/views/applications/index.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
die( 'You are not allowed to call this page directly.' );
|
4 |
+
}
|
5 |
+
FrmAppHelper::include_svg();
|
6 |
+
?>
|
7 |
+
<div class="frm_page_container frm_wrap">
|
8 |
+
<?php self::render_applications_header( __( 'Applications', 'formidable' ), 'index' ); ?>
|
9 |
+
<div id="frm_applications_container"></div>
|
10 |
+
</div>
|
classes/views/frm-entries/no_entries.php
CHANGED
@@ -3,7 +3,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
?>
|
6 |
-
<div class="frmcenter frm_no_entries_form">
|
7 |
<?php if ( $form && isset( $form->options['no_save'] ) && $form->options['no_save'] ) { ?>
|
8 |
<h3><?php esc_html_e( 'This form is not set to save any entries.', 'formidable' ); ?></h3>
|
9 |
<p>
|
@@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
18 |
?>
|
19 |
</p>
|
20 |
<?php } elseif ( $form || $has_form ) { ?>
|
21 |
-
<div class="frmcenter">
|
22 |
<svg width="450" height="308" viewBox="0 0 450 308" fill="none" xmlns="http://www.w3.org/2000/svg"><g filter="url(#filter0_d)"><rect x="118" y="28" width="312" height="205" rx="10.1" fill="#fff"/></g><rect x="174" y="84" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="174" y="69" width="179.1" height="9.4" rx="4.7" fill="#9EA9B8" fill-opacity=".7"/><rect x="174" y="132.2" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="174" y="117" width="148" height="10" rx="5" fill="#9EA9B8" fill-opacity=".7"/><rect x="174" y="183.2" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="174" y="168.2" width="179.1" height="9.4" rx="4.7" fill="#9EA9B8" fill-opacity=".7"/><ellipse cx="137" cy="42.2" rx="4" ry="3.8" fill="#F54242"/><ellipse cx="151" cy="42.2" rx="4" ry="3.8" fill="#F8E434"/><ellipse cx="165" cy="42.2" rx="4" ry="3.8" fill="#ADD779"/><g filter="url(#filter1_d)"><rect x="25" y="62" width="312" height="205" rx="10.1" fill="#fff"/></g><rect x="81" y="118" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="81" y="103" width="179.1" height="9.4" rx="4.7" fill="#9EA9B8" fill-opacity=".7"/><rect x="81" y="166.2" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="81" y="151" width="148" height="10" rx="5" fill="#9EA9B8" fill-opacity=".7"/><rect x="81" y="217.2" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="81" y="202.2" width="179.1" height="9.4" rx="4.7" fill="#9EA9B8" fill-opacity=".7"/><ellipse cx="44" cy="76.2" rx="4" ry="3.8" fill="#F54242"/><ellipse cx="58" cy="76.2" rx="4" ry="3.8" fill="#F8E434"/><ellipse cx="72" cy="76.2" rx="4" ry="3.8" fill="#ADD779"/><defs><filter id="filter0_d" x="93.6" y=".5" width="360.9" height="253.9" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-3.1"/><feGaussianBlur stdDeviation="12.2"/><feColorMatrix values="0 0 0 0 0.164706 0 0 0 0 0.223529 0 0 0 0 0.294118 0 0 0 0.21 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter1_d" x=".6" y="34.5" width="360.9" height="253.9" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-3.1"/><feGaussianBlur stdDeviation="12.2"/><feColorMatrix values="0 0 0 0 0.164706 0 0 0 0 0.223529 0 0 0 0 0.294118 0 0 0 0.21 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter></defs></svg>
|
23 |
<div class="frm_no_entries_header">
|
24 |
<?php
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
?>
|
6 |
+
<div class="frmcenter frm_no_entries_form frm_placeholder_block">
|
7 |
<?php if ( $form && isset( $form->options['no_save'] ) && $form->options['no_save'] ) { ?>
|
8 |
<h3><?php esc_html_e( 'This form is not set to save any entries.', 'formidable' ); ?></h3>
|
9 |
<p>
|
18 |
?>
|
19 |
</p>
|
20 |
<?php } elseif ( $form || $has_form ) { ?>
|
21 |
+
<div class="frmcenter frm_placeholder_block">
|
22 |
<svg width="450" height="308" viewBox="0 0 450 308" fill="none" xmlns="http://www.w3.org/2000/svg"><g filter="url(#filter0_d)"><rect x="118" y="28" width="312" height="205" rx="10.1" fill="#fff"/></g><rect x="174" y="84" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="174" y="69" width="179.1" height="9.4" rx="4.7" fill="#9EA9B8" fill-opacity=".7"/><rect x="174" y="132.2" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="174" y="117" width="148" height="10" rx="5" fill="#9EA9B8" fill-opacity=".7"/><rect x="174" y="183.2" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="174" y="168.2" width="179.1" height="9.4" rx="4.7" fill="#9EA9B8" fill-opacity=".7"/><ellipse cx="137" cy="42.2" rx="4" ry="3.8" fill="#F54242"/><ellipse cx="151" cy="42.2" rx="4" ry="3.8" fill="#F8E434"/><ellipse cx="165" cy="42.2" rx="4" ry="3.8" fill="#ADD779"/><g filter="url(#filter1_d)"><rect x="25" y="62" width="312" height="205" rx="10.1" fill="#fff"/></g><rect x="81" y="118" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="81" y="103" width="179.1" height="9.4" rx="4.7" fill="#9EA9B8" fill-opacity=".7"/><rect x="81" y="166.2" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="81" y="151" width="148" height="10" rx="5" fill="#9EA9B8" fill-opacity=".7"/><rect x="81" y="217.2" width="202" height="15" rx="2" fill="#8F99A6" fill-opacity=".2"/><rect x="81" y="202.2" width="179.1" height="9.4" rx="4.7" fill="#9EA9B8" fill-opacity=".7"/><ellipse cx="44" cy="76.2" rx="4" ry="3.8" fill="#F54242"/><ellipse cx="58" cy="76.2" rx="4" ry="3.8" fill="#F8E434"/><ellipse cx="72" cy="76.2" rx="4" ry="3.8" fill="#ADD779"/><defs><filter id="filter0_d" x="93.6" y=".5" width="360.9" height="253.9" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-3.1"/><feGaussianBlur stdDeviation="12.2"/><feColorMatrix values="0 0 0 0 0.164706 0 0 0 0 0.223529 0 0 0 0 0.294118 0 0 0 0.21 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter1_d" x=".6" y="34.5" width="360.9" height="253.9" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-3.1"/><feGaussianBlur stdDeviation="12.2"/><feColorMatrix values="0 0 0 0 0.164706 0 0 0 0 0.223529 0 0 0 0 0.294118 0 0 0 0.21 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter></defs></svg>
|
23 |
<div class="frm_no_entries_header">
|
24 |
<?php
|
classes/views/frm-forms/_embed_form_icons.php
CHANGED
@@ -2,22 +2,4 @@
|
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
-
|
6 |
-
<div class="frm_hidden">
|
7 |
-
<?php
|
8 |
-
FrmAppHelper::icon_by_class( 'frmfont frm_clone_icon' );
|
9 |
-
FrmAppHelper::icon_by_class( 'frmfont frm_file_icon' );
|
10 |
-
?>
|
11 |
-
<svg id="frm_copy_embed_form_icon" class="frmsvg">
|
12 |
-
<use xlink:href="#frm_clone_icon"></use>
|
13 |
-
</svg>
|
14 |
-
<svg id="frm_select_existing_page_icon" class="frmsvg">
|
15 |
-
<use xlink:href="#frm_file_icon"></use>
|
16 |
-
</svg>
|
17 |
-
<svg id="frm_create_new_page_icon" class="frmsvg">
|
18 |
-
<use xlink:href="#frm_plus_icon"></use>
|
19 |
-
</svg>
|
20 |
-
<svg id="frm_insert_manually_icon" class="frmsvg">
|
21 |
-
<use xlink:href="#frm_code_icon"></use>
|
22 |
-
</svg>
|
23 |
-
</div>
|
2 |
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
+
_deprecated_file( esc_html( basename( __FILE__ ) ), '5.3' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/views/frm-forms/_no_forms.php
CHANGED
@@ -3,12 +3,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
?>
|
6 |
-
<div class="frmcenter">
|
7 |
<svg width="369" height="238" viewBox="0 0 369 238" fill="none" xmlns="http://www.w3.org/2000/svg"><g filter="url(#filter0_d)"><g clip-path="url(#clip0)"><g filter="url(#filter1_d)"><mask id="a" maskUnits="userSpaceOnUse" x="27" y="23" width="317" height="190"><rect x="27" y="23" width="316.3" height="189.8" rx="7" fill="#fff"/></mask><g mask="url(#a)"><rect x="27" y="21.6" width="315.2" height="185.9" rx="7" fill="#fff"/><g clip-path="url(#clip1)"><path d="M136.9 22.3H27v306.5h109.9V22.3z" fill="#fff"/><path d="M27 22.3h109.9V345H27V22.3z" fill="#F6F7FB"/><rect x="39.6" y="46.1" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="56.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="67" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="77.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="88" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="98.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="109" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="46.1" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="56.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="67" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="77.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="88" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="98.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="109" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="150.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="129.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="140.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="150.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="161.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="171.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="182.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="129.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="140.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="161.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="171.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="182.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><path d="M136.9 22.3H27v13.6h109.9V22.3z" fill="#F6F7FB"/></g><rect x="156.5" y="139.9" width="148.9" height="36.7" rx="3" fill="#579AF6" fill-opacity=".1" stroke="#579AF6" stroke-width=".3" stroke-dasharray="1.75 1.75"/>
|
8 |
<path d="M162 42.6v-6h-1.1l-1.9 4.6-2-4.5h-1v5.9h.8v-4.3h.1l1.7 4.1h.7l1.8-4v4.2h.9zm2 1.6c.8 0 1.3-.3 1.6-1.4l1.7-4.7h-1l-1 3.6h-.1L164 38h-1l1.6 4.5v.2c-.2.5-.4.6-.8.6h-.3v.8h.3zm9.3-1.6c1.3 0 2-.7 2-1.7 0-.8-.5-1.3-1.3-1.4.6-.2 1-.7 1-1.4 0-.9-.6-1.4-1.7-1.4h-2.4v5.9h2.4zm-1.5-5.2h1.2c.7 0 1.1.4 1.1 1 0 .5-.4.8-1.2.8h-1.1v-1.8zm0 4.4v-1.9h1.3c.8 0 1.3.3 1.3 1 0 .6-.4.9-1.3.9h-1.3zm6.6-3c.6 0 1 .4 1 1.1h-2.2c0-.7.5-1.1 1.2-1.1zm1 2.6c0 .3-.5.5-1 .5-.7 0-1.1-.5-1.2-1.3h3.2v-.3c0-1.4-.8-2.3-2-2.3-1.3 0-2 1-2 2.4s.7 2.3 2 2.3c1 0 1.7-.5 2-1.3h-1zm2-2c0 .6.5 1 1.3 1.2l.8.2c.4.1.6.3.6.6s-.3.6-.9.6c-.5 0-.9-.3-1-.6h-.8c0 .8.7 1.3 1.8 1.3 1 0 1.8-.6 1.8-1.4 0-.7-.4-1-1.2-1.3l-.8-.1c-.4-.1-.7-.3-.7-.6s.4-.5.9-.5.8.2.9.5h.8c0-.8-.7-1.3-1.7-1.3s-1.7.6-1.7 1.4zm5.1-2.4v1.1h-.7v.8h.7v2.5c0 .9.4 1.2 1.4 1.2h.5v-.8h-.4c-.4 0-.6-.2-.6-.6v-2.3h1V38h-1v-1h-.9zm9 1.2l1.2 4.4h1l1.5-6h-1l-1 4.6-1.3-4.5h-.9l-1.2 4.5-1.2-4.5h-1l1.7 5.9h.9l1.2-4.4zm6.3 4.5c1.3 0 2.1-1 2.1-2.4s-.8-2.3-2.1-2.3-2.1 1-2.1 2.3c0 1.5.8 2.4 2.1 2.4zm0-.8c-.8 0-1.2-.6-1.2-1.6s.4-1.5 1.2-1.5c.8 0 1.2.6 1.2 1.5 0 1-.4 1.6-1.2 1.6zm3.3.7h.9v-2.7c0-.6.4-1 1.1-1h.5v-.8h-.4c-.6 0-1 .3-1.2.7v-.7h-.9v4.5zm5 0c.6 0 1.1-.2 1.4-.7v.7h1v-6.2h-1v2.4c-.3-.5-.8-.8-1.4-.8-1.1 0-1.8 1-1.8 2.3 0 1.5.7 2.4 1.8 2.4zm.3-3.8c.7 0 1.2.6 1.2 1.6 0 .9-.5 1.5-1.2 1.5-.8 0-1.2-.6-1.2-1.6 0-.9.4-1.5 1.2-1.5zm3.6-2.1v5.9h1v-2h1.3c1.1 0 2-.8 2-2 0-1.1-.8-2-2-2H214zm1 .8h1c.9 0 1.3.4 1.3 1.1 0 .8-.4 1.2-1.2 1.2h-1.2v-2.3zm4.5 5h.9V40c0-.6.4-1 1-1h.6v-.8h-.4c-.6 0-1 .3-1.2.7v-.7h-1v4.5zm5.2-3.7c.6 0 1 .4 1 1.1h-2.2c0-.7.5-1.1 1.2-1.1zm1 2.6c0 .3-.4.5-1 .5-.7 0-1.1-.5-1.2-1.3h3.2v-.3c0-1.4-.8-2.3-2-2.3-1.3 0-2 1-2 2.4s.7 2.3 2 2.3c1 0 1.7-.5 2-1.3h-1zm2-2c0 .6.5 1 1.3 1.2l.8.2c.4.1.7.3.7.6s-.4.6-1 .6c-.5 0-.8-.3-1-.6h-.8c0 .8.7 1.3 1.8 1.3 1 0 1.8-.6 1.8-1.4 0-.7-.4-1-1.2-1.3l-.7-.1c-.5-.1-.8-.3-.8-.6s.4-.5 1-.5c.4 0 .7.2.8.5h.9c-.1-.8-.8-1.3-1.8-1.3s-1.7.6-1.7 1.4zm4.7 0c0 .6.3 1 1.2 1.2l.8.2c.4.1.6.3.6.6s-.4.6-1 .6c-.4 0-.8-.3-.9-.6h-.9c.1.8.8 1.3 1.9 1.3 1 0 1.8-.6 1.8-1.4 0-.7-.4-1-1.2-1.3l-.8-.1c-.5-.1-.7-.3-.7-.6s.4-.5.9-.5.8.2.9.5h.8c0-.8-.7-1.3-1.7-1.3s-1.7.6-1.7 1.4zm8.2 3.2V40h2.5v-.8h-2.5v-1.8h2.7v-.8h-3.6v5.9h.9zm5.9 0c1.3 0 2-.8 2-2.3 0-1.4-.7-2.3-2-2.3s-2.1 1-2.1 2.3c0 1.5.8 2.4 2 2.4zm0-.7c-.8 0-1.2-.6-1.2-1.6s.4-1.5 1.2-1.5c.7 0 1.2.6 1.2 1.5 0 1-.5 1.6-1.2 1.6zm3.3.7h.8v-2.7c0-.6.5-1 1.2-1h.5v-.8h-.4c-.6 0-1.1.3-1.2.7v-.7h-1v4.5zm3.5 0h.9v-2.7c0-.6.4-1 1-1 .5 0 .8.2.8.8v2.9h.9v-2.8c0-.5.3-1 1-1 .5 0 .8.3.8 1v2.8h.9v-3c0-1-.6-1.6-1.5-1.6-.6 0-1.1.4-1.3.8h-.1c-.2-.4-.6-.8-1.2-.8s-1 .3-1.3.8v-.7h-.9v4.5z" fill="#3F4B5B"/><g filter="url(#filter2_d)"><rect x="158.9" y="73.8" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter3_d)"><rect x="158.9" y="81.9" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter4_d)"><rect x="158.9" y="89.9" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter5_d)"><rect x="158.9" y="98" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter6_d)"><rect x="158.9" y="106.3" width="4.2" height="4.2" rx="2.1" stroke="#579AF6" stroke-width=".3"/></g><g filter="url(#filter7_d)"><rect x="159.8" y="107.2" width="2.4" height="2.4" rx="1.2" fill="#579AF6"/></g><g filter="url(#filter8_d)"><rect x="158.9" y="114.4" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter9_d)"><rect x="158.9" y="122.4" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><rect x="155.3" y="61.8" width="105.5" height="7" rx="3.5" fill="#9EA9B8" fill-opacity=".7"/><rect x="167.5" y="73.3" width="19.6" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="81.4" width="22.7" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="89.4" width="38.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="97.4" width="40.5" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/>
|
9 |
<rect x="167.5" y="105.5" width="56.6" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="113.5" width="23.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="121.5" width="12.6" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/></g></g><g filter="url(#filter10_d)"><rect x="128.7" y="126.4" width="148.2" height="41.2" rx="4.5" fill="#fff"/><rect x="137.4" y="147.1" width="129.7" height="11.2" rx="1.4" fill="#8F99A6" fill-opacity=".2"/><rect x="137.4" y="135.9" width="115" height="7" rx="3.5" fill="#9EA9B8" fill-opacity=".7"/></g></g></g><defs><filter id="filter0_d" x=".8" y=".9" width="368.4" height="236.6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="4.1"/><feGaussianBlur stdDeviation="13.1"/><feColorMatrix values="0 0 0 0 0.247059 0 0 0 0 0.294118 0 0 0 0 0.356863 0 0 0 0.15 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter1_d" x="4.6" y="-2.2" width="359.9" height="234.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-2.8"/><feGaussianBlur stdDeviation="11.2"/><feColorMatrix values="0 0 0 0 0.164706 0 0 0 0 0.223529 0 0 0 0 0.294118 0 0 0 0.1 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter2_d" x="158.4" y="73.7" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter3_d" x="158.4" y="81.7" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter4_d" x="158.4" y="89.7" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter5_d" x="158.4" y="97.8" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter6_d" x="158.4" y="106.2" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
10 |
<feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter7_d" x="159.4" y="107.2" width="3.1" height="3.1" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter8_d" x="158.4" y="114.2" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter9_d" x="158.4" y="122.2" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter10_d" x="110.6" y="106.1" width="184.4" height="77.4" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-2.3"/><feGaussianBlur stdDeviation="9"/><feColorMatrix values="0 0 0 0 0.164706 0 0 0 0 0.223529 0 0 0 0 0.294118 0 0 0 0.21 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><clipPath id="clip0"><rect x="27" y="23" width="316" height="184.2" rx="11.5" fill="#fff"/></clipPath><clipPath id="clip1"><path fill="#fff" transform="translate(27 22.3)" d="M0 0h109.9v306.5H0z"/></clipPath></defs></svg>
|
11 |
-
<
|
12 |
<?php if ( isset( $info ) ) { ?>
|
13 |
<p><?php echo esc_html( $info ); ?></p>
|
14 |
<?php } ?>
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
?>
|
6 |
+
<div class="frmcenter frm_placeholder_block">
|
7 |
<svg width="369" height="238" viewBox="0 0 369 238" fill="none" xmlns="http://www.w3.org/2000/svg"><g filter="url(#filter0_d)"><g clip-path="url(#clip0)"><g filter="url(#filter1_d)"><mask id="a" maskUnits="userSpaceOnUse" x="27" y="23" width="317" height="190"><rect x="27" y="23" width="316.3" height="189.8" rx="7" fill="#fff"/></mask><g mask="url(#a)"><rect x="27" y="21.6" width="315.2" height="185.9" rx="7" fill="#fff"/><g clip-path="url(#clip1)"><path d="M136.9 22.3H27v306.5h109.9V22.3z" fill="#fff"/><path d="M27 22.3h109.9V345H27V22.3z" fill="#F6F7FB"/><rect x="39.6" y="46.1" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="56.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="67" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="77.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="88" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="98.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="109" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="46.1" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="56.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="67" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="77.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="88" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="98.5" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="109" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="150.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="129.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="140.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="150.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="161.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="171.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="39.6" y="182.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="129.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="140.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="161.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="171.9" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="84.7" y="182.4" width="37.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><path d="M136.9 22.3H27v13.6h109.9V22.3z" fill="#F6F7FB"/></g><rect x="156.5" y="139.9" width="148.9" height="36.7" rx="3" fill="#579AF6" fill-opacity=".1" stroke="#579AF6" stroke-width=".3" stroke-dasharray="1.75 1.75"/>
|
8 |
<path d="M162 42.6v-6h-1.1l-1.9 4.6-2-4.5h-1v5.9h.8v-4.3h.1l1.7 4.1h.7l1.8-4v4.2h.9zm2 1.6c.8 0 1.3-.3 1.6-1.4l1.7-4.7h-1l-1 3.6h-.1L164 38h-1l1.6 4.5v.2c-.2.5-.4.6-.8.6h-.3v.8h.3zm9.3-1.6c1.3 0 2-.7 2-1.7 0-.8-.5-1.3-1.3-1.4.6-.2 1-.7 1-1.4 0-.9-.6-1.4-1.7-1.4h-2.4v5.9h2.4zm-1.5-5.2h1.2c.7 0 1.1.4 1.1 1 0 .5-.4.8-1.2.8h-1.1v-1.8zm0 4.4v-1.9h1.3c.8 0 1.3.3 1.3 1 0 .6-.4.9-1.3.9h-1.3zm6.6-3c.6 0 1 .4 1 1.1h-2.2c0-.7.5-1.1 1.2-1.1zm1 2.6c0 .3-.5.5-1 .5-.7 0-1.1-.5-1.2-1.3h3.2v-.3c0-1.4-.8-2.3-2-2.3-1.3 0-2 1-2 2.4s.7 2.3 2 2.3c1 0 1.7-.5 2-1.3h-1zm2-2c0 .6.5 1 1.3 1.2l.8.2c.4.1.6.3.6.6s-.3.6-.9.6c-.5 0-.9-.3-1-.6h-.8c0 .8.7 1.3 1.8 1.3 1 0 1.8-.6 1.8-1.4 0-.7-.4-1-1.2-1.3l-.8-.1c-.4-.1-.7-.3-.7-.6s.4-.5.9-.5.8.2.9.5h.8c0-.8-.7-1.3-1.7-1.3s-1.7.6-1.7 1.4zm5.1-2.4v1.1h-.7v.8h.7v2.5c0 .9.4 1.2 1.4 1.2h.5v-.8h-.4c-.4 0-.6-.2-.6-.6v-2.3h1V38h-1v-1h-.9zm9 1.2l1.2 4.4h1l1.5-6h-1l-1 4.6-1.3-4.5h-.9l-1.2 4.5-1.2-4.5h-1l1.7 5.9h.9l1.2-4.4zm6.3 4.5c1.3 0 2.1-1 2.1-2.4s-.8-2.3-2.1-2.3-2.1 1-2.1 2.3c0 1.5.8 2.4 2.1 2.4zm0-.8c-.8 0-1.2-.6-1.2-1.6s.4-1.5 1.2-1.5c.8 0 1.2.6 1.2 1.5 0 1-.4 1.6-1.2 1.6zm3.3.7h.9v-2.7c0-.6.4-1 1.1-1h.5v-.8h-.4c-.6 0-1 .3-1.2.7v-.7h-.9v4.5zm5 0c.6 0 1.1-.2 1.4-.7v.7h1v-6.2h-1v2.4c-.3-.5-.8-.8-1.4-.8-1.1 0-1.8 1-1.8 2.3 0 1.5.7 2.4 1.8 2.4zm.3-3.8c.7 0 1.2.6 1.2 1.6 0 .9-.5 1.5-1.2 1.5-.8 0-1.2-.6-1.2-1.6 0-.9.4-1.5 1.2-1.5zm3.6-2.1v5.9h1v-2h1.3c1.1 0 2-.8 2-2 0-1.1-.8-2-2-2H214zm1 .8h1c.9 0 1.3.4 1.3 1.1 0 .8-.4 1.2-1.2 1.2h-1.2v-2.3zm4.5 5h.9V40c0-.6.4-1 1-1h.6v-.8h-.4c-.6 0-1 .3-1.2.7v-.7h-1v4.5zm5.2-3.7c.6 0 1 .4 1 1.1h-2.2c0-.7.5-1.1 1.2-1.1zm1 2.6c0 .3-.4.5-1 .5-.7 0-1.1-.5-1.2-1.3h3.2v-.3c0-1.4-.8-2.3-2-2.3-1.3 0-2 1-2 2.4s.7 2.3 2 2.3c1 0 1.7-.5 2-1.3h-1zm2-2c0 .6.5 1 1.3 1.2l.8.2c.4.1.7.3.7.6s-.4.6-1 .6c-.5 0-.8-.3-1-.6h-.8c0 .8.7 1.3 1.8 1.3 1 0 1.8-.6 1.8-1.4 0-.7-.4-1-1.2-1.3l-.7-.1c-.5-.1-.8-.3-.8-.6s.4-.5 1-.5c.4 0 .7.2.8.5h.9c-.1-.8-.8-1.3-1.8-1.3s-1.7.6-1.7 1.4zm4.7 0c0 .6.3 1 1.2 1.2l.8.2c.4.1.6.3.6.6s-.4.6-1 .6c-.4 0-.8-.3-.9-.6h-.9c.1.8.8 1.3 1.9 1.3 1 0 1.8-.6 1.8-1.4 0-.7-.4-1-1.2-1.3l-.8-.1c-.5-.1-.7-.3-.7-.6s.4-.5.9-.5.8.2.9.5h.8c0-.8-.7-1.3-1.7-1.3s-1.7.6-1.7 1.4zm8.2 3.2V40h2.5v-.8h-2.5v-1.8h2.7v-.8h-3.6v5.9h.9zm5.9 0c1.3 0 2-.8 2-2.3 0-1.4-.7-2.3-2-2.3s-2.1 1-2.1 2.3c0 1.5.8 2.4 2 2.4zm0-.7c-.8 0-1.2-.6-1.2-1.6s.4-1.5 1.2-1.5c.7 0 1.2.6 1.2 1.5 0 1-.5 1.6-1.2 1.6zm3.3.7h.8v-2.7c0-.6.5-1 1.2-1h.5v-.8h-.4c-.6 0-1.1.3-1.2.7v-.7h-1v4.5zm3.5 0h.9v-2.7c0-.6.4-1 1-1 .5 0 .8.2.8.8v2.9h.9v-2.8c0-.5.3-1 1-1 .5 0 .8.3.8 1v2.8h.9v-3c0-1-.6-1.6-1.5-1.6-.6 0-1.1.4-1.3.8h-.1c-.2-.4-.6-.8-1.2-.8s-1 .3-1.3.8v-.7h-.9v4.5z" fill="#3F4B5B"/><g filter="url(#filter2_d)"><rect x="158.9" y="73.8" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter3_d)"><rect x="158.9" y="81.9" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter4_d)"><rect x="158.9" y="89.9" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter5_d)"><rect x="158.9" y="98" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter6_d)"><rect x="158.9" y="106.3" width="4.2" height="4.2" rx="2.1" stroke="#579AF6" stroke-width=".3"/></g><g filter="url(#filter7_d)"><rect x="159.8" y="107.2" width="2.4" height="2.4" rx="1.2" fill="#579AF6"/></g><g filter="url(#filter8_d)"><rect x="158.9" y="114.4" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><g filter="url(#filter9_d)"><rect x="158.9" y="122.4" width="4.2" height="4.2" rx="2.1" stroke="#3F4B5B" stroke-width=".3"/></g><rect x="155.3" y="61.8" width="105.5" height="7" rx="3.5" fill="#9EA9B8" fill-opacity=".7"/><rect x="167.5" y="73.3" width="19.6" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="81.4" width="22.7" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="89.4" width="38.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="97.4" width="40.5" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/>
|
9 |
<rect x="167.5" y="105.5" width="56.6" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="113.5" width="23.4" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/><rect x="167.5" y="121.5" width="12.6" height="4.9" rx="2.4" fill="#9AA6B5" fill-opacity=".5"/></g></g><g filter="url(#filter10_d)"><rect x="128.7" y="126.4" width="148.2" height="41.2" rx="4.5" fill="#fff"/><rect x="137.4" y="147.1" width="129.7" height="11.2" rx="1.4" fill="#8F99A6" fill-opacity=".2"/><rect x="137.4" y="135.9" width="115" height="7" rx="3.5" fill="#9EA9B8" fill-opacity=".7"/></g></g></g><defs><filter id="filter0_d" x=".8" y=".9" width="368.4" height="236.6" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="4.1"/><feGaussianBlur stdDeviation="13.1"/><feColorMatrix values="0 0 0 0 0.247059 0 0 0 0 0.294118 0 0 0 0 0.356863 0 0 0 0.15 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter1_d" x="4.6" y="-2.2" width="359.9" height="234.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-2.8"/><feGaussianBlur stdDeviation="11.2"/><feColorMatrix values="0 0 0 0 0.164706 0 0 0 0 0.223529 0 0 0 0 0.294118 0 0 0 0.1 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter2_d" x="158.4" y="73.7" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter3_d" x="158.4" y="81.7" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter4_d" x="158.4" y="89.7" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter5_d" x="158.4" y="97.8" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter6_d" x="158.4" y="106.2" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
10 |
<feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter7_d" x="159.4" y="107.2" width="3.1" height="3.1" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter8_d" x="158.4" y="114.2" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter9_d" x="158.4" y="122.2" width="5.2" height="5.2" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy=".3"/><feGaussianBlur stdDeviation=".2"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.075 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><filter id="filter10_d" x="110.6" y="106.1" width="184.4" height="77.4" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/><feOffset dy="-2.3"/><feGaussianBlur stdDeviation="9"/><feColorMatrix values="0 0 0 0 0.164706 0 0 0 0 0.223529 0 0 0 0 0.294118 0 0 0 0.21 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow"/><feBlend in="SourceGraphic" in2="effect1_dropShadow" result="shape"/></filter><clipPath id="clip0"><rect x="27" y="23" width="316" height="184.2" rx="11.5" fill="#fff"/></clipPath><clipPath id="clip1"><path fill="#fff" transform="translate(27 22.3)" d="M0 0h109.9v306.5H0z"/></clipPath></defs></svg>
|
11 |
+
<h3><?php echo esc_html( $title ); ?></h3>
|
12 |
<?php if ( isset( $info ) ) { ?>
|
13 |
<p><?php echo esc_html( $info ); ?></p>
|
14 |
<?php } ?>
|
classes/views/frm-forms/_publish_box.php
CHANGED
@@ -3,8 +3,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
|
6 |
-
FrmAppController::include_embed_form_icons();
|
7 |
-
|
8 |
if ( 'settings' === FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) ) {
|
9 |
$class = 'frm_submit_settings_btn';
|
10 |
} else {
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
|
|
|
|
|
6 |
if ( 'settings' === FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) ) {
|
7 |
$class = 'frm_submit_settings_btn';
|
8 |
} else {
|
classes/views/frm-forms/list.php
CHANGED
@@ -12,7 +12,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
12 |
'import_link' => true,
|
13 |
)
|
14 |
);
|
15 |
-
FrmAppController::include_embed_form_icons();
|
16 |
?>
|
17 |
<div class="wrap">
|
18 |
<?php
|
12 |
'import_link' => true,
|
13 |
)
|
14 |
);
|
|
|
15 |
?>
|
16 |
<div class="wrap">
|
17 |
<?php
|
classes/views/frm-forms/new-form-overlay.php
CHANGED
@@ -3,11 +3,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
?>
|
6 |
-
<div id="frm_new_form_modal" class="frm_hidden frm_common_modal <?php echo esc_attr( $modal_class ); ?>" frm-page="create">
|
7 |
<div class="metabox-holder">
|
8 |
<div class="postbox">
|
9 |
-
<div>
|
10 |
-
<div>
|
11 |
<span role="button" class="frm-modal-back" title="<?php esc_html_e( 'Back', 'formidable' ); ?>">
|
12 |
<svg class="frmsvg">
|
13 |
<use xlink:href="#frm_back"></use>
|
@@ -49,14 +49,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
49 |
<input type="text" name="template_name" id="frm_template_name" class="frm_long_input" />
|
50 |
</p>
|
51 |
|
52 |
-
<
|
53 |
-
<label for="frm_template_desc" id="frm_new_desc" data-template="<?php esc_attr_e( 'Template Description', 'formidable' ); ?>" data-form="<?php esc_html_e( 'Form Description', 'formidable' ); ?>">
|
54 |
-
<?php esc_html_e( 'Form Description', 'formidable' ); ?>
|
55 |
-
</label>
|
56 |
-
<span class="frm-sub-label"><?php esc_html_e( '(optional)', 'formidable' ); ?></span>
|
57 |
-
<br/>
|
58 |
-
<textarea name="template_desc" id="frm_template_desc" class="frm_long_input"></textarea>
|
59 |
-
</p>
|
60 |
<input type="hidden" name="link" id="frm_link" value="" />
|
61 |
<input type="hidden" name="type" id="frm_action_type" value="frm_install_template" />
|
62 |
|
3 |
die( 'You are not allowed to call this page directly.' );
|
4 |
}
|
5 |
?>
|
6 |
+
<div id="frm_new_form_modal" class="frm_hidden frm-modal frm_common_modal <?php echo esc_attr( $modal_class ); ?>" frm-page="create">
|
7 |
<div class="metabox-holder">
|
8 |
<div class="postbox">
|
9 |
+
<div class="frm_modal_top">
|
10 |
+
<div class="frm-modal-title">
|
11 |
<span role="button" class="frm-modal-back" title="<?php esc_html_e( 'Back', 'formidable' ); ?>">
|
12 |
<svg class="frmsvg">
|
13 |
<use xlink:href="#frm_back"></use>
|
49 |
<input type="text" name="template_name" id="frm_template_name" class="frm_long_input" />
|
50 |
</p>
|
51 |
|
52 |
+
<input type="hidden" name="template_desc" id="frm_template_desc" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
<input type="hidden" name="link" id="frm_link" value="" />
|
54 |
<input type="hidden" name="type" id="frm_action_type" value="frm_install_template" />
|
55 |
|
classes/views/shared/add-button.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|