예제 #1
0
 public function init()
 {
     // Add hosts autocomplete
     $this->addElement('text', 'add_show_hosts_autocomplete', array('label' => _('Search Users:'), 'class' => 'input_text ui-autocomplete-input', 'required' => false));
     $options = array();
     $hosts = Application_Model_User::getHosts();
     foreach ($hosts as $host) {
         $options[$host['index']] = $host['label'];
     }
     //Add hosts selection
     $hosts = new Zend_Form_Element_MultiCheckbox('add_show_hosts');
     $hosts->setLabel(_('DJs:'))->setMultiOptions($options);
     $this->addElement($hosts);
 }
예제 #2
0
 public function getHostsAction()
 {
     $search = $this->_getParam('term');
     $res = Application_Model_User::getHosts($search);
     $this->view->hosts = Application_Model_User::getHosts($search);
 }