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/form_action.php +30 -27 6.3 → trunk View file →
@@ -2,10 +2,9 @@
2 2 if ( ! defined( 'ABSPATH' ) ) {
3 3 die( 'You are not allowed to call this page directly.' );
4 4 }
5 5
6 -$a = FrmAppHelper::simple_get( 't', 'sanitize_title', 'advanced_settings' );
7 -
6 +$a = FrmAppHelper::simple_get( 't', 'sanitize_title', 'advanced_settings' );
8 7 $form_action = apply_filters( 'frm_form_action_settings', $form_action, $form_action->post_excerpt );
9 8 $form_action = apply_filters( 'frm_form_' . $form_action->post_excerpt . '_action_settings', $form_action );
10 9
11 10 $data_attrs = array(
@@ -20,23 +19,28 @@
20 19 id="frm_form_action_<?php echo esc_attr( $action_key ); ?>"
21 20 class="widget frm_form_action_settings frm_single_<?php echo esc_attr( $form_action->post_excerpt ); ?>_settings <?php echo esc_attr( $form_action->post_status === 'publish' ? '' : 'frm_disabled_action' ); ?>"
22 21 <?php FrmAppHelper::array_to_html_params( $data_attrs, true ); ?>
23 22 >
24 - <div class="widget-top">
25 - <div class="widget-title-action">
26 - <button type="button" class="widget-action hide-if-no-js" aria-expanded="false">
27 - <i class="frm_icon_font frm_arrow_right_icon" aria-hidden="true"></i>
28 - </button>
23 + <div class="widget-top frm-h-stack-xs frm-cursor-pointer" tabindex="0">
24 + <div class="widget-title frm-flex-full">
25 + <h4 class="frm-h-stack-xs frm-text-md">
26 + <span class="frm-border-icon frm-border-icon--small"><?php FrmAppHelper::icon_by_class( $action_control->action_options['classes'], FrmFormActionsController::get_action_icon_atts( $action_control ) ); ?></span>
27 + <span><?php echo esc_html( $form_action->post_title ); ?></span>
28 + </h4>
29 29 </div>
30 - <span class="frm_email_icons alignright">
31 - <?php if ( $action_control->action_options['limit'] > 2 ) { ?>
32 - <a href="javascript:void(0)" class="frm_duplicate_form_action" title="<?php esc_attr_e( 'Duplicate', 'formidable' ); ?>">
33 - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_clone_icon' ); ?>
30 +
31 + <div class="frm-ml-auto frm-h-stack-sm frm-p-sm">
32 + <span class="frm_email_icons frm-flex frm-items-center frm-gap-sm frm-fadein-down-short">
33 + <?php if ( $action_control->action_options['limit'] > 2 ) { ?>
34 + <a href="javascript:void(0)" class="frm_duplicate_form_action" title="<?php esc_attr_e( 'Duplicate', 'formidable' ); ?>">
35 + <?php FrmAppHelper::icon_by_class( 'frmfont frm-copy-icon frm_svg24 frm-text-grey-800' ); ?>
36 + </a>
37 + <?php } ?>
38 +
39 + <a href="javascript:void(0)" data-removeid="frm_form_action_<?php echo esc_attr( $action_key ); ?>" class="frm_remove_form_action" data-frmverify="<?php esc_attr_e( 'Delete this form action?', 'formidable' ); ?>" data-frmverify-btn="frm-button-red" title="<?php esc_attr_e( 'Delete', 'formidable' ); ?>">
40 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_trash_icon frm_svg24 frm-text-grey-800' ); ?>
34 41 </a>
35 - <?php } ?>
36 - <a href="javascript:void(0)" data-removeid="frm_form_action_<?php echo esc_attr( $action_key ); ?>" class="frm_remove_form_action" data-frmverify="<?php esc_attr_e( 'Delete this form action?', 'formidable' ); ?>" data-frmverify-btn="frm-button-red" title="<?php esc_attr_e( 'Delete', 'formidable' ); ?>">
37 - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_delete_icon ' ); ?>
38 - </a>
42 + </span>
39 43
40 44 <?php
41 45 FrmHtmlHelper::toggle(
42 46 $action_control->get_field_id( 'post_status', '' ),
@@ -46,29 +50,28 @@
46 50 'on_label' => 'publish',
47 51 'off_label' => 'OFF',
48 52 'show_labels' => false,
49 53 'echo' => true,
54 + 'div_class' => 'frm-ml-xs',
50 55 )
51 56 );
52 57 ?>
53 - </span>
54 - <div class="widget-title">
55 - <h4>
56 - <span class="frm_form_action_icon frm-outer-circle <?php echo esc_attr( strpos( $action_control->action_options['classes'], 'frm-inverse' ) === false ? '' : ' frm-inverse' ); ?>">
57 - <?php FrmAppHelper::icon_by_class( $action_control->action_options['classes'] ); ?>
58 - </span>
59 - <?php echo esc_html( $form_action->post_title ); ?>
60 - </h4>
58 +
59 + <div class="widget-title-action">
60 + <button type="button" class="widget-action frm-flex frm-p-2xs-force hide-if-no-js" aria-expanded="false">
61 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown8_icon frm_svg14' ); ?>
62 + </button>
63 + </div>
61 64 </div>
62 65 </div>
66 +
63 67 <div class="widget-inside">
64 68 <?php
69 + // Load settings only if just added or open, otherwise include hidden settings to prevent losing the action on update.
65 70 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
66 - // only load settings if they are just added or are open
67 - include( dirname( __FILE__ ) . '/_action_inside.php' );
71 + include __DIR__ . '/_action_inside.php';
68 72 } else {
69 - // include hidden settings so action won't get lost on update
70 - ?>
73 + ?>
71 74 <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 ); ?>" />
72 75 <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'ID', '' ) ); ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" />
73 76 <?php } ?>
74 77 </div>