public function baseInit() { $dict = new Logic_Branch(); $this->addElement('select', 'web_name', array('required' => $this->default_policy, 'label' => 'Branch', 'MultiOptions' => $this->addClearStart($dict->getDictionary()), 'class' => 'borderGrey roundedCorners inputText')); $this->notEmpty('web_name'); $this->submit(false, 'zapisz', 'Go to'); }
public function baseInit() { $dict = new Logic_Branch(); $this->addElement('select', 'id_branch', array('required' => $this->default_policy, 'label' => 'Branch:', 'MultiOptions' => $this->addClearStart($dict->getDictionary()))); $this->notEmpty('id_branch'); $this->login(); $this->name(); $this->surname(); $this->email(); $this->addElement('text', 'login_def', array('filters' => array(array('StringToUpper'), array('PregReplace', array('match' => '[ ]', 'replace' => ''))), 'required' => $this->default_policy, 'label' => 'Login def:')); $this->notEmpty('login_def'); $this->datee(false, 'valid_until', 'Account valid to:'); $this->submit(); }
public function add($value, array &$invalid) { $form = new Logic_Branch_Form_Generic(); $logic = new Logic_Branch(); if ($value['web_name'] == null) { $value['web_name'] = str_replace(" ", "", $value['symbol_def']); } $form->setDefaults($value); if ($form->isValidPartial($value)) { $logic->createBranch($form); } else { echo $form->getElement('branch_name')->getValue(); $invalid[] = $value; } }
public function deletegroupAction() { $request = $this->getRequest(); $id = $request->getParam('id'); $id = $this->_helper->IdConvert->hexToStr($id); $logic = new Logic_Branch(); $data = array(); try { list($branchgroup, $branches) = $logic->showBranchGroup($id); } catch (Logic_Branch_Exception $e) { $this->_helper->messenger->error(); $this->_helper->redirector('index'); return; } $this->view->data = $branchgroup; $this->view->branches = new Base_Paginator(new Zend_Paginator_Adapter_DbTableSelect($branches)); $this->view->headers = array('branch_name'); }