Esempio n. 1
0
 /**
  * @return void
  */
 public function baseInit()
 {
     $model = new Wsclient();
     $result = $model->fetchAll($model->select()->order('client_name'))->toArray();
     $clients = array(0 => '');
     foreach ($result as $val) {
         $clients[$val['id']] = $val['client_name'];
     }
     $this->addElement('select', 'public_ws_client_id', array('label' => 'Klient', 'multiOptions' => $clients));
     $model = new Wsservice();
     $result = $model->fetchAll($model->select()->order('service_name'))->toArray();
     $services = array(0 => '');
     foreach ($result as $val) {
         $services[$val['id']] = $val['service_name'];
     }
     $this->addElement('select', 'public_ws_service_id', array('label' => 'Usługa', 'multiOptions' => $services));
     $this->addElement('text', 'ip', array('label' => 'Adres IP'));
     $this->addElement('text', 'function_name', array('label' => 'Funkcja'));
     $this->addElement('text', 'function_revision', array('label' => 'Rewizja'));
     $this->addElement('select', 'priority', array('label' => 'Kody odpowiedzi', 'multiOptions' => $this->addClearStart(array(200, 401, 402, 405, 406, 407, 410, 415, 416, 420, 421, 422, 423, 424, 425, 430, 431, 432, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 450, 451, 452, 453, 501, 510, 511, 512, 520))));
     $this->datetimee(false, 'created_at_from', 'Data od', false);
     $this->datetimee(false, 'created_at_to', 'Data do', false);
     $this->search();
     $this->reset();
 }