Ejemplo n.º 1
0
 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Music:'));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
 }
Ejemplo n.º 2
0
 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setMethod('GET')->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array('page' => null)));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Polls:'));
     $this->addElement('Select', 'show', array('label' => 'Show', 'multiOptions' => array('1' => 'Everyone\'s Polls', '2' => 'Only My Friends\' Polls'), 'onchange' => 'searchPolls();'));
     $this->addElement('Select', 'closed', array('label' => 'Status', 'onchange' => 'searchPolls();', 'multiOptions' => array('' => 'All Polls', '0' => 'Only Open Polls', '1' => 'Only Closed Polls')));
     $this->addElement('Select', 'order', array('label' => 'Browse By:', 'onchange' => 'searchPolls();', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
 }
Ejemplo n.º 3
0
 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()))->setMethod('GET');
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Music:'));
     $this->addElement('Select', 'show', array('label' => 'Show', 'multiOptions' => array('1' => 'Everyone\'s Playlists', '2' => 'Only My Friends\' Playlists')));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
     $this->addElement('Hidden', 'user');
     $this->addElement('Hidden', 'page', array('order' => 100));
     $this->addElement('Button', 'search_bt', array('label' => 'Search', 'type' => 'submit', 'order' => 101));
 }
Ejemplo n.º 4
0
 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Albums:'));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
     // prepare categories
     $categories = Engine_Api::_()->getDbtable('categories', 'album')->getCategoriesAssoc();
     if (count($categories) > 0) {
         $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories));
     }
 }
Ejemplo n.º 5
0
 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Albums:'));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
     // prepare categories
     $categories = Engine_Api::_()->getDbtable('categories', 'album')->getCategoriesAssoc();
     if (count($categories) > 0) {
         $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories));
     }
     $this->addElement('Button', 'submit_btn', array('label' => 'Search', 'type' => 'submit', 'ignore' => true));
 }
Ejemplo n.º 6
0
 public function init()
 {
     $this->setAttribs(array('id' => 'filter_form', 'class' => 'global_form_box'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));
     parent::init();
     $this->addElement('Text', 'search', array('label' => 'Search Albums:'));
     $this->addElement('Select', 'sort', array('label' => 'Browse By:', 'multiOptions' => array('recent' => 'Most Recent', 'popular' => 'Most Popular')));
     // prepare categories
     $categories = Engine_Api::_()->album()->getCategories();
     if (count($categories) != 0) {
         $categories_prepared[0] = "";
         foreach ($categories as $category) {
             $categories_prepared[$category->category_id] = $category->category_name;
         }
         // category field
         $this->addElement('Select', 'category_id', array('label' => 'Category', 'multiOptions' => $categories_prepared));
     }
 }
Ejemplo n.º 7
0
 public function init()
 {
     $this->setAttribs(array('id' => 'login_contactimporter_form', 'class' => 'global_form'))->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));
     parent::init();
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $type = $request->getParam('type');
     $provider = $request->getParam('provider');
     $label = "Email";
     if ($type == 'user') {
         $label = "Username";
     }
     $this->addElement('Text', 'email', array('label' => $label, 'required' => true));
     $this->addElement('Password', 'password', array('label' => 'Password', 'required' => true));
     $this->addElement('Hidden', 'provider', array('value' => $provider));
     $this->addElement('Button', 'submit', array('label' => 'Import Contacts', 'type' => 'submit', 'link' => true, 'ignore' => true, 'decorators' => array('ViewHelper')));
     $this->addElement('Button', 'cancel', array('label' => 'Cancel', 'link' => true, 'href' => '', 'onclick' => 'parent.Smoothbox.close();', 'decorators' => array('ViewHelper')));
     // DisplayGroup: buttons
     $this->addDisplayGroup(array('submit', 'cancel'), 'buttons', array('decorators' => array('FormElements', 'DivDivDivWrapper')));
 }