| @@ -6,29 +6,19 @@ | ||
| 6 | 6 | |
| 7 | 7 | <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'post_excerpt', '' ) ); ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" /> |
| 8 | 8 | <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'ID', '' ) ); ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" /> |
| 9 | 9 | |
| 10 | -<?php | |
| 11 | -/** | |
| 12 | - * @since 6.25 | |
| 13 | - * | |
| 14 | - * @param WP_Post $form_action | |
| 15 | - */ | |
| 16 | -do_action( 'frm_action_settings_before_action_name', $form_action ); | |
| 17 | -?> | |
| 18 | - | |
| 19 | -<div class="frm_grid_container"> | |
| 10 | +<div class="frm_grid_container frm_no_p_margin"> | |
| 20 | 11 | <p class="frm6 frm_form_field"> |
| 21 | - <label for="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ); ?>"> | |
| 12 | + <label for="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ); ?>" <?php FrmAppHelper::maybe_add_tooltip( 'action_title' ); ?>> | |
| 22 | 13 | <?php esc_html_e( 'Action Name', 'formidable' ); ?> |
| 23 | - <span <?php FrmAppHelper::maybe_add_tooltip( 'action_title' ); ?>><?php FrmAppHelper::icon_by_class( 'frmfont frm_tooltip_icon frm_svg14' ); ?></span> | |
| 24 | 14 | </label> |
| 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' ) ); ?>" /> | |
| 15 | + <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 <?php FrmAppHelper::maybe_add_tooltip( 'action_title', 'open' ); ?>" id="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ); ?>" /> | |
| 26 | 16 | </p> |
| 27 | 17 | <?php |
| 28 | 18 | |
| 29 | 19 | if ( ! isset( $action_control->action_options['event'] ) ) { |
| 30 | - $action_control->action_options['event'] = 'create'; | |
| 20 | + $events = 'create'; | |
| 31 | 21 | } |
| 32 | 22 | |
| 33 | 23 | if ( ! is_array( $action_control->action_options['event'] ) ) { |
| 34 | 24 | $action_control->action_options['event'] = explode( ',', $action_control->action_options['event'] ); |
| @@ -33,9 +23,9 @@ | ||
| 33 | 23 | if ( ! is_array( $action_control->action_options['event'] ) ) { |
| 34 | 24 | $action_control->action_options['event'] = explode( ',', $action_control->action_options['event'] ); |
| 35 | 25 | } |
| 36 | 26 | |
| 37 | -if ( count( $action_control->action_options['event'] ) === 1 || $action_control->action_options['force_event'] ) { | |
| 27 | +if ( count( $action_control->action_options['event'] ) == 1 || $action_control->action_options['force_event'] ) { | |
| 38 | 28 | foreach ( $action_control->action_options['event'] as $e ) { |
| 39 | 29 | ?> |
| 40 | 30 | <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ); ?>[]" value="<?php echo esc_attr( $e ); ?>" /> |
| 41 | 31 | <?php |
| @@ -49,12 +39,11 @@ | ||
| 49 | 39 | <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 | 40 | <?php |
| 51 | 41 | |
| 52 | 42 | $event_labels = FrmFormAction::trigger_labels(); |
| 53 | - | |
| 54 | 43 | foreach ( $action_control->action_options['event'] as $event ) { |
| 55 | 44 | ?> |
| 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> | |
| 45 | + <option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event ); ?></option> | |
| 57 | 46 | <?php } ?> |
| 58 | 47 | </select> |
| 59 | 48 | </p> |
| 60 | 49 | <?php |
| @@ -95,9 +84,9 @@ | ||
| 95 | 84 | </h3> |
| 96 | 85 | <?php |
| 97 | 86 | } |
| 98 | 87 | |
| 99 | - $action_control->render_conditional_logic_call_to_action( $action_key ); | |
| 88 | + $action_control->render_conditional_logic_call_to_action(); | |
| 100 | 89 | } |
| 101 | 90 | |
| 102 | 91 | // Show Form Action Automation indicator. |
| 103 | 92 | 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,9 +91,10 @@ | ||
| 102 | 91 | // Show Form Action Automation indicator. |
| 103 | 92 | 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 | 93 | $upgrading = FrmAddonsController::install_link( 'autoresponder' ); |
| 105 | 94 | $params = array( |
| 106 | - 'class' => 'frm-h-stack-xs frm-bt-200 frm-py-md frm-mb-xs frm_show_upgrade', | |
| 95 | + 'href' => 'javascript:void(0)', | |
| 96 | + 'class' => 'frm_show_upgrade', | |
| 107 | 97 | 'data-upgrade' => __( 'Form action automations', 'formidable' ), |
| 108 | 98 | 'data-medium' => 'action-automation', |
| 109 | 99 | ); |
| 110 | 100 | |
| @@ -110,28 +100,17 @@ | ||
| 110 | 100 | |
| 111 | 101 | if ( isset( $upgrading['url'] ) ) { |
| 112 | 102 | $params['data-oneclick'] = json_encode( $upgrading ); |
| 113 | 103 | } else { |
| 104 | + $params['class'] .= ' frm_noallow'; | |
| 114 | 105 | $params['data-requires'] = FrmFormsHelper::get_plan_required( $upgrading ); |
| 115 | 106 | } |
| 116 | 107 | ?> |
| 117 | - <div <?php FrmAppHelper::array_to_html_params( $params, true ); ?>> | |
| 118 | - <?php | |
| 119 | - FrmHtmlHelper::toggle( | |
| 120 | - 'frm_autoresponder_cta_' . $action_key, | |
| 121 | - 'frm_autoresponder_cta_' . $action_key, | |
| 122 | - array( | |
| 123 | - 'div_class' => 'with_frm_style frm_toggle', | |
| 124 | - 'checked' => false, | |
| 125 | - 'echo' => true, | |
| 126 | - 'disabled' => true, | |
| 127 | - ) | |
| 128 | - ); | |
| 129 | - ?> | |
| 130 | - <label for="frm_autoresponder_cta_<?php echo esc_attr( $action_key ); ?>" class="frm_noallow"> | |
| 108 | + <h3> | |
| 109 | + <a <?php FrmAppHelper::array_to_html_params( $params, true ); ?>> | |
| 131 | 110 | <?php esc_html_e( 'Setup Automation', 'formidable' ); ?> |
| 132 | - </label> | |
| 133 | - </div> | |
| 111 | + </a> | |
| 112 | + </h3> | |
| 134 | 113 | <?php |
| 135 | 114 | unset( $params ); |
| 136 | 115 | }//end if |
| 137 | 116 | |
| @@ -137,14 +116,13 @@ | ||
| 137 | 116 | |
| 138 | 117 | // Show link to install logs. |
| 139 | 118 | if ( $use_logging ) { |
| 140 | 119 | $upgrading = FrmAddonsController::install_link( 'logs' ); |
| 141 | - | |
| 142 | 120 | if ( isset( $upgrading['url'] ) ) { |
| 143 | 121 | ?> |
| 144 | 122 | <p> |
| 145 | - <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-oneclick="<?php echo esc_attr( json_encode( $upgrading ) ); ?>"> | |
| 146 | - <?php FrmAppHelper::icon_by_class( 'frmfont frm_tooltip_solid_icon', array( 'aria-hidden' => 'true' ) ); ?> | |
| 123 | + <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 ) ); ?>"> | |
| 124 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm_tooltip_solid_icon frm_svg15', array( 'aria-hidden' => 'true' ) ); ?> | |
| 147 | 125 | <?php esc_html_e( 'Install logging to get more information on API requests.', 'formidable' ); ?> |
| 148 | 126 | </a> |
| 149 | 127 | </p> |
| 150 | 128 | <?php |
| @@ -150,9 +128,9 @@ | ||
| 150 | 128 | <?php |
| 151 | 129 | } |
| 152 | 130 | } |
| 153 | 131 | ?> |
| 154 | -<span class="alignright frm_action_id frm-sub-label <?php echo esc_attr( ! empty( $form_action->ID ) ? '' : 'frm_hidden' ); ?>"> | |
| 132 | +<span class="alignright frm_action_id frm-sub-label <?php echo esc_attr( empty( $form_action->ID ) ? 'frm_hidden' : '' ); ?>"> | |
| 155 | 133 | <?php |
| 156 | 134 | /* translators: %1$s: The ID of the form action. */ |
| 157 | 135 | printf( esc_html__( 'Action ID: %1$s', 'formidable' ), esc_attr( $form_action->ID ) ); |
| 158 | 136 | ?> |