示例#1
0
文件: item.php 项目: Niqpue/zippyerp
 /**
  * put your comment there...
  * 
  * @param mixed $id    id компонента
  * @param mixed $caller   ссылка на  класс  вызвавшей  страницы
  * @param mixed $callback  имя функции  к  вызвавшей странице  для возврата
  */
 public function __construct($id, $caller, $callback)
 {
     parent::__construct($id);
     $this->caller = $caller;
     $this->callback = $callback;
     $this->add(new Form('itemdetail'));
     $this->itemdetail->add(new TextInput('editname'));
     $this->itemdetail->add(new TextInput('editpriceopt'));
     $this->itemdetail->add(new TextInput('editpriceret'));
     $this->itemdetail->add(new DropDownChoice('editmeasure', \ZippyERP\ERP\Helper::getMeasureList()));
     $this->itemdetail->add(new DropDownChoice('edittype', \ZippyERP\ERP\Entity\Item::getTypeList()));
     $this->itemdetail->add(new DropDownChoice('editgroup', \ZippyERP\ERP\Helper::getItemGroupList()));
     $this->itemdetail->add(new TextInput('editbarcode'));
     $this->itemdetail->add(new TextInput('editcode'));
     $this->itemdetail->add(new TextInput('edituktzed'));
     $this->itemdetail->add(new TextArea('editdescription'));
     $this->itemdetail->add(new SubmitButton('save'))->setClickHandler($this, 'saveOnClick');
     $this->itemdetail->add(new Button('cancel'))->setClickHandler($this, 'cancelOnClick');
 }