Preferences.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. class Application_Form_Preferences extends Zend_Form
  3. {
  4. public function init()
  5. {
  6. $baseUrl = Application_Common_OsPath::getBaseDir();
  7. $this->setDecorators(array(
  8. array('ViewScript', array('viewScript' => 'form/preferences.phtml'))
  9. ));
  10. $general_pref = new Application_Form_GeneralPreferences();
  11. $this->addElement('hash', 'csrf', array(
  12. 'salt' => 'unique',
  13. 'decorators' => array(
  14. 'ViewHelper'
  15. )
  16. ));
  17. $this->addSubForm($general_pref, 'preferences_general');
  18. $email_pref = new Application_Form_EmailServerPreferences();
  19. $this->addSubForm($email_pref, 'preferences_email_server');
  20. $soundcloud_pref = new Application_Form_SoundcloudPreferences();
  21. $this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
  22. $submit = new Zend_Form_Element_Submit('submit');
  23. $submit->setLabel(_('Save'));
  24. //$submit->removeDecorator('Label');
  25. $submit->setAttribs(array('class'=>'btn right-floated'));
  26. $submit->removeDecorator('DtDdWrapper');
  27. $this->addElement($submit);
  28. }
  29. }