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
← All changes | classes/views/frm-form-actions/_action_inside.php +30 -23 6.25.1 → trunk View file →
@@ -15,13 +15,13 @@
15 15 */
16 16 do_action( 'frm_action_settings_before_action_name', $form_action );
17 17 ?>
18 18
19 -<div class="frm_grid_container frm_no_p_margin">
19 +<div class="frm_grid_container">
20 20 <p class="frm6 frm_form_field">
21 21 <label for="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ); ?>">
22 22 <?php esc_html_e( 'Action Name', 'formidable' ); ?>
23 - <span <?php FrmAppHelper::maybe_add_tooltip( 'action_title' ); ?>><?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_tooltip_icon frm_svg14' ); ?></span>
23 + <span <?php FrmAppHelper::maybe_add_tooltip( 'action_title' ); ?>><?php FrmAppHelper::icon_by_class( 'frmfont frm_tooltip_icon frm_svg14' ); ?></span>
24 24 </label>
25 25 <input type="text" name="<?php echo esc_attr( $action_control->get_field_name( 'post_title', '' ) ); ?>" value="<?php echo esc_attr( $form_action->post_title ); ?>" class="large-text" id="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ); ?>" />
26 26 </p>
27 27 <?php
@@ -26,9 +26,9 @@
26 26 </p>
27 27 <?php
28 28
29 29 if ( ! isset( $action_control->action_options['event'] ) ) {
30 - $events = 'create';
30 + $action_control->action_options['event'] = 'create';
31 31 }
32 32
33 33 if ( ! is_array( $action_control->action_options['event'] ) ) {
34 34 $action_control->action_options['event'] = explode( ',', $action_control->action_options['event'] );
@@ -33,9 +33,9 @@
33 33 if ( ! is_array( $action_control->action_options['event'] ) ) {
34 34 $action_control->action_options['event'] = explode( ',', $action_control->action_options['event'] );
35 35 }
36 36
37 -if ( count( $action_control->action_options['event'] ) == 1 || $action_control->action_options['force_event'] ) {
37 +if ( count( $action_control->action_options['event'] ) === 1 || $action_control->action_options['force_event'] ) {
38 38 foreach ( $action_control->action_options['event'] as $e ) {
39 39 ?>
40 40 <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ); ?>[]" value="<?php echo esc_attr( $e ); ?>" />
41 41 <?php
@@ -49,11 +49,12 @@
49 49 <select name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ); ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id( 'event' ) ); ?>">
50 50 <?php
51 51
52 52 $event_labels = FrmFormAction::trigger_labels();
53 +
53 54 foreach ( $action_control->action_options['event'] as $event ) {
54 55 ?>
55 - <option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( $event_labels[ $event ] ?? $event ); ?></option>
56 + <option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'], true ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( $event_labels[ $event ] ?? $event ); ?></option>
56 57 <?php } ?>
57 58 </select>
58 59 </p>
59 60 <?php
@@ -85,18 +86,12 @@
85 86
86 87 // Show Conditional logic indicator.
87 88 if ( ! FrmAppHelper::pro_is_installed() ) {
88 89 if ( 'email' === $form_action->post_excerpt ) {
89 - ?>
90 - <h3>
91 - <a href="javascript:void(0)" class="frm_show_upgrade frm_noallow" data-upgrade="<?php esc_attr_e( 'Email attachments', 'formidable' ); ?>" data-message="<?php esc_attr_e( 'Email a CSV or a PDF of each new entry, or attach a file of your choice.', 'formidable' ); ?>" data-medium="email-attachment">
92 - <?php esc_html_e( 'Attachment', 'formidable' ); ?>
93 - </a>
94 - </h3>
95 - <?php
90 + include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_email_attachment_upsell.php';
96 91 }
97 92
98 - $action_control->render_conditional_logic_call_to_action();
93 + $action_control->render_conditional_logic_call_to_action( $action_key );
99 94 }
100 95
101 96 // Show Form Action Automation indicator.
102 97 if ( ! function_exists( 'load_frm_autoresponder' ) && in_array( $form_action->post_excerpt, apply_filters( 'frm_autoresponder_allowed_actions', array( 'email', 'twilio', 'api', 'register' ) ), true ) ) {
@@ -101,26 +96,37 @@
101 96 // Show Form Action Automation indicator.
102 97 if ( ! function_exists( 'load_frm_autoresponder' ) && in_array( $form_action->post_excerpt, apply_filters( 'frm_autoresponder_allowed_actions', array( 'email', 'twilio', 'api', 'register' ) ), true ) ) {
103 98 $upgrading = FrmAddonsController::install_link( 'autoresponder' );
104 99 $params = array(
105 - 'href' => 'javascript:void(0)',
106 - 'class' => 'frm_show_upgrade',
100 + 'class' => 'frm-h-stack-xs frm-bt-200 frm-py-md frm-mb-xs frm_show_upgrade',
107 101 'data-upgrade' => __( 'Form action automations', 'formidable' ),
108 102 'data-medium' => 'action-automation',
103 + 'data-content' => 'automation',
109 104 );
110 105
111 106 if ( isset( $upgrading['url'] ) ) {
112 107 $params['data-oneclick'] = json_encode( $upgrading );
113 108 } else {
114 - $params['class'] .= ' frm_noallow';
115 109 $params['data-requires'] = FrmFormsHelper::get_plan_required( $upgrading );
116 110 }
117 111 ?>
118 - <h3>
119 - <a <?php FrmAppHelper::array_to_html_params( $params, true ); ?>>
112 + <div <?php FrmAppHelper::array_to_html_params( $params, true ); ?>>
113 + <?php
114 + FrmHtmlHelper::toggle(
115 + 'frm_autoresponder_cta_' . $action_key,
116 + 'frm_autoresponder_cta_' . $action_key,
117 + array(
118 + 'div_class' => 'with_frm_style frm_toggle',
119 + 'checked' => false,
120 + 'echo' => true,
121 + 'disabled' => true,
122 + )
123 + );
124 + ?>
125 + <label for="frm_autoresponder_cta_<?php echo esc_attr( $action_key ); ?>" class="frm_noallow">
120 126 <?php esc_html_e( 'Setup Automation', 'formidable' ); ?>
121 - </a>
122 - </h3>
127 + </label>
128 + </div>
123 129 <?php
124 130 unset( $params );
125 131 }//end if
126 132
@@ -126,13 +132,14 @@
126 132
127 133 // Show link to install logs.
128 134 if ( $use_logging ) {
129 135 $upgrading = FrmAddonsController::install_link( 'logs' );
136 +
130 137 if ( isset( $upgrading['url'] ) ) {
131 138 ?>
132 139 <p>
133 - <a href="javascript:void(0)" class="frm_show_upgrade" data-upgrade="<?php esc_attr_e( 'Form action logs', 'formidable' ); ?>" data-medium="action-logs" data-oneclick="<?php echo esc_attr( json_encode( $upgrading ) ); ?>">
134 - <?php FrmAppHelper::icon_by_class( 'frmfont frm_tooltip_solid_icon frm_svg15', array( 'aria-hidden' => 'true' ) ); ?>
140 + <a href="javascript:void(0)" class="frm_show_upgrade frm-h-stack-xs" data-upgrade="<?php esc_attr_e( 'Form action logs', 'formidable' ); ?>" data-medium="action-logs" data-content="logs" data-oneclick="<?php echo esc_attr( json_encode( $upgrading ) ); ?>">
141 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_tooltip_solid_icon', array( 'aria-hidden' => 'true' ) ); ?>
135 142 <?php esc_html_e( 'Install logging to get more information on API requests.', 'formidable' ); ?>
136 143 </a>
137 144 </p>
138 145 <?php
@@ -138,9 +145,9 @@
138 145 <?php
139 146 }
140 147 }
141 148 ?>
142 -<span class="alignright frm_action_id frm-sub-label <?php echo esc_attr( empty( $form_action->ID ) ? 'frm_hidden' : '' ); ?>">
149 +<span class="alignright frm_action_id frm-sub-label <?php echo esc_attr( ! empty( $form_action->ID ) ? '' : 'frm_hidden' ); ?>">
143 150 <?php
144 151 /* translators: %1$s: The ID of the form action. */
145 152 printf( esc_html__( 'Action ID: %1$s', 'formidable' ), esc_attr( $form_action->ID ) );
146 153 ?>