| @@ -1,8 +1,11 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | 3 | die( 'You are not allowed to call this page directly.' ); |
| 4 | 4 | } |
| 5 | + | |
| 6 | +$is_gdpr_enabled = FrmAppHelper::is_gdpr_enabled(); | |
| 7 | + | |
| 5 | 8 | ?> |
| 6 | 9 | <div class="frm_license_box"> |
| 7 | 10 | <h3 class="frm-no-border frm-mt-0"><?php esc_html_e( 'License Key', 'formidable' ); ?></h3> |
| 8 | 11 | <p class="howto"> |
| @@ -11,32 +14,36 @@ | ||
| 11 | 14 | |
| 12 | 15 | <?php do_action( 'frm_before_settings' ); ?> |
| 13 | 16 | </div> |
| 14 | 17 | |
| 15 | -<h3><?php esc_html_e( 'Styling & Scripts', 'formidable' ); ?></h3> | |
| 18 | +<h3><?php esc_html_e( 'Defaults', 'formidable' ); ?></h3> | |
| 16 | 19 | |
| 17 | 20 | <p class="frm_grid_container"> |
| 18 | - <label class="frm4 frm_form_field" for="frm_load_style"> | |
| 19 | - <?php esc_html_e( 'Load form styling', 'formidable' ); ?> | |
| 21 | + <label class="frm4 frm_form_field" for="frm_default_email"> | |
| 22 | + <?php esc_html_e( 'Default Email Address', 'formidable' ); ?> | |
| 23 | + <?php FrmAppHelper::tooltip_icon( __( 'The default email address to receive notifications for new form submissions.', 'formidable' ) ); ?> | |
| 20 | 24 | </label> |
| 21 | - <select id="frm_load_style" name="frm_load_style" class="frm8 frm_form_field"> | |
| 22 | - <option value="all" <?php selected( $frm_settings->load_style, 'all' ); ?>> | |
| 23 | - <?php esc_html_e( 'on every page of my site', 'formidable' ); ?> | |
| 24 | - </option> | |
| 25 | - <option value="dynamic" <?php selected( $frm_settings->load_style, 'dynamic' ); ?>> | |
| 26 | - <?php esc_html_e( 'only on applicable pages', 'formidable' ); ?> | |
| 27 | - </option> | |
| 28 | - <option value="none" <?php selected( $frm_settings->load_style, 'none' ); ?>> | |
| 29 | - <?php esc_html_e( 'Don\'t use form styling on any page', 'formidable' ); ?> | |
| 30 | - </option> | |
| 31 | - </select> | |
| 25 | + <input class="frm_with_left_label frm8" type="text" name="frm_default_email" id="frm_default_email" value="<?php echo esc_attr( $frm_settings->default_email ); ?>" /> | |
| 32 | 26 | </p> |
| 33 | 27 | |
| 34 | -<?php do_action( 'frm_style_general_settings', $frm_settings ); ?> | |
| 28 | +<p class="frm_grid_container"> | |
| 29 | + <label class="frm4 frm_form_field" for="frm_from_email"> | |
| 30 | + <?php esc_html_e( 'Default From Address', 'formidable' ); ?> | |
| 31 | + <?php FrmAppHelper::tooltip_icon( __( 'The "From" address for emails sent from this site.', 'formidable' ) ); ?> | |
| 32 | + </label> | |
| 33 | + <input class="frm_with_left_label frm8" type="text" name="frm_from_email" id="frm_from_email" value="<?php echo esc_attr( $frm_settings->from_email ); ?>" /> | |
| 34 | +</p> | |
| 35 | 35 | |
| 36 | +<?php | |
| 37 | +/** | |
| 38 | + * Trigger an action so Pro can display additional General settings in the Other section. | |
| 39 | + * | |
| 40 | + * @param FrmSettings $frm_settings | |
| 41 | + */ | |
| 42 | +do_action( 'frm_settings_form', $frm_settings ); | |
| 36 | 43 | |
| 37 | -<h3><?php esc_html_e( 'Other', 'formidable' ); ?></h3> | |
| 38 | -<?php do_action( 'frm_settings_form', $frm_settings ); ?> | |
| 44 | +FrmSettingsController::maybe_render_currency_selector( $frm_settings ); | |
| 45 | +?> | |
| 39 | 46 | |
| 40 | 47 | <div class="clear"></div> |
| 41 | 48 | |
| 42 | 49 | <?php if ( ! FrmAppHelper::pro_is_installed() ) { ?> |
| @@ -43,31 +50,70 @@ | ||
| 43 | 50 | <input type="hidden" name="frm_menu" id="frm_menu" value="<?php echo esc_attr( $frm_settings->menu ); ?>"/> |
| 44 | 51 | <input type="hidden" name="frm_mu_menu" id="frm_mu_menu" value="<?php echo esc_attr( $frm_settings->mu_menu ); ?>"/> |
| 45 | 52 | <?php } ?> |
| 46 | 53 | |
| 54 | +<h3><?php esc_html_e( 'GDPR', 'formidable' ); ?></h3> | |
| 55 | +<?php | |
| 56 | +$gdpr_options_wrapper_params = array( 'class' => 'frm_gdpr_options' ); | |
| 57 | + | |
| 58 | +if ( ! $is_gdpr_enabled ) { | |
| 59 | + $gdpr_options_wrapper_params['class'] .= ' frm_hidden'; | |
| 60 | +} | |
| 61 | + | |
| 62 | +$custom_header_ip_wrapper_params = array( 'class' => 'frm_custom_header_ip_cont frm_gdpr_options' ); | |
| 63 | + | |
| 64 | +if ( $frm_settings->no_ips || ! $is_gdpr_enabled ) { | |
| 65 | + $custom_header_ip_wrapper_params['class'] .= ' frm_hidden'; | |
| 66 | +} | |
| 67 | +?> | |
| 47 | 68 | <p> |
| 48 | - <label for="frm_no_ips"> | |
| 69 | + <label> | |
| 70 | + <input type="checkbox" name="frm_enable_gdpr" id="frm_enable_gdpr" value="1" <?php checked( $is_gdpr_enabled, 1 ); ?> data-frmshow=".frm_gdpr_options" data-frmuncheck="#frm_no_gdpr_cookies, #frm_no_ips, #frm_custom_header_ip" /> | |
| 71 | + <?php esc_html_e( 'Enable GDPR related features and enhancements.', 'formidable' ); ?> | |
| 72 | + </label> | |
| 73 | +</p> | |
| 74 | + | |
| 75 | +<p <?php FrmAppHelper::array_to_html_params( $gdpr_options_wrapper_params, true ); ?>> | |
| 76 | + <label> | |
| 77 | + <input type="checkbox" name="frm_no_gdpr_cookies" id="frm_no_gdpr_cookies" value="1" <?php checked( $frm_settings->no_gdpr_cookies, 1 ); ?> /> | |
| 78 | + <?php esc_html_e( 'Disable user tracking cookies. This will disable the option to limit form entries to one per user by cookie.', 'formidable' ); ?> | |
| 79 | + </label> | |
| 80 | +</p> | |
| 81 | + | |
| 82 | +<p <?php FrmAppHelper::array_to_html_params( $gdpr_options_wrapper_params, true ); ?>> | |
| 83 | + <label> | |
| 49 | 84 | <input type="checkbox" name="frm_no_ips" id="frm_no_ips" value="1" <?php checked( $frm_settings->no_ips, 1 ); ?> data-frmhide=".frm_custom_header_ip_cont" /> |
| 50 | - <?php esc_html_e( 'Do not store IPs with form submissions. Check this box for to assist with GDPR compliance.', 'formidable' ); ?> | |
| 85 | + <?php esc_html_e( 'Do not store user IPs with form submissions.', 'formidable' ); ?> | |
| 51 | 86 | </label> |
| 52 | 87 | </p> |
| 53 | - | |
| 54 | -<?php | |
| 55 | -$custom_header_ip_wrapper_params = array( 'class' => 'frm_custom_header_ip_cont' ); | |
| 56 | -if ( $frm_settings->no_ips ) { | |
| 57 | - $custom_header_ip_wrapper_params['class'] .= ' frm_hidden'; | |
| 58 | -} | |
| 59 | -?> | |
| 60 | 88 | <p <?php FrmAppHelper::array_to_html_params( $custom_header_ip_wrapper_params, true ); ?>> |
| 61 | - <label for="frm_custom_header_ip"> | |
| 89 | + <label> | |
| 62 | 90 | <input type="checkbox" name="frm_custom_header_ip" id="frm_custom_header_ip" value="1" <?php checked( $frm_settings->custom_header_ip, 1 ); ?> /> |
| 63 | 91 | <?php esc_html_e( 'Use custom headers when retrieving IPs with form submissions.', 'formidable' ); ?> |
| 64 | - <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Only turn this on if IP addresses are incorrect in entries. Some server setups may require spoofable headers to determine an accurate IP address.', 'formidable' ); ?>"></span> | |
| 92 | + <?php FrmAppHelper::tooltip_icon( __( 'Only turn this on if IP addresses are incorrect in entries. Some server setups may require spoofable headers to determine an accurate IP address.', 'formidable' ) ); ?> | |
| 65 | 93 | </label> |
| 66 | 94 | </p> |
| 95 | +<p class="frm-text-xs frm-mb-0"> | |
| 96 | + <?php | |
| 97 | + $gdpr_utm = array( | |
| 98 | + 'campaign' => 'gdpr-settings', | |
| 99 | + 'content' => 'gdpr-settings-docs', | |
| 100 | + ); | |
| 101 | + printf( | |
| 102 | + // translators: %1$s: Opening tag for a link, %2$s: Closing tag for a link | |
| 103 | + esc_html__( 'Learn more about our GDPR settings %1$shere%2$s', 'formidable' ), | |
| 104 | + '<a href="' . esc_url( FrmAppHelper::admin_upgrade_link( $gdpr_utm, 'knowledgebase/gdpr-settings/' ) ) . '" target="_blank">', | |
| 105 | + '</a>' | |
| 106 | + ); | |
| 107 | + ?> | |
| 108 | +</p> | |
| 109 | +<h3 class="frm-mt-xs"><?php esc_html_e( 'Other', 'formidable' ); ?></h3> | |
| 67 | 110 | |
| 68 | -<p> | |
| 69 | - <label for="frm_admin_bar"> | |
| 70 | - <input type="checkbox" name="frm_admin_bar" id="frm_admin_bar" value="1" <?php checked( $frm_settings->admin_bar, 1 ); ?> /> | |
| 71 | - <?php esc_html_e( 'Do not include Formidable in the admin bar.', 'formidable' ); ?> | |
| 72 | - </label> | |
| 73 | -</p> | |
| 111 | +<?php | |
| 112 | +/** | |
| 113 | + * Trigger an action so Pro can display additional General settings in the Other section. | |
| 114 | + * | |
| 115 | + * @since 6.18 | |
| 116 | + * | |
| 117 | + * @param FrmSettings $frm_settings | |
| 118 | + */ | |
| 119 | +do_action( 'frm_other_settings_form', $frm_settings ); | |