예제 #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
 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
파일: 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');
 }
예제 #4
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');
 }
예제 #5
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();
 }
예제 #6
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();
 }
예제 #7
0
 /**
  * @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');
 }
예제 #8
0
 /**
  * @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');
 }
예제 #9
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();
 }
예제 #10
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();
 }
예제 #11
0
파일: Search.php 프로젝트: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dictionary = new Base_Dictionary();
     $this->addElement('select', 'status', array('label' => 'Status', 'MultiOptions' => $this->addClearStart($dictionary->setSource('serviceset_status')->getDictionary())));
     $this->getElement('status')->setValue(Logic_Ws_ServiceSet_ServiceSet::STATE_ACTIVE);
     $this->addElement('text', 'name', array('label' => 'Nazwa'));
     $this->addElement('text', 'code_name', array('label' => 'Nazwa kodowa'));
     $this->addElement('select', 'shipping_type', array('label' => 'Rodzaj wysyłki', 'MultiOptions' => $this->addClearStart($dictionary->setSource('shipping_type')->getDictionary())));
     $this->addElement('select', 'sms_group', array('label' => 'Usługa SMS', 'MultiOptions' => $this->addClearStart($dictionary->setSource(new WsServiceSmsGroup(), array('ghost=false'), 'id', 'id', array('name'))->getDictionary())));
     $this->addElement('select', 'mpk_code', array('label' => 'Oddział wg MPK', 'multiOptions' => $this->addClearStart($dictionary->setSource(new BranchMpk(), array('ghost = false'), 'mpk', 'mpk', array('branch_name'))->getDictionary())));
     $this->search();
     $this->cancel(false, 'cancel', 'Clear');
     //        $this->reset();
 }
예제 #12
0
파일: Search.php 프로젝트: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'sms_id', array('label' => 'SMS ID', 'validators' => array('Alnum')));
     $this->addElement('select', 'service_id', array('label' => 'Usługa', 'multiOptions' => $this->addClearStart($dict->setSource(new WsServiceSms(), array(), 'id', 'id', array('service_login'))->getDictionary())));
     $this->addElement('select', 'client_id', array('label' => 'Klient', 'multiOptions' => $this->addClearStart($dict->setSource(new Wsclient(), array('ghost = false'), 'id', 'id', array('client_name'))->getDictionary())));
     $this->addElement('select', 'package_id', array('label' => 'Wysyłka', 'multiOptions' => $this->addClearStart($dict->setSource(new WsPackageSms(), array('ghost = false'), 'id', 'id', array('name'))->getDictionary())));
     $this->addElement('select', 'sender_id', array('label' => 'Wysyłający', 'multiOptions' => $this->addClearStart($dict->setSource(new User(), array('ghost = false'), 'id', 'id', array('login'))->getDictionary())));
     $this->addElement('text', 'phone_number', array('label' => 'Numer telefonu'));
     $this->datetimee(false, 'date_from', 'Czas od', false);
     $this->datetimee(false, 'date_until', 'Czas do', false);
     $this->search();
     $this->cancel(false, 'clear', 'Clear');
 }
예제 #13
0
파일: Generic.php 프로젝트: knatorski/SMS
 /**
  * @return void
  */
 protected function serviceFieldsInit()
 {
     $dictionary = new Base_Dictionary();
     $this->addElement('text', 'special_id', array('required' => true, 'label' => 'Identyfikator usługi'));
     $this->addElement('text', 'service_login', array('required' => true, 'label' => 'Login Usługi'));
     $this->addElement('text', 'service_password', array('required' => true, 'label' => 'Hasło Usługi'));
     $this->addElement('text', 'phone_number', array('required' => true, 'label' => 'Numer telefonu'));
     $this->addElement('select', 'operator_id', array('label' => 'Operator', 'required' => true, 'MultiOptions' => $this->addClearStart($dictionary->setSource('operator_gsm')->getDictionary())));
     $this->addElement('multiselect', 'mask', array('label' => 'Nadpis', 'MultiOptions' => $this->addClearStart($dictionary->setSource('mask')->getDictionary())));
     $this->addElement('file', 'pem', array('label' => 'Plik certyfikatu PEM', 'decorators' => $this->_fileDecorator, 'required' => true));
     $this->addElement('file', 'crt', array('label' => 'Plik certyfikatu CRT', 'decorators' => $this->_fileDecorator, 'required' => true));
     $this->getElement('pem')->setRequired(!$this->_edit);
     $this->getElement('crt')->setRequired(!$this->_edit);
 }
예제 #14
0
 public function baseInit()
 {
     $this->_edit = $this->getAttrib('edit');
     $dict = new Base_Dictionary();
     if ($this->_edit) {
         $this->addElement('hidden', 'mpk_code');
         $this->addElement('select', 'mpk_code_view', array('required' => true, 'disabled' => true, 'label' => 'Branch', 'MultiOptions' => $this->addClearStart($dict->setSource('branch_mpk')->getDictionary())));
     } else {
         $this->addElement('select', 'mpk_code', array('required' => true, 'label' => 'Branch', 'MultiOptions' => $this->addClearStart($dict->setSource('branch_mpk')->getDictionary())));
     }
     $client = new Wsclient();
     $this->addElement('select', 'ws_client_id', array('required' => true, 'label' => 'Ws Client', 'MultiOptions' => $this->addClearStart($dict->setSource($client, array(), 'id ASC', 'id', array('client_name'))->getDictionary())));
     $this->submit();
     $this->cancel();
 }
