PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / frm-settings / email / email-styles.php

email-styles.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More trunk, at classes/views/frm-settings/email/email-styles.php

109 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * View for email settings
4 *
5 * @since 6.25
6 *
7 * @package Formidable
8 */
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 die( 'You are not allowed to call this page directly.' );
12 }
13
14 $email_styles = FrmEmailStylesController::get_email_styles();
15 $selected_style = FrmEmailStylesController::get_default_email_style();
16 ?>
17 <p><?php esc_html_e( 'Customize your email template and sending preferences.', 'formidable' ); ?></p>
18
19 <h3><?php esc_html_e( 'Styles', 'formidable' ); ?></h3>
20 <p><?php esc_html_e( 'Change how your emails look and feel.', 'formidable' ); ?></p>
21
22 <div id="frm-email-styles" class="frm_clearfix">
23 <?php
24 foreach ( $email_styles as $style_key => $style ) :
25 $html_attrs = array(
26 'class' => 'frm-email-style frm-mb-md',
27 'data-style-key' => $style_key,
28 );
29
30 if ( $style_key === $selected_style ) {
31 $html_attrs['class'] .= ' frm-email-style--selected';
32 }
33
34 if ( empty( $style['selectable'] ) ) {
35 $html_attrs['class'] .= ' frm-email-style--disabled';
36 }
37 ?>
38 <div <?php FrmAppHelper::array_to_html_params( $html_attrs, true ); ?>>
39 <div class="frm-email-style__card">
40 <a href="#" class="frm-email-style__click">
41 <img src="<?php echo esc_url( $style['icon_url'] ); ?>" alt="<?php echo esc_attr( $style['name'] ); ?>">
42 </a>
43
44 <div class="frm-email-style__buttons">
45 <button type="button" class="frm-email-style__button frm-button-primary" data-action="choose">
46 <?php esc_html_e( 'Choose', 'formidable' ); ?>
47 </button>
48
49 <button type="button" class="frm-email-style__button frm-button-primary" disabled="disabled">
50 <?php esc_html_e( 'Selected', 'formidable' ); ?>
51 </button>
52
53 <a href="<?php echo esc_url( FrmEmailStylesController::get_email_style_preview_url( $style_key ) ); ?>" class="frm-email-style__button frm-button-secondary" data-action="preview" target="_blank">
54 <?php esc_html_e( 'Preview', 'formidable' ); ?>
55 </a>
56 </div>
57 </div><!-- End .frm-email-style__card -->
58
59 <div class="frm-email-style__name">
60 <?php if ( empty( $style['selectable'] ) ) : ?>
61 <?php FrmAppHelper::icon_by_class( 'frmfont frm_lock_icon' ); ?>
62 <?php endif; ?>
63 <?php echo esc_html( $style['name'] ); ?>
64 </div>
65 </div><!-- End .frm-email-style -->
66
67 <?php endforeach; ?>
68
69 <input type="hidden" name="frm_email_style" id="frm-email-style-value" value="<?php echo esc_attr( $selected_style ); ?>">
70 </div>
71
72 <hr class="frm-mt-md frm-mb-md" />
73
74 <?php
75 /**
76 * @since 6.25
77 */
78 do_action( 'frm_email_styles_extra_settings' );
79 ?>
80
81 <p class="frm-mb-md">
82 <button id="frm-send-test-email" type="button" class="frm-button-secondary"><?php esc_html_e( 'Send a test email', 'formidable' ); ?></button>
83 </p>
84
85 <div id="frm-send-test-email-modal" class="frm_hidden frm-modal">
86 <div class="metabox-holder">
87 <div class="postbox frm_wrap">
88 <a href="javascript:void(0)" class="dismiss" title="<?php esc_attr_e( 'Dismiss this message', 'formidable' ); ?>">
89 <?php FrmAppHelper::icon_by_class( 'frmfont frm_close_icon', array( 'aria-label' => 'Dismiss' ) ); ?>
90 </a>
91 <div class="inside">
92 <h3><?php esc_html_e( 'Send email test', 'formidable' ); ?></h3>
93
94 <div>
95 <label for="frm-test-email-address"><?php esc_html_e( 'Email address', 'formidable' ); ?></label>
96 <input type="text" id="frm-test-email-address" class="widefat" autofocus />
97 <p class="description"><?php esc_html_e( 'Use commas to separate multiple emails.', 'formidable' ); ?></p>
98 </div>
99
100 <div id="frm-send-test-email-result"></div>
101
102 <p style="text-align: right;">
103 <button type="button" class="frm-button-primary" id="frm-send-test-email-btn"><?php esc_html_e( 'Send Email', 'formidable' ); ?></button>
104 </p>
105 </div>
106 </div>
107 </div>
108 </div>
109