'Wiaas Delivery Process Id', 'is_numeric' => true, 'update_entry_meta_callback' => array( __CLASS__, 'update_entry_delivery_process_id' ), 'is_default_column' => false, // this column will be displayed by default on the entry list 'filter' => array( 'operators' => array( 'is' ), ), ); $entry_meta[ 'wiaas_delivery_order_id' ] = array( 'label' => 'Wiaas Delivery Process Order Id', 'is_numeric' => true, 'update_entry_meta_callback' => null, 'is_default_column' => false, // this column will be displayed by default on the entry list 'filter' => array( 'operators' => array( 'is' ), ), ); $entry_meta[ 'wiaas_delivery_step_name' ] = array( 'label' => 'Wiaas Delivery Step name', 'is_numeric' => false, 'update_entry_meta_callback' => null, 'is_default_column' => false, // this column will be displayed by default on the entry list 'filter' => array( 'operators' => array( 'is' ), ), ); return $entry_meta; } public static function update_entry_delivery_process_id($key, $entry, $form) { if ( isset( $_REQUEST['wiaas_delivery_process_id'] ) ) { return absint( $_REQUEST['wiaas_delivery_process_id'] ); } if ( isset( $entry[ $key ] ) ) { return $entry[ $key ]; } return ''; } public function display_process_steps_details($form, $entry, $current_step) { $delivery_settings = rgar($form, 'wiaas_delivery_process'); if ($delivery_settings['delivery_form_type'] === 'action') { return; } $workflow_api = new Gravity_Flow_API($form['id']); $steps = $workflow_api->get_steps(); foreach ($steps as $index => $step) { if (! $step->is_active()) { continue; } $is_step_running = $step->get_status() === 'pending'; $is_current_step = $step->get_id() === $current_step->get_id(); $disabled_style = $is_step_running ? '' : 'opacity: 0.5'; ?>
| ' . $field->get_value_entry_detail($action_entry[$field->id]) . ' | |
| ' . $label . ' : | ' . '' . $value . ' | ' . '
| View get_status_label($current_action_step->get_status()) ?> | |
Choose if this form will be used as process form or action form.
' . 'Process form defines order delivery process workflow.
' . 'Action form defines custom order data that is collected from delivery process participants.
' )); } public function settings_delivery_action_code() { $this->settings_select(array( 'name' => 'delivery_action_code', 'choices' => array( array( 'value' => '', 'label' => 'Select action code ...' ), array( 'value' => 'customer-acceptance', 'label' => 'Customer acceptance' ), array( 'value' => 'validate-questionnaire', 'label' => 'Validate Questionnaire' ), array( 'value' => 'schedule-meeting', 'label' => 'Schedule meeting' ) ), 'after_select' => 'Choose action code for action form.
' )); } public function settings_delivery_action_form_automatic() { $this->settings_checkbox_and_select(array( 'checkbox' => array( 'label' => esc_html__( 'Enable', 'wiaas' ), 'name' => 'automatic_action_entries_enabled', 'defeault_value' => '0', ), 'select' => array( 'name' => 'automatic_action_entries_type', 'choices' => array( array( 'value' => 'single', 'label' => esc_html__( 'Single entry', 'wiaas' ), ), array( 'value' => 'bundle', 'label' => esc_html__( 'Entry per bundle', 'wiaas' ), ) ), 'after_select' => 'Automatic entries can be created once per order or per every bundle in order.
' . 'Automatic entry will not be created if any required field cannot be populated.
', ) )); } }