コード例 #1
0
ファイル: Generic.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'branch_name', array('required' => true, 'label' => 'Branch name:', 'maxlength' => '150', 'size' => '100'));
     $this->addElement('text', 'web_name', array('required' => true, 'label' => 'Short name:', 'maxlength' => '10', 'size' => '100', 'validators' => array(array('Regex', true, array('/[a-zA-Z0-9]{1,10}/')))));
     $this->addElement('select', 'id_status', array('required' => true, 'label' => 'Branch status', 'MultiOptions' => $this->addClearStart($dict->setSource('status_oddzial')->getDictionary())));
     $user = new User();
     $this->addElement('select', 'id_manager', array('required' => false, 'label' => 'Dyrektor oddziału', 'MultiOptions' => $this->addClearStart($dict->setSource($user)->getDictionary())));
     $this->addElement('text', 'desk', array('required' => false, 'label' => 'Desks:', 'validators' => array('Digits')));
     $dict = new Base_Dictionary();
     $this->addElement('select', 'type', array('required' => true, 'label' => 'Branch type', 'MultiOptions' => $this->addClearStart($dict->setSource('typ_oddzial')->getDictionary())));
     $bg = new BranchGroup();
     $this->addElement('MultiCheckbox', 'groups', array('required' => false, 'label' => 'Branch groups', 'MultiOptions' => $dict->setSource($bg)->getDictionary()));
     $this->street(false, 'address');
     $this->getElement('address')->removeFilter('StringToUpper');
     $this->postcode();
     $this->city();
     $this->getElement('city')->removeFilter('StringToUpper');
     $this->province();
     $this->addElement('textarea', 'parking_space', array('label' => 'Parking spots', 'filters' => array(new Base_Filter_Stripslashes()), 'required' => false, 'rows' => '4', 'cols' => '95', 'class' => 'textareaCounted'));
     if ($this->getAttrib('map_image')) {
         $this->addElement('text', 'current_img', array('ViewScript', 'label' => 'Obecnie dodaną mapkę: ', 'value' => $this->getAttrib('map_image'), 'readonly' => 'readonly', 'required' => false));
         $this->addElement('hidden', 'current_img_link', array('label' => '<a href="/branch/show/id/' . $this->getAttrib('idHash') . '">Zobacz obecnie dodany obrazek</a>', 'checkedValue' => '1', 'uncheckedValue' => '0', 'required' => false, 'checked' => true))->setDecorators(array(array('Label', array('tag' => 'div', 'class' => 'red')), array('HtmlTag', array('tag' => 'div', 'class' => 'row'))));
         $this->getElement('current_img_link')->getDecorator('label')->setOption('escape', false);
     }
     $this->submit();
     $this->cancel();
 }
コード例 #2
0
ファイル: ViewSelect.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $branchOptions = $this->addClearStart($dict->setSource(new Branch())->getDictionary());
     $new_branchOptions = array();
     foreach ($branchOptions as $key => $option) {
         if ($key > 0) {
             $new_branchOptions[Zend_Controller_Action_HelperBroker::getStaticHelper('IdConvert')->strToHex($key)] = $option;
         } else {
             $new_branchOptions[$key] = $option;
         }
     }
     $this->addElement('select', 'branch', array('required' => $this->default_policy, 'label' => 'Branch:', 'MultiOptions' => $new_branchOptions, 'class' => 'borderGrey roundedCorners inputText'));
     $this->notEmpty('branch');
     $userOptions = $this->addClearStart($dict->setSource(new User())->getDictionary());
     $new_userOptions = array();
     foreach ($userOptions as $key => $option) {
         if ($key > 0) {
             $new_userOptions[Zend_Controller_Action_HelperBroker::getStaticHelper('IdConvert')->strToHex($key)] = $option;
         } else {
             $new_userOptions[$key] = $option;
         }
     }
     $this->addElement('select', 'user', array('required' => $this->default_policy, 'label' => 'User:'******'MultiOptions' => $new_userOptions, 'class' => 'borderGrey roundedCorners inputText'));
     $this->notEmpty('user');
     $this->addElement('submit', 'zapisz', array('label' => 'Change', 'class' => 'button1'));
     $this->prepButton('zapisz');
 }
