| 1 |
<?php |
| 2 |
|
| 3 |
defined('ABSPATH') or die; |
| 4 |
|
| 5 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variables in view files |
| 6 |
?> |
| 7 |
<div class="ff_form_wrap ff_screen_<?php echo esc_attr($route); ?>"> |
| 8 |
<div class="global-overlay" id="form-setting-overlay"></div> |
| 9 |
<?php |
| 10 |
do_action_deprecated( |
| 11 |
'fluentform_before_form_screen_wrapper', |
| 12 |
[ |
| 13 |
$form_id, |
| 14 |
$route |
| 15 |
], |
| 16 |
FLUENTFORM_FRAMEWORK_UPGRADE, |
| 17 |
'fluentform/before_form_screen_wrapper', |
| 18 |
'Use fluentform/before_form_screen_wrapper instead of fluentform_before_form_screen_wrapper.' |
| 19 |
); |
| 20 |
do_action('fluentform/before_form_screen_wrapper', $form_id, $route); |
| 21 |
?> |
| 22 |
|
| 23 |
<div class="form_internal_menu"> |
| 24 |
<?php |
| 25 |
if ( is_array($menu_items) && count($menu_items) < 5){ |
| 26 |
if (isset($_SERVER['HTTP_REFERER'])): ?> |
| 27 |
<div class="ff_menu_back"> |
| 28 |
<?php // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- sanitize_url() handles unslashing ?> |
| 29 |
<a class="ff_menu_link" href="<?php echo esc_url(sanitize_url($_SERVER['HTTP_REFERER'])) ;?>"> |
| 30 |
<span class="el-icon-arrow-left"></span> |
| 31 |
</a> |
| 32 |
</div> |
| 33 |
<?php endif; |
| 34 |
} |
| 35 |
?> |
| 36 |
<div title="<?php echo esc_html($form->title); ?>" class="ff_form_name" id="js-ff-nav-title"> |
| 37 |
<div class="ff_form_name_inner"> |
| 38 |
<?php echo esc_html($form->title); ?> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<?php |
| 42 |
$extra_menu_class = 'normal_form_editor'; |
| 43 |
if (\FluentForm\App\Helpers\Helper::hasPartialEntries($form->id)) $extra_menu_class = "partial_entries_form_editor"; |
| 44 |
?> |
| 45 |
|
| 46 |
<div class="form_internal_menu_inner"> |
| 47 |
<ul class="ff_menu <?php echo esc_attr($extra_menu_class)?>"> |
| 48 |
<?php foreach ($menu_items as $menu_index => $menu_item): ?> |
| 49 |
<li class="<?php if ($route == $menu_item['slug']) echo "active"; ?>"> |
| 50 |
<a class="ff_menu_link" href="<?php echo esc_url($menu_item['url']); ?><?php if (isset($menu_item['hash'])) echo "#". esc_attr($menu_item['hash']); ?>"> |
| 51 |
<?php echo esc_html($menu_item['title']); ?> |
| 52 |
</a> |
| 53 |
</li> |
| 54 |
<?php endforeach; ?> |
| 55 |
</ul> |
| 56 |
|
| 57 |
<div class="ff-navigation-right"> |
| 58 |
<?php |
| 59 |
do_action_deprecated( |
| 60 |
'fluentform_after_form_navigation', |
| 61 |
[ |
| 62 |
$form_id, |
| 63 |
$route |
| 64 |
], |
| 65 |
FLUENTFORM_FRAMEWORK_UPGRADE, |
| 66 |
'fluentform/after_form_navigation', |
| 67 |
'Use fluentform/after_form_navigation instead of fluentform_after_form_navigation.' |
| 68 |
); |
| 69 |
do_action('fluentform/after_form_navigation', $form_id, $route); |
| 70 |
?> |
| 71 |
<?php |
| 72 |
do_action_deprecated( |
| 73 |
'fluentform_after_form_navigation_' . $route, |
| 74 |
[ |
| 75 |
$form_id |
| 76 |
], |
| 77 |
FLUENTFORM_FRAMEWORK_UPGRADE, |
| 78 |
'fluentform/after_form_navigation_' . $route, |
| 79 |
'Use fluentform/after_form_navigation_' . $route . ' instead of fluentform_after_form_navigation_' . $route |
| 80 |
); |
| 81 |
do_action('fluentform/after_form_navigation_' . $route, $form_id); |
| 82 |
?> |
| 83 |
|
| 84 |
<div id="more-menu"> |
| 85 |
<more-menu /> |
| 86 |
</div> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
<span class="ff_menu_toggle"> |
| 90 |
<i class="ff-icon ff-icon-menu"></i> |
| 91 |
</span> |
| 92 |
</div> |
| 93 |
|
| 94 |
<?php |
| 95 |
do_action('fluentform/after_form_menu'); |
| 96 |
|
| 97 |
wp_add_inline_script('fluent_forms_global', " |
| 98 |
//for mobile nav |
| 99 |
let formHeaderMenuElem = jQuery('.form_internal_menu_inner'); |
| 100 |
jQuery('.ff_menu_toggle').on('click', function() { |
| 101 |
formHeaderMenuElem.toggleClass('active'); |
| 102 |
}); |
| 103 |
|
| 104 |
// for setting sidebar |
| 105 |
let formSettingSidebarElem = jQuery('.ff_settings_sidebar_wrap'); |
| 106 |
let formSettingOverlayElem = jQuery('#form-setting-overlay'); |
| 107 |
|
| 108 |
jQuery('.ff_sidebar_toggle').on('click', function() { |
| 109 |
jQuery(formSettingSidebarElem).add(formSettingOverlayElem).toggleClass('active'); |
| 110 |
}); |
| 111 |
|
| 112 |
jQuery(formSettingOverlayElem).on('click', function() { |
| 113 |
jQuery(formSettingOverlayElem).add(formSettingSidebarElem).removeClass('active'); |
| 114 |
}); |
| 115 |
|
| 116 |
|
| 117 |
"); |
| 118 |
?> |
| 119 |
|
| 120 |
<div class="ff_form_application_container"> |
| 121 |
<?php |
| 122 |
do_action_deprecated( |
| 123 |
'ff_fluentform_form_application_view_' . $route, |
| 124 |
[ |
| 125 |
$form_id |
| 126 |
], |
| 127 |
FLUENTFORM_FRAMEWORK_UPGRADE, |
| 128 |
'fluentform/form_application_view_' . $route, |
| 129 |
'Use fluentform/form_application_view_' . $route . ' instead of ff_fluentform_form_application_view_' . $route |
| 130 |
); |
| 131 |
do_action('fluentform/form_application_view_' . $route, $form_id); |
| 132 |
?> |
| 133 |
</div> |
| 134 |
|
| 135 |
<?php |
| 136 |
do_action_deprecated( |
| 137 |
'fluentform_after_form_screen_wrapper', |
| 138 |
[ |
| 139 |
$form_id, |
| 140 |
$route |
| 141 |
], |
| 142 |
FLUENTFORM_FRAMEWORK_UPGRADE, |
| 143 |
'fluentform/after_form_screen_wrapper', |
| 144 |
'Use fluentform/after_form_screen_wrapper instead of fluentform_after_form_screen_wrapper.' |
| 145 |
); |
| 146 |
do_action('fluentform/after_form_screen_wrapper', $form_id, $route); |
| 147 |
?> |
| 148 |
</div> |
| 149 |
|