| 1 |
<?php |
| 2 |
|
| 3 |
defined('ABSPATH') or die; |
| 4 |
|
| 5 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variables in view files |
| 6 |
use FluentForm\Framework\Helpers\ArrayHelper; |
| 7 |
|
| 8 |
$settings_menu_icons = [ |
| 9 |
'form_settings' => 'ff-icon-setting', |
| 10 |
'email_notifications' => 'ff-icon-email', |
| 11 |
'conditional_confirmations' => 'ff-icon-checkmark-square', |
| 12 |
'all_integrations' => 'ff-icon-puzzle', |
| 13 |
'slack' => 'ff-icon-promotion', |
| 14 |
'custom_css_js' => 'ff-icon-code', |
| 15 |
'landing_pages' => 'ff-icon-web-development', |
| 16 |
'quiz_settings' => 'ff-icon-task', |
| 17 |
'pdf_feeds' => 'ff-icon-document', |
| 18 |
'post_feeds' => 'ff-icon-file-add', |
| 19 |
'payment_settings' => 'ff-icon-payment', |
| 20 |
]; |
| 21 |
?> |
| 22 |
|
| 23 |
<div class="ff_settings_wrapper ff_layout_section"> |
| 24 |
<div id="ff_form_settings_sidebar" class="ff_settings_sidebar_wrap"> |
| 25 |
<div class="ff_settings_sidebar ff_layout_section_sidebar" role="navigation" aria-label="<?php echo esc_attr(__('Form settings menu', 'fluentform')); ?>"> |
| 26 |
<ul class="ff_settings_list ff_list_button"> |
| 27 |
<?php |
| 28 |
$settings_base_url = admin_url('admin.php?page=fluent_forms&form_id='.$form_id.'&route=settings&sub_route=form_settings'); |
| 29 |
$form_settings_route = $settings_menus['form_settings']['route']; |
| 30 |
?> |
| 31 |
<li class="ff_list_button_item has_sub_menu"> |
| 32 |
<a |
| 33 |
class="ff_list_button_link ff-page-scroll" |
| 34 |
data-route_key="<?php echo esc_attr($form_settings_route); ?>" |
| 35 |
aria-label="<?php echo esc_attr(__('Settings', 'fluentform')); ?>" |
| 36 |
title="<?php echo esc_attr(__('Settings', 'fluentform')); ?>" |
| 37 |
href="#confirmation-settings"> |
| 38 |
<i class="ff_settings_menu_icon ff-icon <?php echo esc_attr($settings_menu_icons['form_settings']); ?>" aria-hidden="true"></i> |
| 39 |
<span class="ff_settings_menu_label"><?php echo esc_html(__('Settings', 'fluentform')); ?></span> |
| 40 |
</a> |
| 41 |
<ul class="ff_list_submenu"> |
| 42 |
<li> |
| 43 |
<a class="ff-page-scroll" href="#confirmation-settings"> |
| 44 |
<?php echo esc_html(__('Confirmation Settings', 'fluentform')); ?> |
| 45 |
</a> |
| 46 |
</li> |
| 47 |
<?php if(defined('FLUENTFORMPRO') && $has_double_opt_in): ?> |
| 48 |
<li> |
| 49 |
<a class="ff-page-scroll" |
| 50 |
href="#double-optin-confirmation"> |
| 51 |
<?php echo esc_html(__('Double Opt-in Confirmation', 'fluentform')); ?> |
| 52 |
</a> |
| 53 |
</li> |
| 54 |
<?php endif?> |
| 55 |
<?php if (defined('FLUENTFORMPRO') && \FluentForm\App\Helpers\IntegrationManagerHelper::isIntegrationEnabled('admin_approval')): ?> |
| 56 |
<li> |
| 57 |
<a class="ff-page-scroll" href="#admin_approval"> |
| 58 |
<?php echo esc_html(__('Admin Approval', 'fluentform')); ?> |
| 59 |
</a> |
| 60 |
</li> |
| 61 |
<?php endif ?> |
| 62 |
<li> |
| 63 |
<a class="ff-page-scroll" |
| 64 |
href="#form-layout"> |
| 65 |
<?php echo esc_html(__('Form Layout', 'fluentform')); ?> |
| 66 |
</a> |
| 67 |
</li> |
| 68 |
<li> |
| 69 |
<a class="ff-page-scroll" |
| 70 |
href="#scheduling-and-restrictions"> |
| 71 |
<?php echo esc_html(__('Scheduling & Restrictions', 'fluentform')); ?> |
| 72 |
</a> |
| 73 |
</li> |
| 74 |
<li> |
| 75 |
<a class="ff-page-scroll" |
| 76 |
href="#advanced-form-validation"> |
| 77 |
<?php echo esc_html(__('Advanced Form Validation', 'fluentform')); ?> |
| 78 |
</a> |
| 79 |
</li> |
| 80 |
<li> |
| 81 |
<a class="ff-page-scroll" |
| 82 |
href="#survey-result"> |
| 83 |
<?php echo esc_html(__('Survey Result', 'fluentform')); ?> |
| 84 |
</a> |
| 85 |
</li> |
| 86 |
<li> |
| 87 |
<a class="ff-page-scroll" |
| 88 |
href="#compliance-settings"> |
| 89 |
<?php echo esc_html(__('Compliance Settings', 'fluentform')); ?> |
| 90 |
</a> |
| 91 |
</li> |
| 92 |
<li> |
| 93 |
<a class="ff-page-scroll" |
| 94 |
href="#other"> |
| 95 |
<?php echo esc_html(__('Other', 'fluentform')); ?> |
| 96 |
</a> |
| 97 |
</li> |
| 98 |
</ul> |
| 99 |
</li> |
| 100 |
|
| 101 |
<?php foreach ($settings_menus as $settings_menu_key => $settings_menu): ?> |
| 102 |
<?php if (ArrayHelper::get($settings_menu, 'hash') != 'basic_settings') : ?> |
| 103 |
|
| 104 |
<li class="ff_list_button_item"> |
| 105 |
<?php if(isset($settings_menu['route'])): ?> |
| 106 |
<?php |
| 107 |
$route = $settings_menu['route']; |
| 108 |
?> |
| 109 |
<a class="ff_list_button_link" data-route_key="<?php echo esc_attr($route); ?>" aria-label="<?php echo esc_attr($settings_menu['title']); ?>" title="<?php echo esc_attr($settings_menu['title']); ?>" href="<?php echo esc_url($settings_base_url); ?>#<?php echo esc_attr($route); ?>"> |
| 110 |
<i class="ff_settings_menu_icon ff-icon <?php echo esc_attr(ArrayHelper::get($settings_menu_icons, $settings_menu_key, 'ff-icon-setting')); ?>" aria-hidden="true"></i> |
| 111 |
<span class="ff_settings_menu_label"><?php echo esc_html($settings_menu['title']); ?></span> |
| 112 |
</a> |
| 113 |
<?php else: ?> |
| 114 |
<a |
| 115 |
class="ff_list_button_link <?php if(isset($settings_menu['class'])) { echo esc_attr($settings_menu['class']); } ?>" |
| 116 |
data-settings_key="<?php echo (isset($settings_menu['settings_key'])) ? esc_attr($settings_menu['settings_key']) : '';?>" |
| 117 |
data-component="<?php echo (isset($settings_menu['component'])) ? esc_attr($settings_menu['component']) : '';?>" |
| 118 |
data-hash="<?php echo (isset($settings_menu['hash'])) ? esc_attr($settings_menu['hash']) : '';?>" |
| 119 |
aria-label="<?php echo esc_attr($settings_menu['title']); ?>" |
| 120 |
title="<?php echo esc_attr($settings_menu['title']); ?>" |
| 121 |
href="<?php echo esc_url($settings_base_url).'&sub_route='. esc_attr($settings_menu['slug']); ?><?php if(isset($settings_menu['hash'])) { echo '#'. esc_attr($settings_menu['hash']); } ?>"> |
| 122 |
<i class="ff_settings_menu_icon ff-icon <?php echo esc_attr(ArrayHelper::get($settings_menu_icons, $settings_menu_key, 'ff-icon-setting')); ?>" aria-hidden="true"></i> |
| 123 |
<span class="ff_settings_menu_label"><?php echo esc_html($settings_menu['title']); ?></span> |
| 124 |
</a> |
| 125 |
<?php endif; ?> |
| 126 |
</li> |
| 127 |
|
| 128 |
<?php endif;?> |
| 129 |
<?php endforeach; ?> |
| 130 |
</ul> |
| 131 |
</div> |
| 132 |
<button type="button" class="ff_sidebar_toggle" title="<?php echo esc_attr(__('Collapse settings menu', 'fluentform')); ?>" aria-label="<?php echo esc_attr(__('Collapse settings menu', 'fluentform')); ?>" aria-controls="ff_form_settings_sidebar" aria-expanded="true" data-collapse-label="<?php echo esc_attr(__('Collapse settings menu', 'fluentform')); ?>" data-expand-label="<?php echo esc_attr(__('Expand settings menu', 'fluentform')); ?>"> |
| 133 |
<i class="ff-icon ff-icon-arrow-right" aria-hidden="true"></i> |
| 134 |
<span class="ff_sidebar_toggle_text"><?php echo esc_html(__('Collapse menu', 'fluentform')); ?></span> |
| 135 |
</button> |
| 136 |
</div><!-- .ff_settings_sidebar_wrap --> |
| 137 |
|
| 138 |
<div class="ff_settings_container ff_layout_section_container"> |
| 139 |
<?php |
| 140 |
do_action_deprecated( |
| 141 |
'fluentform_form_settings_container_' . $current_sub_route, |
| 142 |
[ |
| 143 |
$form_id |
| 144 |
], |
| 145 |
FLUENTFORM_FRAMEWORK_UPGRADE, |
| 146 |
'fluentform/form_settings_container_' . $current_sub_route, |
| 147 |
'Use fluentform/form_settings_container_' . $current_sub_route . ' instead of fluentform_form_settings_container_' . $current_sub_route |
| 148 |
); |
| 149 |
do_action('fluentform/form_settings_container_' . $current_sub_route, $form_id); |
| 150 |
?> |
| 151 |
</div> |
| 152 |
</div> |
| 153 |
|