ProcessWizard.php #15114
-
Where can I find the ProcessWizard.php code for an example when creating a Process Wizard in another module??? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
modules\SSalesProcesses\models\ProcessWizard.php <?php
class SSalesProcesses_ProcessWizard_Model extends Vtiger_ProcessWizard_Model
{
public function load()
{
$this->wizardMap = [
[
'label' => 'PLL_DRAFT',
'conditions' => [
'condition' => 'AND',
'rules' => [
[
'fieldname' => 'ssalesprocesses_status:SSalesProcesses',
'operator' => 'e',
'value' => 'PLL_DRAFT',
],
],
],
'actions' => [
[
'linklabel' => 'PLL_FOR_REALIZATION',
'linkurl' => '#',
'linkhref' => true,
'showLabel' => 1,
'linkicon' => 'mr-2 fas fa-check',
'linkclass' => 'btn-success js-quick-edit-modal',
'linkdata' => [
'module' => $this->recordModel->getModuleName(),
'record' => $this->recordModel->getId(),
'show-layout' => 'vertical',
'edit-fields' => 'none',
'values' => App\Json::encode([
'assigned_user_id' => \App\User::getCurrentUserRealId(),
'ssalesprocesses_status' => 'PLL_FOR_REALIZATION',
]),
],
],
[
'linklabel' => 'PLL_SALE_CANCELLED',
'linkurl' => '#',
'linkhref' => true,
'showLabel' => 1,
'linkicon' => 'mr-2 fas fa-times',
'linkclass' => 'ml-4 btn-danger js-quick-edit-modal',
'linkdata' => [
'module' => $this->recordModel->getModuleName(),
'record' => $this->recordModel->getId(),
'show-layout' => 'vertical',
'edit-fields' => App\Json::encode(['attention']),
'mandatory-fields' => App\Json::encode(['attention']),
'values' => App\Json::encode([
'assigned_user_id' => \App\User::getCurrentUserRealId(),
'ssalesprocesses_status' => 'PLL_SALE_CANCELLED',
]),
],
],
],
'blocks' => [
[
'label' => 'Account',
'type' => 'fields',
'fields' => [
['relatedField' => 'accountname', 'type' => 'relatedField', 'field' => 'related_to'],
['relatedField' => 'phone', 'type' => 'relatedField', 'field' => 'related_to'],
['relatedField' => 'website', 'type' => 'relatedField', 'field' => 'related_to'],
['relatedField' => 'email1', 'type' => 'relatedField', 'field' => 'related_to'],
['relatedField' => 'industry', 'type' => 'relatedField', 'field' => 'related_to'],
['relatedField' => 'accounttype', 'type' => 'relatedField', 'field' => 'related_to'],
['relatedField' => 'vat_id', 'type' => 'relatedField', 'field' => 'related_to'],
],
],
[
'label' => 'XXX',
'type' => 'fields',
'fields' => [
'subject',
'category',
'ssalesprocesses_no',
'estimated',
'actual_sale',
],
],
[
'label' => 'SQuotes',
'type' => 'relatedLists',
'relationId' => 387,
],
],
],
....
];
}
} |
Beta Was this translation helpful? Give feedback.
-
create a file named module and set the value <?php
namespace Config\Modules;
class KnowledgeBase
{
public static $DEFAULT_VIEW_RECORD = 'LBL_RECORD_PROCESS_WIZARD';
} |
Beta Was this translation helpful? Give feedback.
-
Anybody knows how to add the widget to ProcessWizard?? Actually, I want comment widget and summary. I found the pic below from gallery |
Beta Was this translation helpful? Give feedback.
modules\SSalesProcesses\models\ProcessWizard.php