| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
$is_gdpr_enabled = FrmAppHelper::is_gdpr_enabled(); |
| 6 |
|
| 7 |
?> |
| 8 |
<div class="frm_license_box"> |
| 9 |
<h3 class="frm-no-border frm-mt-0"><?php esc_html_e( 'License Key', 'formidable' ); ?></h3> |
| 10 |
<p class="howto"> |
| 11 |
<?php esc_html_e( 'Your license key provides access to new features and updates.', 'formidable' ); ?> |
| 12 |
</p> |
| 13 |
|
| 14 |
<?php do_action( 'frm_before_settings' ); ?> |
| 15 |
</div> |
| 16 |
|
| 17 |
<h3><?php esc_html_e( 'Defaults', 'formidable' ); ?></h3> |
| 18 |
|
| 19 |
<p class="frm_grid_container"> |
| 20 |
<label class="frm4 frm_form_field" for="frm_default_email"> |
| 21 |
<?php esc_html_e( 'Default Email Address', 'formidable' ); ?> |
| 22 |
<?php FrmAppHelper::tooltip_icon( __( 'The default email address to receive notifications for new form submissions.', 'formidable' ) ); ?> |
| 23 |
</label> |
| 24 |
<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 ); ?>" /> |
| 25 |
</p> |
| 26 |
|
| 27 |
<p class="frm_grid_container"> |
| 28 |
<label class="frm4 frm_form_field" for="frm_from_email"> |
| 29 |
<?php esc_html_e( 'Default From Address', 'formidable' ); ?> |
| 30 |
<?php FrmAppHelper::tooltip_icon( __( 'The "From" address for emails sent from this site.', 'formidable' ) ); ?> |
| 31 |
</label> |
| 32 |
<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 ); ?>" /> |
| 33 |
</p> |
| 34 |
|
| 35 |
<?php |
| 36 |
ob_start(); |
| 37 |
|
| 38 |
/** |
| 39 |
* Trigger an action so Pro can display additional General settings in the Other section. |
| 40 |
* |
| 41 |
* @param FrmSettings $frm_settings |
| 42 |
*/ |
| 43 |
do_action( 'frm_settings_form', $frm_settings ); |
| 44 |
|
| 45 |
$more_html = ob_get_clean(); |
| 46 |
echo $more_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 47 |
|
| 48 |
FrmSettingsController::maybe_render_currency_selector( $frm_settings, $more_html ); |
| 49 |
unset( $more_html ); |
| 50 |
?> |
| 51 |
|
| 52 |
<div class="clear"></div> |
| 53 |
|
| 54 |
<?php if ( ! FrmAppHelper::pro_is_installed() ) { ?> |
| 55 |
<input type="hidden" name="frm_menu" id="frm_menu" value="<?php echo esc_attr( $frm_settings->menu ); ?>"/> |
| 56 |
<input type="hidden" name="frm_mu_menu" id="frm_mu_menu" value="<?php echo esc_attr( $frm_settings->mu_menu ); ?>"/> |
| 57 |
<?php } ?> |
| 58 |
|
| 59 |
<h3><?php esc_html_e( 'GDPR', 'formidable' ); ?></h3> |
| 60 |
<?php |
| 61 |
$gdpr_options_wrapper_params = array( 'class' => 'frm_gdpr_options' ); |
| 62 |
if ( ! $is_gdpr_enabled ) { |
| 63 |
$gdpr_options_wrapper_params['class'] .= ' frm_hidden'; |
| 64 |
} |
| 65 |
$custom_header_ip_wrapper_params = array( 'class' => 'frm_custom_header_ip_cont frm_gdpr_options' ); |
| 66 |
if ( $frm_settings->no_ips || ! $is_gdpr_enabled ) { |
| 67 |
$custom_header_ip_wrapper_params['class'] .= ' frm_hidden'; |
| 68 |
} |
| 69 |
?> |
| 70 |
<p> |
| 71 |
<label> |
| 72 |
<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" /> |
| 73 |
<?php esc_html_e( 'Enable GDPR related features and enhancements.', 'formidable' ); ?> |
| 74 |
</label> |
| 75 |
</p> |
| 76 |
|
| 77 |
<p <?php FrmAppHelper::array_to_html_params( $gdpr_options_wrapper_params, true ); ?>> |
| 78 |
<label> |
| 79 |
<input type="checkbox" name="frm_no_gdpr_cookies" id="frm_no_gdpr_cookies" value="1" <?php checked( $frm_settings->no_gdpr_cookies, 1 ); ?> /> |
| 80 |
<?php esc_html_e( 'Disable user tracking cookies. This will disable the option to limit form entries to one per user by cookie.', 'formidable' ); ?> |
| 81 |
</label> |
| 82 |
</p> |
| 83 |
|
| 84 |
<p <?php FrmAppHelper::array_to_html_params( $gdpr_options_wrapper_params, true ); ?>> |
| 85 |
<label> |
| 86 |
<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" /> |
| 87 |
<?php esc_html_e( 'Do not store user IPs with form submissions.', 'formidable' ); ?> |
| 88 |
</label> |
| 89 |
</p> |
| 90 |
<p <?php FrmAppHelper::array_to_html_params( $custom_header_ip_wrapper_params, true ); ?>> |
| 91 |
<label> |
| 92 |
<input type="checkbox" name="frm_custom_header_ip" id="frm_custom_header_ip" value="1" <?php checked( $frm_settings->custom_header_ip, 1 ); ?> /> |
| 93 |
<?php esc_html_e( 'Use custom headers when retrieving IPs with form submissions.', 'formidable' ); ?> |
| 94 |
<?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' ) ); ?> |
| 95 |
</label> |
| 96 |
</p> |
| 97 |
<p class="frm-text-xs frm-mb-0"> |
| 98 |
<?php |
| 99 |
// translators: %s: Knowledge base URL |
| 100 |
printf( esc_html__( 'Learn more about our GDPR settings', 'formidable' ) . ' <a href="%s" target="_blank">%s</a>', 'https://formidableforms.com/knowledgebase/gdpr-settings/', esc_html__( 'here', 'formidable' ) ); |
| 101 |
?> |
| 102 |
</p> |
| 103 |
<h3 class="frm-mt-xs"><?php esc_html_e( 'Other', 'formidable' ); ?></h3> |
| 104 |
|
| 105 |
<?php |
| 106 |
/** |
| 107 |
* Trigger an action so Pro can display additional General settings in the Other section. |
| 108 |
* |
| 109 |
* @since 6.18 |
| 110 |
* |
| 111 |
* @param FrmSettings $frm_settings |
| 112 |
*/ |
| 113 |
do_action( 'frm_other_settings_form', $frm_settings ); |
| 114 |
|