html-admin-header-skeleton.php
3 weeks ago
html-admin-page-addons.php
1 year ago
html-admin-page-builder.php
4 months ago
html-admin-page-dashboard.php
2 years ago
html-admin-page-entries-view.php
3 weeks ago
html-admin-page-export.php
1 year ago
html-admin-page-form-migrator.php
2 years ago
html-admin-page-form-templates.php
4 months ago
html-admin-page-import.php
1 year ago
html-admin-page-payments.php
3 weeks ago
html-admin-page-setting.php
2 years ago
html-admin-page-smart-smtp-setup.php
3 weeks ago
html-admin-page-tools-logs.php
2 months ago
html-admin-page-tools.php
3 months ago
html-admin-settings.php
3 weeks ago
html-deactivation-popup.php
3 years ago
html-notice-allow-usage.php
2 months ago
html-notice-custom.php
3 months ago
html-notice-email-failed-notice.php
3 months ago
html-notice-php-deprecation.php
3 months ago
html-notice-review.php
3 months ago
html-notice-survey.php
3 months ago
html-notice-update.php
3 months ago
html-notice-updated.php
3 months ago
html-notice-updating.php
3 months ago
html-admin-settings.php
100 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Settings |
| 4 | * |
| 5 | * @package EverestForms |
| 6 | */ |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | $tab_exists = isset( $tabs[ $current_tab ] ) || has_action( 'everest_forms_sections_' . $current_tab ) || has_action( 'everest_forms_settings_' . $current_tab ); |
| 11 | $current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : ''; |
| 12 | $is_premium_sidebar_enabled = isset( $_COOKIE['isPremiumSidebarEnabled'] ) ? evf_string_to_bool( $_COOKIE['isPremiumSidebarEnabled'] ) : false; |
| 13 | $is_premium_sidebar_class = $is_premium_sidebar_enabled ? 'everest-forms-hidden' : ''; |
| 14 | |
| 15 | if ( ! $tab_exists ) { |
| 16 | wp_safe_redirect( admin_url( 'admin.php?page=evf-settings' ) ); |
| 17 | exit; |
| 18 | } |
| 19 | |
| 20 | $use_react_header = apply_filters( 'everest_forms_use_react_header', true, $current_tab ); |
| 21 | |
| 22 | ?> |
| 23 | |
| 24 | <div class="wrap everest-forms"> |
| 25 | <?php if ( 'integration' !== $current_tab ) : ?> |
| 26 | <form method="<?php echo esc_attr( apply_filters( 'everest_forms_settings_form_method_tab_' . $current_tab, 'post' ) ); ?>" id="mainform" action="" enctype="multipart/form-data"> |
| 27 | <?php endif; ?> |
| 28 | |
| 29 | <h1 class="screen-reader-text"><?php echo esc_html( wp_strip_all_tags( $current_tab_label ) ); ?></h1> |
| 30 | |
| 31 | <?php if ( $use_react_header ) : ?> |
| 32 | <?php include __DIR__ . '/html-admin-header-skeleton.php'; ?> |
| 33 | <?php endif; ?> |
| 34 | |
| 35 | <div class="everest-forms-settings"> |
| 36 | <div class="everest-forms-settings-wrapper"> |
| 37 | <header class="everest-forms-header"> |
| 38 | <div class="everest-forms-header--nav"> |
| 39 | <nav class="nav-tab-wrapper evf-nav-tab-wrapper"> |
| 40 | <?php |
| 41 | foreach ( $tabs as $slug => $label ) { |
| 42 | ?> |
| 43 | <div class="evf-nav__tab-item"> |
| 44 | <a href="<?php echo esc_url( admin_url( 'admin.php?page=evf-settings&tab=' . $slug ) ); ?>" class="nav-tab evf-nav__link <?php echo ( $current_tab === $slug ? 'nav-tab-active is-active' : '' ); ?>"> |
| 45 | <span class="evf-nav__link-icon"> |
| 46 | <?php echo evf_file_get_contents( '/assets/images/settings-icons/' . $slug . '.svg' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 47 | </span> |
| 48 | <span class="evf-nav__link-label"> |
| 49 | <p><?php echo wp_kses_post( $label ); ?></p> |
| 50 | <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> |
| 51 | <path stroke="#383838" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18 6-6-6-6"/> |
| 52 | </svg> |
| 53 | </span> |
| 54 | </a> |
| 55 | <?php if ( $current_tab === $slug ) : ?> |
| 56 | <div class="evf-scroll-ui"> |
| 57 | <?php do_action( 'everest_forms_sections_' . $current_tab ); ?> |
| 58 | </div> |
| 59 | <?php endif; ?> |
| 60 | </div> |
| 61 | <?php |
| 62 | } |
| 63 | do_action( 'everest_forms_settings_tabs' ); |
| 64 | ?> |
| 65 | </nav> |
| 66 | </div> |
| 67 | </header> |
| 68 | |
| 69 | <div class="everest-forms-settings-container"> |
| 70 | <div class="everest-forms-settings-main"> |
| 71 | <?php |
| 72 | self::show_messages(); |
| 73 | do_action( 'everest_forms_settings_' . $current_tab ); |
| 74 | ?> |
| 75 | <p class="submit"> |
| 76 | <?php |
| 77 | if ( empty( $GLOBALS['hide_save_button'] ) ) : |
| 78 | $everest_forms_setting_save_label = apply_filters( 'everest_forms_setting_save_label', esc_attr__( 'Save Changes', 'everest-forms' ) ); |
| 79 | ?> |
| 80 | <button |
| 81 | name="save" |
| 82 | class="everest-forms-btn everest-forms-btn-primary everest-forms-save-button" |
| 83 | type="submit" |
| 84 | value="<?php echo esc_attr( $everest_forms_setting_save_label ); ?>" |
| 85 | > |
| 86 | <?php echo esc_html( $everest_forms_setting_save_label ); ?> |
| 87 | </button> |
| 88 | <?php endif; ?> |
| 89 | <?php wp_nonce_field( 'everest-forms-settings' ); ?> |
| 90 | </p> |
| 91 | </div> |
| 92 | </div> |
| 93 | </div> |
| 94 | </div> |
| 95 | |
| 96 | <?php if ( 'integration' !== $current_tab ) : ?> |
| 97 | </form> |
| 98 | <?php endif; ?> |
| 99 | </div> |
| 100 |