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 +28 -23 6.26 → 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
@@ -52,9 +52,9 @@
52 52 $event_labels = FrmFormAction::trigger_labels();
53 53
54 54 foreach ( $action_control->action_options['event'] as $event ) {
55 55 ?>
56 - <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>
57 57 <?php } ?>
58 58 </select>
59 59 </p>
60 60 <?php
@@ -86,18 +86,12 @@
86 86
87 87 // Show Conditional logic indicator.
88 88 if ( ! FrmAppHelper::pro_is_installed() ) {
89 89 if ( 'email' === $form_action->post_excerpt ) {
90 - ?>
91 - <h3>
92 - <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">
93 - <?php esc_html_e( 'Attachment', 'formidable' ); ?>
94 - </a>
95 - </h3>
96 - <?php
90 + include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_email_attachment_upsell.php';
97 91 }
98 92
99 - $action_control->render_conditional_logic_call_to_action();
93 + $action_control->render_conditional_logic_call_to_action( $action_key );
100 94 }
101 95
102 96 // Show Form Action Automation indicator.
103 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 ) ) {
@@ -102,26 +96,37 @@
102 96 // Show Form Action Automation indicator.
103 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 ) ) {
104 98 $upgrading = FrmAddonsController::install_link( 'autoresponder' );
105 99 $params = array(
106 - 'href' => 'javascript:void(0)',
107 - 'class' => 'frm_show_upgrade',
100 + 'class' => 'frm-h-stack-xs frm-bt-200 frm-py-md frm-mb-xs frm_show_upgrade',
108 101 'data-upgrade' => __( 'Form action automations', 'formidable' ),
109 102 'data-medium' => 'action-automation',
103 + 'data-content' => 'automation',
110 104 );
111 105
112 106 if ( isset( $upgrading['url'] ) ) {
113 107 $params['data-oneclick'] = json_encode( $upgrading );
114 108 } else {
115 - $params['class'] .= ' frm_noallow';
116 109 $params['data-requires'] = FrmFormsHelper::get_plan_required( $upgrading );
117 110 }
118 111 ?>
119 - <h3>
120 - <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">
121 126 <?php esc_html_e( 'Setup Automation', 'formidable' ); ?>
122 - </a>
123 - </h3>
127 + </label>
128 + </div>
124 129 <?php
125 130 unset( $params );
126 131 }//end if
127 132
@@ -131,10 +136,10 @@
131 136
132 137 if ( isset( $upgrading['url'] ) ) {
133 138 ?>
134 139 <p>
135 - <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 ) ); ?>">
136 - <?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' ) ); ?>
137 142 <?php esc_html_e( 'Install logging to get more information on API requests.', 'formidable' ); ?>
138 143 </a>
139 144 </p>
140 145 <?php
@@ -140,9 +145,9 @@
140 145 <?php
141 146 }
142 147 }
143 148 ?>
144 -<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' ); ?>">
145 150 <?php
146 151 /* translators: %1$s: The ID of the form action. */
147 152 printf( esc_html__( 'Action ID: %1$s', 'formidable' ), esc_attr( $form_action->ID ) );
148 153 ?>