PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.11
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.11
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Views / admin / form / form_wrapper.php

form_wrapper.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.11, at app/Views/admin/form/form_wrapper.php

192 lines 8.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 let formSettingSidebarStateKey = 'fluentform_settings_sidebar_collapsed';
108 let formSettingSidebarToggle = jQuery('.ff_settings_wrapper .ff_sidebar_toggle');
109 let isFormSettingDesktop = function() {
110 return window.matchMedia('(min-width: 769px)').matches;
111 };
112 let syncFormSettingSidebarMode = function() {
113 if (isFormSettingDesktop() && window.localStorage.getItem(formSettingSidebarStateKey) === 'yes') {
114 formSettingSidebarElem.addClass('ff_settings_sidebar_collapsed');
115 } else if (!isFormSettingDesktop()) {
116 formSettingSidebarElem.removeClass('ff_settings_sidebar_collapsed');
117 }
118 };
119 let updateFormSettingToggleState = function() {
120 let collapseLabel = formSettingSidebarToggle.data('collapse-label') || 'Collapse settings menu';
121 let expandLabel = formSettingSidebarToggle.data('expand-label') || 'Expand settings menu';
122 let isExpanded = isFormSettingDesktop()
123 ? !formSettingSidebarElem.hasClass('ff_settings_sidebar_collapsed')
124 : formSettingSidebarElem.hasClass('active');
125
126 formSettingSidebarToggle
127 .attr('aria-expanded', isExpanded ? 'true' : 'false')
128 .attr('aria-label', isExpanded ? collapseLabel : expandLabel)
129 .attr('title', isExpanded ? collapseLabel : expandLabel);
130 };
131
132 syncFormSettingSidebarMode();
133
134 formSettingSidebarToggle.on('click', function() {
135 if (isFormSettingDesktop()) {
136 formSettingSidebarElem.toggleClass('ff_settings_sidebar_collapsed');
137 window.localStorage.setItem(
138 formSettingSidebarStateKey,
139 formSettingSidebarElem.hasClass('ff_settings_sidebar_collapsed') ? 'yes' : 'no'
140 );
141 updateFormSettingToggleState();
142 return;
143 }
144
145 jQuery(formSettingSidebarElem).add(formSettingOverlayElem).toggleClass('active');
146 updateFormSettingToggleState();
147 });
148
149 jQuery(formSettingOverlayElem).on('click', function() {
150 jQuery(formSettingOverlayElem).add(formSettingSidebarElem).removeClass('active');
151 updateFormSettingToggleState();
152 });
153
154 jQuery(window).on('resize', function() {
155 syncFormSettingSidebarMode();
156 updateFormSettingToggleState();
157 });
158 updateFormSettingToggleState();
159
160 ");
161 ?>
162
163 <div class="ff_form_application_container">
164 <?php
165 do_action_deprecated(
166 'ff_fluentform_form_application_view_' . $route,
167 [
168 $form_id
169 ],
170 FLUENTFORM_FRAMEWORK_UPGRADE,
171 'fluentform/form_application_view_' . $route,
172 'Use fluentform/form_application_view_' . $route . ' instead of ff_fluentform_form_application_view_' . $route
173 );
174 do_action('fluentform/form_application_view_' . $route, $form_id);
175 ?>
176 </div>
177
178 <?php
179 do_action_deprecated(
180 'fluentform_after_form_screen_wrapper',
181 [
182 $form_id,
183 $route
184 ],
185 FLUENTFORM_FRAMEWORK_UPGRADE,
186 'fluentform/after_form_screen_wrapper',
187 'Use fluentform/after_form_screen_wrapper instead of fluentform_after_form_screen_wrapper.'
188 );
189 do_action('fluentform/after_form_screen_wrapper', $form_id, $route);
190 ?>
191 </div>
192