Handle process visualization and going from one step to another
This commit is contained in:
@@ -8,6 +8,11 @@ class Wiaas_Field_Order_Supplier_Select extends GF_Field_Select {
|
||||
|
||||
public $type = 'wiaas_order_supplier';
|
||||
|
||||
public function get_input_type() {
|
||||
// set this input type so delivery workflow step can be assigned to supplier in this field
|
||||
return 'workflow_assignee_select';
|
||||
}
|
||||
|
||||
public function get_form_editor_field_title() {
|
||||
return esc_attr__( 'Supplier Select', 'wiaas' );
|
||||
}
|
||||
@@ -41,9 +46,9 @@ class Wiaas_Field_Order_Supplier_Select extends GF_Field_Select {
|
||||
|
||||
private function _get_selected_supplier_display_name($value) {
|
||||
|
||||
list ($order_id, $supplier_id) = explode('|', $value);
|
||||
list ($order_key, $supplier_id) = explode('|', $value);
|
||||
|
||||
if (! empty($order_id) && ! empty($supplier_id) && $order = wc_get_order($order_id)) {
|
||||
if (! empty($supplier_id)) {
|
||||
|
||||
return wiaas_get_organization_name($supplier_id);
|
||||
}
|
||||
@@ -65,7 +70,7 @@ class Wiaas_Field_Order_Supplier_Select extends GF_Field_Select {
|
||||
foreach ($suppliers as $supplier_id => $supplier_name) {
|
||||
|
||||
$choices[] = array(
|
||||
'value' => $order_id . '|' . $supplier_id,
|
||||
'value' => 'wiaas_organization_order_' . $order_id . '|' . $supplier_id,
|
||||
'text' => $supplier_name
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user