コード例 #3
0
ファイル: Acceptance.php プロジェクト: knatorski/SMS
 public function getTable($data)
 {
     $htmlarray = array();
     $formName = $data[0]['formClassName'];
     if ($data[0]['formClassName'] === 'Logic_AbstractProduct_Form_Add') {
         foreach ($data[0]['productData'] as $product => $piece) {
             if (!is_null($piece)) {
                 $table = '<table>';
                 foreach ($piece as $productCounter => $val) {
                     $model = new PackageBasicProductDefiniction();
                     $select = $model->select()->from(array('pbpd' => 'package_basic_product_definiction'), array('pbpd.id_basic_product_definiction'))->joinLeft(array('bpd' => 'basic_product_definiction'), 'pbpd.id_basic_product_definiction = bpd.id', array('bpd.name'))->where('pbpd.id = ?', $product)->setIntegrityCheck(false);
                     $product = $model->fetchRow($select);
                     $table .= '<tr><td colspan="2">' . $product->name . ' # ' . $productCounter . '</td></tr>';
                     foreach ($val as $key => $value) {
                         if (array_key_exists($key, $this->neededFieldsDictionary[$formName])) {
                             if (array_key_exists($key, $this->dictionaryFields[$formName])) {
                                 $dict = new Base_Dictionary($baId);
                                 $dictData = $dict->setSource($this->dictionaryFields[$formName][$key])->getDictionary()->toArray();
                                 $table .= '<tr><td>' . $this->neededFieldsDictionary[$formName][$key] . '</td><td>' . $dictData[$value] . '</td></tr>';
                             } else {
                                 if ($key === 'period') {
                                     $modelPeriod = new Period();
                                     $tmp = explode(',', $value);
                                     $logic_deposit = new Logic_Deposit();
                                     $value = $logic_deposit->getCorrectPeriodForm($tmp[0], $tmp[1]);
                                 }
                                 $table .= '<tr><td>' . $this->neededFieldsDictionary[$formName][$key] . '</td><td>' . $value . '</td></tr>';
                             }
                         }
                     }
                     $table .= '<tr><td colspan="2"></td></tr>';
                 }
                 $table .= '</table>';
                 $htmlarray[] = $table;
             }
         }
     } else {
         foreach ($data as $piece) {
             if (!is_null($piece)) {
                 $table = '<table>';
                 foreach ($piece as $key => $value) {
                     if (array_key_exists($key, $this->neededFieldsDictionary[$formName])) {
                         if (array_key_exists($key, $this->dictionaryFields[$formName])) {
                             $dict = new Base_Dictionary($baId);
                             $dictData = $dict->setSource($this->dictionaryFields[$formName][$key])->getDictionary()->toArray();
                             $table .= '<tr><td>' . $this->neededFieldsDictionary[$formName][$key] . '</td><td>' . $dictData[$value] . '</td></tr>';
                         } else {
                             $table .= '<tr><td>' . $this->neededFieldsDictionary[$formName][$key] . '</td><td>' . $value . '</td></tr>';
                         }
                     }
                 }
                 $table .= '</table>';
                 $htmlarray[] = $table;
             }
         }
     }
     $htmlData = implode('</br>', $htmlarray);
     return $htmlData;
 }
コード例 #4
0
ファイル: Search.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'ws_service_id', array('label' => "Usługa", 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceSms(), array('ghost = false'), 'id ASC', 'id', array('service_login'))->getDictionary())));
     $this->addElement('checkbox', 'is_archived', array('label' => "Zarchiwizowane"));
     $this->search();
     $this->cancel(false, 'clear', 'Clear');
 }
コード例 #5
0
ファイル: Search.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'shipping_type', array('label' => 'Rodzaj klienta', 'MultiOptions' => $this->addClearStart($dict->setSource('shipping_type')->getDictionary())));
     $this->search();
     $this->cancel(false, 'cancel', 'Clear');
     //        $this->reset();
 }
