fix form import
This commit is contained in:
@@ -308,6 +308,27 @@ class Wiaas_Admin_Order_Process_Flow {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$page_size = 20;
|
||||||
|
$search_criteria = array(
|
||||||
|
'status' => 'active',
|
||||||
|
'field_filters' => array(
|
||||||
|
array( 'key' => 'wiaas_delivery_process_id',
|
||||||
|
'value' => $entry['id']
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
$sorting = array( 'key' => 'date_created', 'direction' => 'DESC' );
|
||||||
|
$paging = array( 'offset' => 0, 'page_size' => $page_size );
|
||||||
|
|
||||||
|
$entries = GFAPI::get_entries( $action_form['id'], $search_criteria, $sorting, $paging );
|
||||||
|
|
||||||
|
if (empty($entries)) {
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="submitbox" style="padding: 10px;">
|
<div class="submitbox" style="padding: 10px;">
|
||||||
@@ -317,19 +338,6 @@ class Wiaas_Admin_Order_Process_Flow {
|
|||||||
<?php
|
<?php
|
||||||
echo '<br><br><br>';
|
echo '<br><br><br>';
|
||||||
|
|
||||||
$page_size = 20;
|
|
||||||
$search_criteria = array(
|
|
||||||
'status' => 'active',
|
|
||||||
'field_filters' => array(
|
|
||||||
array( 'key' => 'wiaas_delivery_process_id',
|
|
||||||
'value' => $entry['id']
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
$sorting = array( 'key' => 'date_created', 'direction' => 'DESC' );
|
|
||||||
$paging = array( 'offset' => 0, 'page_size' => $page_size );
|
|
||||||
|
|
||||||
$entries = GFAPI::get_entries( $action_form['id'], $search_criteria, $sorting, $paging );
|
|
||||||
|
|
||||||
foreach ($entries as $action_entry) {
|
foreach ($entries as $action_entry) {
|
||||||
self::_display_step_action_entry($action_form, $action_entry);
|
self::_display_step_action_entry($action_form, $action_entry);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class Wiaas_DB_Update {
|
|||||||
'20191131172850' => 'wiaas_db_update_update_delivery_forms',
|
'20191131172850' => 'wiaas_db_update_update_delivery_forms',
|
||||||
'20191131182856' => 'wiaas_db_update_enable_workflow_inbox_for_roles',
|
'20191131182856' => 'wiaas_db_update_enable_workflow_inbox_for_roles',
|
||||||
'20191201133550' => 'wiaas_db_update_add_bundle_properties_ui_field',
|
'20191201133550' => 'wiaas_db_update_add_bundle_properties_ui_field',
|
||||||
'20191202133550' => 'wiaas_db_update_add_installation_date_delivery_action_form'
|
'20191202133553' => 'wiaas_db_update_add_installation_date_delivery_action_form'
|
||||||
);
|
);
|
||||||
|
|
||||||
public static function execute() {
|
public static function execute() {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -127,7 +127,9 @@ function wiaas_db_update_add_installation_date_delivery_action_form() {
|
|||||||
|
|
||||||
$action_form_json = file_get_contents( dirname( __FILE__ ) . '/data/delivery-forms/delivery-action-enter-installation-date.json' );
|
$action_form_json = file_get_contents( dirname( __FILE__ ) . '/data/delivery-forms/delivery-action-enter-installation-date.json' );
|
||||||
|
|
||||||
$action_form_meta = json_decode( $action_form_json, true )[0];
|
$action_form_meta = json_decode( $action_form_json, true )[0];
|
||||||
|
|
||||||
do_action('gform_forms_post_import', GFAPI::add_form($action_form_meta));
|
$action_form_id = GFAPI::add_form($action_form_meta);
|
||||||
|
|
||||||
|
do_action('gform_forms_post_import', array( GFAPI::get_form($action_form_id) ));
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user