SAAS-1202 - move station podcast to top-level menu item

This commit is contained in:
Duncan Sommerville 2015-11-13 14:57:32 -05:00
parent 50c0bc2c28
commit 8e867b522c
19 changed files with 271 additions and 200 deletions

View file

@ -3,28 +3,26 @@
class Application_Form_PodcastPreferences extends Zend_Form_SubForm {
public function init() {
$this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences_podcast.phtml'))
));
$isPrivate = Application_Model_Preference::getStationPodcastPrivacy();
$stationPodcastPrivacy = new Zend_Form_Element_Radio('stationPodcastPrivacy');
$stationPodcastPrivacy->setLabel(_('My Podcast Feed Privacy'));
$stationPodcastPrivacy = new Zend_Form_Element_Radio("stationPodcastPrivacy");
$stationPodcastPrivacy->setLabel(_('Feed Privacy'));
$stationPodcastPrivacy->setMultiOptions(array(
_("Public"),
_("Private"),
));
$stationPodcastPrivacy->setValue($isPrivate);
$stationPodcastPrivacy->setDecorators(array('ViewHelper', 'Label'));
$this->addElement($stationPodcastPrivacy);
$stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId());
$url = $stationPodcast->getDbUrl();
$feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl:");
$feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl");
$feedUrl->setAttrib('class', 'input_text')
->setAttrib('disabled', 'disabled')
->setRequired(false)
->setLabel(_("My Podcast Feed URL"))
->setLabel(_("Feed URL"))
->setValue($url);
$feedUrl->setDecorators(array('ViewHelper', 'Label'));
$this->addElement($feedUrl);
}

View file

@ -26,10 +26,6 @@ class Application_Form_Preferences extends Zend_Form
$this->addSubForm($general_pref, 'preferences_general');
// Station Podcast form
$podcastPreferences = new Application_Form_PodcastPreferences();
$this->addSubForm($podcastPreferences, 'preferences_podcast');
//tunein form
$tuneinPreferences = new Application_Form_TuneInPreferences();
$this->addSubForm($tuneinPreferences, 'preferences_tunein');

View file

@ -0,0 +1,11 @@
<?php
class Application_Form_StationPodcast extends Zend_Form {
public function init() {
// Station Podcast form
$podcastPreferences = new Application_Form_PodcastPreferences();
$this->addSubForm($podcastPreferences, 'preferences_podcast');
}
}