コード例 #6
0
ファイル: Search.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'sender_address', array('label' => "Adres email", 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceMail(), array('ghost = false'), 'id', 'id', array('sender_address'))->getDictionary())));
     $this->addElement('select', 'default_title', array('label' => "Nadawca", 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceMail(), array('ghost = false'), 'id', 'id', array('default_title'))->getDictionary())));
     $this->submit(false, 'submit', 'Search');
     $this->cancel(false, 'clear', 'Clear');
 }
コード例 #7
0
ファイル: UserGroupSelect.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'group', array('required' => $this->default_policy, 'label' => 'Group:', 'MultiOptions' => $this->addClearStart($dict->setSource(new UserGroup())->getDictionary()), 'class' => 'borderGrey roundedCorners inputText'));
     $this->notEmpty('group');
     $this->addElement('submit', 'Save', array('label' => 'Assign', 'class' => 'button1'));
     $this->prepButton('Save');
     $this->cancel();
 }
コード例 #8
0
ファイル: Search.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'client_id', array('label' => 'Klient', 'multiOptions' => $this->addClearStart($dict->setSource(new Wsclient(), array(), 'id ASC', 'id', array('client_name'))->getDictionary())));
     $this->addElement('select', 'service_id', array('label' => 'Usługa', 'multiOptions' => $this->addClearStart($dict->setSource(new WsServiceMail(), array(), 'id ASC', 'id', array('sender_address'))->getDictionary())));
     $this->search();
     $this->cancel(false, 'cancel', 'Clear');
     //        $this->reset();
 }
コード例 #9
0
ファイル: Search.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'phone_number', array('label' => 'Numer telefonu'));
     $this->addElement('select', 'service_id', array('label' => 'Usługa', 'multiOptions' => $this->addClearStart($dict->setSource(new WsServiceSms(), array(), 'id', 'id', array('service_login'))->getDictionary())));
     $this->search();
     $this->cancel(false, 'cancel', 'Clear');
     //        $this->reset();
 }
コード例 #10
0
ファイル: Generic.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dictionary = new Base_Dictionary();
     $this->addElement('select', 'ws_service_id', array('required' => true, 'label' => 'Identyfikator usługi', 'MultiOptions' => $this->addClearStart($dictionary->setSource(new WsServiceSms(), array('ghost = false'), 'id ASC', 'id', array('service_login'))->getDictionary())));
     $this->addElement('file', 'pem', array('required' => true, 'label' => 'Plik certyfikatu PEM', 'decorators' => $this->_fileDecorator));
     $this->addElement('file', 'crt', array('required' => true, 'label' => 'Plik certyfikatu CRT', 'decorators' => $this->_fileDecorator));
     $this->submit();
     $this->cancel();
 }
コード例 #11
0
ファイル: Search.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'phone_number', array('label' => "Numer telefonu", 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceSms(), array(), 'id', 'id', array('phone_number'))->getDictionary())));
     $this->addElement('select', 'id_mask', array('label' => "Maska numeru", 'MultiOptions' => $this->addClearStart($dict->setSource('mask')->getDictionary())));
     $this->addElement('select', 'operator_id', array('label' => "Operator", 'MultiOptions' => $this->addClearStart($dict->setSource('operator_gsm')->getDictionary())));
     $this->submit(false, 'submit', 'Search');
     $this->cancel(false, 'clear', 'Clear');
 }
コード例 #12
0
ファイル: Generic.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'ip_comment', array('label' => 'Nazwa'));
     $this->addElement('textarea', 'ip', array('required' => true, 'label' => 'Adresy IP', 'filters' => array(new Zend_Filter_StringTrim())));
     $this->addElement('multiselect', 'clients', array('required' => false, 'label' => 'Lista klientów', 'attribs' => array('style' => 'height: 150px; width: 250px;'), 'MultiOptions' => $this->addClearStart($dict->setSource(new Wsclient(), array('ghost = false', 'shipping_type = ' . Logic_Ws_ServiceSet_ServiceSet::SHIPPING_TYPE_API), 'id ASC', 'id', array('client_name'))->getDictionary())));
     $this->submit();
     $this->cancel();
 }
コード例 #13
0
ファイル: Search.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'sender_address', array('label' => "Adres email", 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceMail(), array(), 'id', 'sender_address', array('sender_address'))->getDictionary())));
     $this->addElement('select', 'smtp_host', array('label' => "Adres SMTP", 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceMail(), array(), 'id', 'smtp_host', array('smtp_host'))->getDictionary())));
     $this->search();
     $this->cancel(false, 'cancel', 'Clear');
     //        $this->reset();
 }
