Skip to content
Permalink
Browse files

Fixed merge conflict

  • Loading branch information...
LiamBailey committed Sep 17, 2017
2 parents 518c016 + 44f9d91 commit 63faf68a84f1aa378ab53e8c03a64cf6692b14f0
@@ -2,11 +2,12 @@ Added support for Members version 2.0+; moved the capabilities to a new Gravity
Added the gravityflow_step_assignees filter.
Added PATCH to the list of request methods in the request method setting of the Outgoing Webhook step settings.
Added Headers to the Outgoing Webhook step settings.
Added the Raw body setting to the OUtgoing webhook step settings.
Added the Raw body setting to the Outgoing webhook step settings.
Updated the {workflow_note} merge tag to support the history modifier to control if notes from previous occurrences of the step are output e.g. {workflow_note:step_id=5 history=true}.
Updated the {workflow_note} merge tag step_id attribute to also support step names e.g. {workflow_note:step_id='manager approval'}.
Fixed an issue populating multi-select fields with the existing entry value on the user input step when the field uses the new json storageType.
Fixed the $original_entry parameter not being passed when the gform_after_update_entry hook is triggered on entry update by the user input step.
Fixed empty fields being displayed on the user input step when 'show empty fields' was not enabled.
Fixed an issue with the shortcode where the gravityflow_status_filter and gravityflow_permission_granted_entry_detail filters don't fire.
Fixed the Dropbox step for Gravity Forms Dropbox Add-On versions 2.0+.
Fixed and issue which can cause an error when the Update Entry step is triggered by the schedule setting or by an anonymous user.
@@ -3552,6 +3552,8 @@ public function status_page( $args = array() ) {
<span><?php esc_html_e( 'Workflow Status', 'gravityflow' ); ?></span>
</h2>

<?php GFCommon::display_admin_message(); ?>

<?php $this->toolbar(); ?>
<?php
endif;
@@ -3632,6 +3634,8 @@ public function reports_page( $args = array() ) {

</h2>

<?php GFCommon::display_admin_message(); ?>

<?php $this->toolbar(); ?>
<?php
endif;
@@ -254,6 +254,28 @@ table.entry-products col.entry-products-col4{
padding-right: 38px;
position: relative;
}

.gravityflow_workflow_wrap div.updated,
.gravityflow_workflow_wrap div.error {
display: block;
background: #fff;
border-left: 4px solid #7ad03a;
-webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
margin: 5px 15px 2px;
padding: 1px 12px;
}

.gravityflow_workflow_wrap div.error {
border-left-color: #dc3232;
}

.gravityflow_workflow_wrap div.updated p,
.gravityflow_workflow_wrap div.error p {
margin: 0.5em 0;
padding: 2px;
}

.wrap .notice, .wrap div.updated, .wrap div.error, .media-upload-form .notice, .media-upload-form div.error {
margin: 5px 0 15px;
}
@@ -22,13 +22,26 @@ abstract class Gravity_Flow_Extension extends GFAddOn {
public function init() {
parent::init();
$meets_requirements = $this->meets_minimum_requirements();
if ( ! $meets_requirements['meets_requirements'] ) {
return;
}
add_filter( 'gravityflow_menu_items', array( $this, 'menu_items' ) );
add_filter( 'gravityflow_toolbar_menu_items', array( $this, 'toolbar_menu_items' ) );
}
public function init_admin() {
parent::init_admin();
$meets_requirements = $this->meets_minimum_requirements();
if ( ! $meets_requirements['meets_requirements'] ) {
return;
}
add_filter( 'gravityflow_settings_menu_tabs', array( $this, 'app_settings_tabs' ) );
add_filter( 'plugin_action_links', array( $this, 'plugin_settings_link' ), 10, 2 );
// Members 2.0+ Integration.
if ( function_exists( 'members_register_cap_group' ) ) {
@@ -58,20 +71,10 @@ public function get_members_capabilities( $caps ) {
public function app_settings_tabs( $settings_tabs ) {
$callback = 'app_settings_tab';
if ( is_callable( array( $this, 'meets_minimum_requirements' ) ) ) {
$meets_requirements = $this->meets_minimum_requirements();
if ( ! $meets_requirements['meets_requirements'] ) {
$callback = 'failed_requirements_page';
}
}
$settings_tabs[] = array(
'name' => $this->_slug,
'label' => $this->get_short_title(),
'callback' => array( $this, $callback ),
'callback' => array( $this, 'app_settings_tab' ),
);
return $settings_tabs;
@@ -242,7 +245,39 @@ public function toolbar_menu_items( $menu_items ) {
* @since 1.7.1-dev
*/
public function failed_requirements_init() {
add_filter( 'plugin_action_links', array( $this, 'plugin_settings_link' ), 10, 2 );
$failed_requirements = $this->meets_minimum_requirements();
// Prepare errors list.
$errors = '';
foreach ( $failed_requirements['errors'] as $error ) {
$errors .= sprintf( '<li>%s</li>', esc_html( $error ) );
}
// Prepare error message.
$error_message = sprintf(
'%s<br />%s<ol>%s</ol>',
sprintf( esc_html__( '%s is not able to run because your WordPress environment has not met the minimum requirements.', 'gravityflow' ), $this->_title ),
sprintf( esc_html__( 'Please resolve the following issues to use %s:', 'gravityflow' ), $this->get_short_title() ),
$errors
);
// Add error message.
GFCommon::add_error_message( $error_message );
}
/**
* Determine if the add-ons minimum requirements have been met with Gravity Forms 2.2+.
*
* @since 1.8.1-dev
*
* @return array
*/
public function meets_minimum_requirements() {
if ( $this->is_gravityforms_supported( '2.2' ) ) {
return parent::meets_minimum_requirements();
}
return array( 'meets_requirements' => true, 'errors' => array() );
}
/**
@@ -22,13 +22,26 @@ abstract class Gravity_Flow_Feed_Extension extends GFFeedAddOn {
public function init() {
parent::init();
$meets_requirements = $this->meets_minimum_requirements();
if ( ! $meets_requirements['meets_requirements'] ) {
return;
}
add_filter( 'gravityflow_menu_items', array( $this, 'menu_items' ) );
add_filter( 'gravityflow_toolbar_menu_items', array( $this, 'toolbar_menu_items' ) );
}
public function init_admin() {
parent::init_admin();
$meets_requirements = $this->meets_minimum_requirements();
if ( ! $meets_requirements['meets_requirements'] ) {
return;
}
add_filter( 'gravityflow_settings_menu_tabs', array( $this, 'app_settings_tabs' ) );
add_filter( 'plugin_action_links', array( $this, 'plugin_settings_link' ), 10, 2 );
// Members 2.0+ Integration.
if ( function_exists( 'members_register_cap_group' ) ) {
@@ -58,20 +71,10 @@ public function get_members_capabilities( $caps ) {
public function app_settings_tabs( $settings_tabs ) {
$callback = 'app_settings_tab';
if ( is_callable( array( $this, 'meets_minimum_requirements' ) ) ) {
$meets_requirements = $this->meets_minimum_requirements();
if ( ! $meets_requirements['meets_requirements'] ) {
$callback = 'failed_requirements_page';
}
}
$settings_tabs[] = array(
'name' => $this->_slug,
'label' => $this->get_short_title(),
'callback' => array( $this, $callback ),
'callback' => array( $this, 'app_settings_tab' ),
);
return $settings_tabs;
@@ -237,13 +240,44 @@ public function toolbar_menu_items( $menu_items ) {
}
/**
* Prevent the failed requirements page being added to the Forms > Settings area.
* Add the settings link to the installed plugins page.
* Add the failed requirements error message.
*
* @since 1.7.1-dev
*/
public function failed_requirements_init() {
add_filter( 'plugin_action_links', array( $this, 'plugin_settings_link' ), 10, 2 );
$failed_requirements = $this->meets_minimum_requirements();
// Prepare errors list.
$errors = '';
foreach ( $failed_requirements['errors'] as $error ) {
$errors .= sprintf( '<li>%s</li>', esc_html( $error ) );
}
// Prepare error message.
$error_message = sprintf(
'%s<br />%s<ol>%s</ol>',
sprintf( esc_html__( '%s is not able to run because your WordPress environment has not met the minimum requirements.', 'gravityflow' ), $this->_title ),
sprintf( esc_html__( 'Please resolve the following issues to use %s:', 'gravityflow' ), $this->get_short_title() ),
$errors
);
// Add error message.
GFCommon::add_error_message( $error_message );
}
/**
* Determine if the add-ons minimum requirements have been met with Gravity Forms 2.2+.
*
* @since 1.8.1-dev
*
* @return array
*/
public function meets_minimum_requirements() {
if ( $this->is_gravityforms_supported( '2.2' ) ) {
return parent::meets_minimum_requirements();
}
return array( 'meets_requirements' => true, 'errors' => array() );
}
/**
Oops, something went wrong.

0 comments on commit 63faf68

Please sign in to comment.
You can’t perform that action at this time.