예제 #15
0
파일: Search.php 프로젝트: knatorski/SMS
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $this->addElement('text', 'name', array('label' => 'Nazwa wysyłki'));
     $this->addElement('select', 'ws_service_set_id', array('label' => 'Wysyłka', '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->addElement('select', 'ws_service_group_id', array('label' => 'Grupa usług', 'MultiOptions' => $this->addClearStart($dict->setSource(new WsServiceSmsGroup(), array("ghost=false"), 'id', 'id', array('name'))->getDictionary())));
     $this->addElement('text', 'created_by', array('label' => 'Login', 'required' => false));
     if ($this->_queue) {
         $this->addElement('text', 'transferred_by', array('label' => 'Przekazał do wysyłki', 'required' => false));
     }
     $this->datee(false, "date_for", "Data od", false);
     $this->datee(false, "date_to", "Data do", false);
     $this->submit(false, "search", 'Search');
     $this->cancel(false, "clear", 'Clear');
 }
예제 #16
0
파일: Add.php 프로젝트: knatorski/SMS
 /**
  * @return void
  */
 public function baseInit()
 {
     $dictionary = new Base_Dictionary();
     $client = Logic_Client::getInstance();
     $this->addElement('text', 'name', array('label' => 'Nazwa', 'required' => true));
     $this->addElement('select', 'ws_service_group_id', array('required' => true, 'label' => 'Grupa', 'multiOptions' => $this->addClearStart($client->getGroupListAsDict(Wsclient::GROUP_SMS))));
     $this->addElement('multiselect', 'shipping_type', array('required' => true, 'label' => 'Rodzaj wysyłki', 'MultiOptions' => $this->addClearStart($dictionary->setSource('shipping_type')->getDictionary())));
     $this->addElement('textarea', 'message', array('rows' => '15', 'cols' => '70', 'label' => 'Treść:'));
     $this->addElement('select', 'mpk_code', array('required' => true, 'label' => 'Oddział wg MPK', 'multiOptions' => $this->addClearStart($dictionary->setSource(new BranchMpk(), array('ghost = false'), 'mpk', 'mpk', array('branch_name'))->getDictionary())));
     $this->addElement('select', 'file_type', array('required' => false, 'label' => 'Typ wysyłki:', 'multioptions' => $this->addClearStart($dictionary->setSource('service_import_file_type')->getDictionary())));
     $this->addElement('select', 'delimiter', array('label' => "Separator pola", 'MultiOptions' => $this->addClearStart($dictionary->setSource('csv_delimeter')->getDictionary())));
     $this->addDisplayGroup(array($this->file_type, $this->delimiter), 'file-type');
     $this->submit();
     $this->cancel();
 }
예제 #17
0
 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;
 }
예제 #18
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');
 }
예제 #19
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();
 }
예제 #20
0
파일: Generic.php 프로젝트: knatorski/SMS
 public function baseInit()
 {
     $dict = new Base_Dictionary();
     $services = $dict->setSource(new WsServiceSms(), array(), 'id', 'id', array('phone_number', 'operator_id'))->getDictionary(false, ';');
     $operator = $dict->setSource('operator_gsm')->getDictionary();
     foreach ($services as &$service) {
         $phone_number = explode(';', $service);
         $service = $operator[$phone_number[1]] . " - " . $phone_number[0];
     }
     $this->addElement('text', 'name', array('required' => true, 'label' => 'Name'));
     $this->addElement('text', 'code', array('required' => true, 'label' => 'Nazwa kodowa (unikalna)'));
     $this->addElement('Multiselect', 'ws_service_id', array('label' => 'Numer telefonu', 'required' => true, 'MultiOptions' => $this->addClearStart($services)));
     $this->addElement('select', 'id_mask', array('label' => 'Nadpis', 'required' => true, 'MultiOptions' => $this->addClearStart($dict->setSource('mask')->getDictionary())));
     $this->addElement('select', 'ws_service_backup_id', array('label' => 'Usługa backupowa', 'required' => true, 'MultiOptions' => $this->addClearStart($services)));
     $this->submit();
     $this->cancel();
 }
예제 #21
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();
 }
예제 #22
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();
 }
예제 #23
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();
 }
예제 #24
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();
 }
예제 #25
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();
 }
예제 #26
0
 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();
 }
예제 #27
0
 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];
 }
예제 #28
0
 public function getServices($id)
 {
     $dict = new Base_Dictionary();
     if ((int) $id <= 0) {
         $dicEntry = $dict->setSource(new WsServiceSmsMask(), array('ghost = false'), 'id', 'id', array('ws_service_sms_id'))->getDictionary();
     } else {
         $dicEntry = $dict->setSource(new WsServiceSmsMask(), array('id_mask = ' . $id, 'ghost = false'), 'id', 'id', array('ws_service_sms_id'))->getDictionary();
     }
     if (true === empty($dicEntry)) {
         throw new Logic_Exception("Brak numerów dla wybranej maski");
     }
     $avalible = $dict->setSource(new WsServiceSms(), array('id in (' . implode(',', $dicEntry) . ')'), 'id', 'id', array('phone_number', 'operator_id'))->getDictionary(false, ';');
     $operator = $dict->setSource('operator_gsm')->getDictionary();
     foreach ($avalible as &$service) {
         $phone_number = explode(';', $service);
         $service = $operator[$phone_number[1]] . " - " . $phone_number[0];
     }
     return $avalible;
 }
예제 #29
0
 /**
  * @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();
 }
예제 #30
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();
 }