コード例 #14
0
ファイル: Generic.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'name', array('required' => true, 'label' => 'Name'));
     $this->addElement('text', 'code', array('required' => true, 'label' => 'Nazwa kodowa (unikalna)'));
     $this->addElement('select', 'ws_service_id', array('label' => "Usługa", 'required' => true, 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceMail(), array('ghost = false'), 'id', 'id', array('sender_address'))->getDictionary())));
     $this->submit();
     $this->cancel();
 }
コード例 #15
0
ファイル: WsServiceMail.php プロジェクト: knatorski/SMS
 public function getOperatorName()
 {
     if (null === $this->operator_mail_id) {
         throw new Exception("This service has not Mail Operator set.");
     }
     $dict = new Base_Dictionary();
     $operator = $dict->setSource('operator_mail')->getDictionary();
     return $operator[$this->operator_mail_id];
 }
コード例 #16
0
ファイル: Generic.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'ws_client_id', array('required' => true, 'label' => 'Klient', 'multiOptions' => $dict->setSource(new Wsclient())->getDictionary()));
     $this->addElement('text', 'template_name', array('required' => true, 'label' => 'Nazwa (hash)', 'filters' => array(new Logic_Filter_StringToHash())));
     $this->addElement('textarea', 'template_content', array('required' => true, 'label' => 'Treść templatki'));
     $this->submit();
     $this->cancel();
 }
コード例 #17
0
ファイル: Generic.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $this->addElement('text', 'controller', array('required' => true, 'label' => 'Controler:', 'size' => '100'));
     $this->addElement('text', 'action', array('required' => true, 'label' => 'Action:', 'size' => '100'));
     $this->addElement('text', 'module', array('required' => true, 'label' => 'Module:', 'size' => '100', 'value' => 'default'));
     $dict = new Base_Dictionary();
     $this->addElement('Select', 'linkresource_action_type', array('required' => true, 'label' => 'Action type:', 'MultiOptions' => $this->addClearStart($dict->setSource('linkresource_action_type')->getDictionary())));
     $this->submit();
     $this->cancel();
 }
コード例 #18
0
ファイル: Branch.php プロジェクト: knatorski/SMS
 public function getDictionary($idField = 'web_name', $type = false)
 {
     $branch = new Branch();
     $dict = new Base_Dictionary();
     $branch_type = '';
     if ($type) {
         $branch_type = $branch->getAdapter()->quoteInto(' AND type = ?', $type);
     }
     return $dict->setSource(new Branch(), array('ghost = false' . $branch_type), 'web_name asc', $idField, array('web_name', 'address'))->getDictionary(false, ', ');
 }
コード例 #19
0
ファイル: Filter.php プロジェクト: knatorski/SMS
 /**
  * Uzupełnienie województwa o identyfikatory z aplikacyjnych słowników
  *
  * @param array $result
  * @return array
  * @todo refactoring
  */
 private function _amendProvinceDictionary(array $result)
 {
     $data = new Base_Dictionary(Logic_BackendApplication_Chooser::getBackendApplicationId());
     $out = $data->setSource('province', array('ghost = false'), 'entry ASC')->getDictionary()->toArray();
     $mapped = array_map(function ($item) use($out) {
         $item['region_id'] = array_search($item['region'], $out);
         return $item;
     }, $result);
     return $mapped;
 }
コード例 #20
0
ファイル: NewVersion.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'ws_client_id', array('disabled' => true, 'label' => 'Klient', 'multiOptions' => $dict->setSource(new Wsclient())->getDictionary()));
     $this->addElement('text', 'version_num', array('required' => false, 'label' => 'Wersja rodzica', 'disabled' => true));
     $this->addElement('text', 'template_name', array('required' => false, 'label' => 'Nazwa (hash)', 'readonly' => true));
     $this->addElement('textarea', 'template_content', array('required' => true, 'label' => 'Treść templatki'));
     $this->submit();
     $this->cancel();
 }
