2011-02-03 23:51:35 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Application_Form_Preferences extends Zend_Form
|
|
|
|
{
|
|
|
|
public function init()
|
|
|
|
{
|
2012-10-19 20:42:01 +02:00
|
|
|
$baseUrl = Application_Common_OsPath::getBaseDir();
|
|
|
|
|
2011-04-03 23:34:44 +02:00
|
|
|
$this->setDecorators(array(
|
2012-11-06 22:48:34 +01:00
|
|
|
array('ViewScript', array('viewScript' => 'form/preferences.phtml'))
|
2011-03-18 22:15:12 +01:00
|
|
|
));
|
2012-07-11 00:55:44 +02:00
|
|
|
|
2011-04-03 23:34:44 +02:00
|
|
|
$general_pref = new Application_Form_GeneralPreferences();
|
2014-10-01 21:36:17 +02:00
|
|
|
|
|
|
|
$this->addElement('hash', 'csrf', array(
|
|
|
|
'salt' => 'unique',
|
|
|
|
'decorators' => array(
|
|
|
|
'ViewHelper'
|
|
|
|
)
|
|
|
|
));
|
|
|
|
|
2011-04-03 23:34:44 +02:00
|
|
|
$this->addSubForm($general_pref, 'preferences_general');
|
2012-07-11 00:55:44 +02:00
|
|
|
|
2011-04-03 23:34:44 +02:00
|
|
|
$soundcloud_pref = new Application_Form_SoundcloudPreferences();
|
|
|
|
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
|
2011-04-02 22:33:45 +02:00
|
|
|
|
2015-01-15 22:28:18 +01:00
|
|
|
$submit = new Zend_Form_Element_Submit('submit');
|
|
|
|
$submit->setLabel(_('Save'));
|
|
|
|
//$submit->removeDecorator('Label');
|
|
|
|
$submit->setAttribs(array('class'=>'btn right-floated'));
|
|
|
|
$submit->removeDecorator('DtDdWrapper');
|
|
|
|
|
|
|
|
$this->addElement($submit);
|
2011-02-03 23:51:35 +01:00
|
|
|
}
|
|
|
|
}
|