diff --git a/application/forms/ProcessForm.php b/application/forms/ProcessForm.php index 604b774..cbc4466 100644 --- a/application/forms/ProcessForm.php +++ b/application/forms/ProcessForm.php @@ -23,24 +23,12 @@ class ProcessForm extends QuickForm /** @var BpNode */ protected $node; - protected $objectList = array(); - - protected $processList = array(); - /** @var SessionNamespace */ protected $session; public function setup() { - if ($this->node === null) { - $this->addElement('text', 'name', array( - 'label' => $this->translate('ID'), - 'required' => true, - 'description' => $this->translate( - 'This is the unique identifier of this process' - ), - )); - } else { + if ($this->node !== null) { $this->addHtml( '

' . $this->getView()->escape( sprintf($this->translate('Modify "%s"'), $this->node->getAlias()) @@ -48,6 +36,14 @@ class ProcessForm extends QuickForm ); } + $this->addElement('text', 'name', [ + 'label' => $this->translate('ID'), + 'value' => (string) $this->node, + 'required' => true, + 'readonly' => $this->node ? true : null, + 'description' => $this->translate('This is the unique identifier of this process') + ]); + $this->addElement('text', 'alias', array( 'label' => $this->translate('Display Name'), 'description' => $this->translate(