コード例 #21
0
ファイル: SearchStorage.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'client_id', array('label' => 'Klient', 'multiOptions' => $this->addClearStart($dict->setSource(new Wsclient(), array(), 'id ASC', 'id', array('client_name'))->getDictionary())));
     $this->addElement('select', 'service_id', array('label' => 'Usługa', 'multiOptions' => $this->addClearStart($dict->setSource(new WsServiceSms(), array(), 'id ASC', 'id', array('service_login'))->getDictionary())));
     $this->datee(false, 'date_for', 'Data od:', false);
     $this->datee(false, 'date_to', 'Data do:', false);
     $this->search();
     $this->cancel(false, 'clear', 'Clear');
 }
コード例 #22
0
ファイル: Search.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $this->addElement('text', 'message', array('required' => false, 'label' => 'Message', 'size' => '50'));
     $this->addElement('text', 'ip', array('required' => false, 'label' => 'IP', 'size' => '50'));
     $dict = new Base_Dictionary();
     $user = new User();
     $this->addElement('Select', 'id_user', array('required' => false, 'label' => 'Employee', 'MultiOptions' => $this->addClearStart($dict->setSource($user)->getDictionary())));
     $this->addDisplayGroup(array('message', 'ip', 'id_user'), "personal_data", array('class' => 'search', 'legend' => 'Wyszukaj po:'));
     $this->search();
     $this->reset();
 }
コード例 #23
0
ファイル: Search.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'ws_client_id', array('required' => false, 'label' => 'Klient', 'multiOptions' => $this->addClearStart($dict->setSource(new Wsclient())->getDictionary())));
     $this->addElement('text', 'template_name', array('label' => 'Nazwa (hash)'));
     $this->addElement('text', 'template_content', array('label' => 'Zawierająca treść'));
     $this->addElement('text', 'version_num', array('label' => 'Numer wersji'));
     $this->addElement('checkbox', 'onlyCurrentVersion', array('label' => 'Tylko najnowsze wersje', 'checked' => true));
     $this->search();
     $this->cancel(false, 'cancel', 'Clear');
 }
コード例 #24
0
ファイル: UserGroup.php プロジェクト: knatorski/SMS
 public function baseInit()
 {
     $this->name(false, "user_group_name", 'Name');
     $dict = new Base_Dictionary();
     $this->addSupervisedElement('select', "id_supervisor", array('label' => 'Supervisor:', 'required' => $this->default_policy, 'MultiOptions' => $this->addClearStart($dict->setSource(new User())->getDictionary())));
     $this->notEmpty('id_supervisor');
     $this->phone();
     $this->email();
     $this->addElement('textarea', 'description', array('label' => 'Description:', 'filters' => array(new Base_Filter_Stripslashes()), 'required' => false, 'rows' => '5', 'cols' => '30'));
     $this->submit();
     $this->cancel();
 }
コード例 #25
0
ファイル: SearchDetails.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('select', 'client_id', array('label' => 'Klient', 'multiOptions' => $this->addClearStart($dict->setSource(new Wsclient())->getDictionary())));
     $this->addElement('select', 'service_id', array('label' => 'Usługa', 'multiOptions' => $this->addClearStart($dict->setSource(new WsServiceMail())->getDictionary())));
     $this->addElement('select', 'ws_service_group_id', array('label' => 'Grupa usług', 'multiOptions' => $this->addClearStart($dict->setSource(new WsServiceMailGroup())->getDictionary())));
     $this->addElement('select', 'ws_service_set_id', array('label' => 'Nazwa wysłki', 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceSet(), array("ghost=false", 'status=' . Logic_Ws_ServiceSet_ServiceSet::STATE_ACTIVE, 'http=true'), 'id', 'id', array('name'))->getDictionary())));
     $this->datee(false, 'date_for', 'Data od:', false);
     $this->datee(false, 'date_to', 'Data do:', false);
     $this->search();
     $this->cancel(false, 'clear', 'Clear');
 }
