public function __construct() { parent::__construct(); $this->metadatads = new \ZCL\DB\EntityDataSource("\\ZippyERP\\ERP\\Entity\\MetaData", "", "description"); $this->roleaccessds = new \Zippy\Html\DataList\ArrayDataSource(null); $this->add(new Panel('listpan')); $this->listpan->add(new Form('filter'))->setSubmitHandler($this, 'filterOnSubmit'); $this->listpan->filter->add(new CheckBox('fdoc'))->setChecked(true); $this->listpan->filter->add(new CheckBox('fdic'))->setChecked(true); $this->listpan->filter->add(new CheckBox('frep'))->setChecked(true); $this->listpan->filter->add(new CheckBox('freg'))->setChecked(true); $this->listpan->filter->add(new CheckBox('fpage'))->setChecked(true); $this->listpan->add(new ClickLink('addnew'))->setClickHandler($this, 'addnewOnClick'); $this->listpan->add(new DataView('metarow', $this->metadatads, $this, 'metarowOnRow'))->Reload(); $this->add(new Panel('editpan'))->setvisible(false); $this->editpan->add(new Form('editform'))->setSubmitHandler($this, 'editformOnSubmit'); $this->editpan->editform->add(new TextInput('meta_id')); $this->editpan->editform->add(new TextInput('edit_description')); $this->editpan->editform->add(new TextInput('edit_meta_name')); $this->editpan->editform->add(new TextInput('edit_menugroup')); $this->editpan->editform->add(new TextArea('edit_notes')); $this->editpan->editform->add(new CheckBox('edit_disabled')); $this->editpan->editform->add(new DropDownChoice('edit_meta_type')); $this->editpan->add(new ClickLink('cancel'))->setClickHandler($this, 'cancelOnClick'); $this->editpan->editform->add(new DataView('rolerow', $this->roleaccessds, $this, 'rolerowOnRow')); // $this->editpan->editform->add(new Panel('eipan')); // $this->editpan->editform->eipan->add(new RedirectLink('exportzip', "")); // $this->editpan->editform->eipan->add(new \Zippy\Html\Form\File('importfile')); }
public function __construct() { parent::__construct(); $form = new \Zippy\Html\Form\Form('regform'); $form->add(new TextInput('r_userlogin', new Bind($this, '_login'))); $form->add(new TextInput('r_userpassword', new Bind($this, '_password'))); $form->add(new TextInput('r_confirmpassword', new Bind($this, '_confirm'))); $form->add(new \Zippy\Html\Form\SubmitButton('r_submit'))->setClickHandler($this, 'onsubmit'); $this->add($form); }
public function beforeRender() { parent::beforeRender(); $roles = array(); $roles[] = 'Пользователь'; $rolelist = Role::find('role_id in (select role_id from system_user_role where user_id = ' . $this->user->user_id . ')'); if (count($rolelist) > 0) { foreach ($rolelist as $role) { $roles[] = $role->description; } } $this->userroles->setText(implode('<br>', $roles), true); }
public function __construct() { parent::__construct(); $this->add(new Form('detail')); $this->detail->add(new TextInput('name')); $this->detail->add(new TextInput('edrpou')); $this->detail->add(new TextInput('koatuu')); $this->detail->add(new TextInput('kopfg')); $this->detail->add(new TextInput('kodu')); $this->detail->add(new TextInput('kved')); $this->detail->add(new TextInput('gni')); $this->detail->add(new TextInput('inn')); $this->detail->add(new TextInput('city')); $this->detail->add(new TextInput('street')); $this->detail->add(new TextInput('phone')); $this->detail->add(new TextInput('manager')); $this->detail->add(new TextInput('accounter')); $this->detail->add(new TextInput('email')); $this->detail->add(new DropDownChoice('bank', \ZippyERP\ERP\Entity\Bank::findArray('bank_name', '', 'bank_name'))); $this->detail->add(new TextInput('bankaccount')); $this->detail->add(new SubmitButton('detailsave'))->setClickHandler($this, 'saveDetailOnClick'); $this->add(new Form('common')); $this->common->add(new Date('closeddate')); $this->common->add(new TextInput('nds')); $this->common->add(new CheckBox('hasnds')); $this->common->add(new CheckBox('simpletax')); $this->common->add(new CheckBox('juridical')); $this->common->add(new SubmitButton('commonsave'))->setClickHandler($this, 'saveCommonOnClick'); $detail = \ZippyERP\System\System::getOptions("firmdetail"); if (!is_array($detail)) { $detail = array(); } $this->detail->name->setText($detail['name']); $this->detail->edrpou->setText($detail['edrpou']); $this->detail->koatuu->setText($detail['koatuu']); $this->detail->kopfg->setText($detail['kopfg']); $this->detail->kodu->setText($detail['kodu']); $this->detail->kved->setText($detail['kved']); $this->detail->gni->setText($detail['gni']); $this->detail->inn->setText($detail['inn']); $this->detail->city->setText($detail['city']); $this->detail->street->setText($detail['street']); $this->detail->manager->setText($detail['manager']); $this->detail->accounter->setText($detail['accounter']); $this->detail->phone->setText($detail['phone']); $this->detail->email->setText($detail['email']); $f = \ZippyERP\ERP\Entity\MoneyFund::findOne('ftype = 1'); if ($f != null) { $this->detail->bank->setValue($f->bank); $this->detail->bankaccount->setText($f->bankaccount); } $common = \ZippyERP\System\System::getOptions("common"); if (!is_array($common)) { $common = array(); } $this->common->closeddate->setDate($common['closeddate']); $this->common->nds->setText($common['nds']); $this->common->hasnds->setChecked($common['hasnds']); $this->common->simpletax->setChecked($common['simpletax']); $this->common->juridical->setChecked($common['juridical']); }
public function afterRequest() { parent::afterRequest(); $this->getComponent('userrow')->Reload(); }
public function __construct() { parent::__construct(); }