diff --git a/blueprint.json b/blueprint.json deleted file mode 100644 index 82f8ae7..0000000 --- a/blueprint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "steps": [ - { - "step": "activatePlugin", - "pluginPath": "/wordpress/wp-content/plugins/formscrm/formscrm.php" - } - ] -} \ No newline at end of file diff --git a/includes/formscrm-library/class-gravityforms-widget.php b/includes/formscrm-library/class-gravityforms-widget.php index af81bf6..56c63fb 100644 --- a/includes/formscrm-library/class-gravityforms-widget.php +++ b/includes/formscrm-library/class-gravityforms-widget.php @@ -47,60 +47,135 @@ public function widget_resend_entries( $meta_boxes, $entry, $form ) { * @param array $args An array containing the form and entry objects. */ public function resend_metabox( $args ) { - $html = ''; - $action = 'formscrm_process_feeds'; - $form = ! empty( $args['form'] ) ? $args['form'] : array(); - $form_id = isset( $form['id'] ) ? (int) $form['id'] : 0; - $entry = ! empty( $args['entry'] ) ? $args['entry'] : array(); + $html = ''; + $action = 'formscrm_process_feeds'; + $form = ! empty( $args['form'] ) ? $args['form'] : array(); + $form_id = isset( $form['id'] ) ? (int) $form['id'] : 0; + $entry = ! empty( $args['entry'] ) ? $args['entry'] : array(); + $entry_id = isset( $entry['id'] ) ? (int) $entry['id'] : 0; $feeds = GFCRM::get_instance()->get_feeds( null, $form_id, 'formscrm', true ); - if ( rgpost( 'action' ) === $action ) { - check_admin_referer( 'gforms_save_entry', 'gforms_save_entry' ); - $html .= '
' . esc_html__( 'Feeds processed:', 'formscrm' ) . '
'; - $html .= '' . esc_html__( 'Security check failed. Please try again.', 'formscrm' ) . '
'; + } else { + // Get selected feed(s). + $selected_feeds = isset( $_POST['formscrm_selected_feeds'] ) && is_array( $_POST['formscrm_selected_feeds'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['formscrm_selected_feeds'] ) ) : array(); // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified above. + $process_all = in_array( 'all', $selected_feeds, true ); + + $html .= '' . esc_html__( 'Feeds processed:', 'formscrm' ) . '
'; + $html .= '' . esc_html__( 'This will resend the entry to the CRM.', 'formscrm' ) . '
'; - $html .= '' . esc_html__( 'Actual feeds actived:', 'formscrm' ) . '
'; - $html .= '' . esc_html__( 'This will resend the entry to the CRM.', 'formscrm' ) . '
'; + $html .= '' . esc_html__( 'Actual feeds actived:', 'formscrm' ) . '
'; + $html .= '' . esc_html__( 'No active feeds found for this form.', 'formscrm' ) . '
'; } - echo wp_kses_post( $html ); + + echo wp_kses( + $html, + array( + 'p' => array( 'style' => array() ), + 'strong' => array(), + 'ul' => array(), + 'li' => array(), + 'br' => array(), + 'form' => array( + 'method' => array(), + 'style' => array(), + ), + 'input' => array( + 'type' => array(), + 'name' => array(), + 'value' => array(), + 'class' => array(), + 'id' => array(), + ), + 'select' => array( + 'name' => array(), + 'id' => array(), + 'multiple' => array(), + 'style' => array(), + ), + 'option' => array( + 'value' => array(), + ), + 'label' => array( + 'for' => array(), + ), + 'em' => array(), + ) + ); } } new FormsCRM_GravityForms_Widget(); diff --git a/readme.txt b/readme.txt index 2d8c152..deb9b6c 100644 --- a/readme.txt +++ b/readme.txt @@ -130,7 +130,9 @@ WordPress installation and then activate the Plugin from Plugins page. [Official Repository GitHub](https://github.com/closemarketing/formscrm/) == Changelog == -= 4.2.2 = += n.e.x.t. = +* Fixed: Resend button missing in Gravity Forms Entries view. +* Enhanced: Added feed selector in Resend Entry widget to choose between all feeds or individual feed. * Added date conversion in Clientify for birthday field. = 4.2.1 =