コード例 #26
0
ファイル: Search.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'special_id', array('label' => "Identyfikator usługi"));
     $this->addElement('text', 'service_login', array('label' => "Login usługi"));
     $this->addElement('select', 'phone_number', array('label' => "Numer telefonu", 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceSms(), array(), 'id', 'phone_number', array('phone_number'))->getDictionary())));
     $this->addElement('select', 'id_mask', array('label' => "Maska numeru", 'MultiOptions' => $this->addClearStart($dict->setSource('mask')->getDictionary())));
     $this->addElement('select', 'operator_id', array('label' => "Operator", 'MultiOptions' => $this->addClearStart($dict->setSource('operator_gsm')->getDictionary())));
     $this->search();
     $this->cancel(false, 'cancel', 'Clear');
     //        $this->reset();
 }
コード例 #27
0
ファイル: Search.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'id', array('label' => 'Mail ID', 'validators' => array('Digits')));
     $this->addElement('text', 'email_address', array('label' => 'Adres e-mail'));
     $this->addElement('select', 'client_id', array('required' => false, 'label' => 'Klient', 'multiOptions' => $this->addClearStart($dict->setSource(new Wsclient(), array(), 'id ASC', 'id', array('client_name'))->getDictionary())));
     $this->addElement('text', 'package_id', array('required' => false, 'label' => 'ID rozsyłki'));
     $this->datetimee(false, 'date_from', 'Czas od', false, array());
     $this->datetimee(false, 'date_until', 'Czas do', false, array());
     $this->search();
     $this->cancel(false, 'clear', 'Clear');
 }
コード例 #28
0
ファイル: Generic.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'email_address', array('required' => true, 'label' => 'Adres email', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array('EmailAddress')));
     $this->addElement('text', 'mail_comment', array('required' => false, 'label' => 'Komentarz'));
     //        $this->addElement('multiselect', 'ws_service_id', array(
     //            'label' => 'Usługa',
     //            'multiOptions' => $dict->setSource(new WsServiceMail(),array(),'id','id',array('sender_address'))->getDictionary()
     //        ));
     $this->addElement('multiselect', 'ws_client_id', array('required' => true, 'label' => 'Lista klientów', 'MultiOptions' => $dict->setSource(new Wsclient(), array('ghost = false'), 'id ASC', 'id', array('client_name'))->getDictionary()));
     $this->submit();
     $this->cancel();
 }
コード例 #29
0
ファイル: Filter.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $this->datetimee(false, 'filter_created_at_start', 'Utworzono od', false, array('value' => ''));
     $this->datetimee(false, 'filter_created_at_end', 'Utworzono do', false, array('value' => ''));
     $this->datetimee(false, 'filter_last_occurence_start', 'Ostatnie wystąpienie od', false, array('value' => ''));
     $this->datetimee(false, 'filter_last_occurence_end', 'Ostatnie wystąpienie do', false, array('value' => ''));
     $dictionary = new Base_Dictionary();
     $this->addElement('select', 'filter_nagios_pending_status', array('label' => 'Status', 'MultiOptions' => $this->addClearStart($dictionary->setSource('nagios_pending_status')->getDictionary())));
     $this->addElement('select', 'filter_nagios_status', array('label' => 'Typ zgłoszenia', 'MultiOptions' => $this->addClearStart($dictionary->setSource('nagios_status')->getDictionary())));
     $this->submit(false, 'submit', 'Show');
     $this->cancel(false, 'cancel', 'Clear');
     //        $this->loadJs();
 }
コード例 #30
0
ファイル: Generic.php プロジェクト: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'phone_number', array('required' => true, 'label' => 'Numer telefonu', 'filters' => array(new Logic_Filter_NumberMobilePhone()), 'validators' => array(new Logic_Validate_NumberMobilePhone())));
     $this->addElement('text', 'number_comment', array('required' => false, 'label' => 'Komentarz'));
     //        $this->addElement('multiselect', 'ws_service_id', array(
     //            'label' => 'Usługa',
     //            'multiOptions' => $dict->setSource(new WsServiceSms(),array(),'id','id',array('service_login'))->getDictionary()
     //        ));
     $this->addElement('multiselect', 'ws_client_id', array('required' => true, 'label' => 'Lista klientów', 'MultiOptions' => $dict->setSource(new Wsclient(), array('ghost = false'), 'id ASC', 'id', array('client_name'))->getDictionary()));
     $this->submit();
     $this->cancel();
 }