2015-10-21 23:30:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Application_Form_PodcastPreferences extends Zend_Form_SubForm {
|
|
|
|
|
|
|
|
public function init() {
|
|
|
|
$isPrivate = Application_Model_Preference::getStationPodcastPrivacy();
|
2015-11-13 20:57:32 +01:00
|
|
|
$stationPodcastPrivacy = new Zend_Form_Element_Radio("stationPodcastPrivacy");
|
|
|
|
$stationPodcastPrivacy->setLabel(_('Feed Privacy'));
|
2015-10-21 23:30:24 +02:00
|
|
|
$stationPodcastPrivacy->setMultiOptions(array(
|
|
|
|
_("Public"),
|
|
|
|
_("Private"),
|
|
|
|
));
|
|
|
|
$stationPodcastPrivacy->setValue($isPrivate);
|
2015-11-13 20:57:32 +01:00
|
|
|
$stationPodcastPrivacy->setDecorators(array('ViewHelper', 'Label'));
|
2015-10-21 23:30:24 +02:00
|
|
|
$this->addElement($stationPodcastPrivacy);
|
|
|
|
|
2015-11-04 16:52:23 +01:00
|
|
|
$stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId());
|
|
|
|
$url = $stationPodcast->getDbUrl();
|
2015-11-13 20:57:32 +01:00
|
|
|
$feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl");
|
2015-10-21 23:30:24 +02:00
|
|
|
$feedUrl->setAttrib('class', 'input_text')
|
|
|
|
->setAttrib('disabled', 'disabled')
|
|
|
|
->setRequired(false)
|
2015-11-13 20:57:32 +01:00
|
|
|
->setLabel(_("Feed URL"))
|
2015-10-21 23:30:24 +02:00
|
|
|
->setValue($url);
|
2015-11-13 20:57:32 +01:00
|
|
|
$feedUrl->setDecorators(array('ViewHelper', 'Label'));
|
2015-10-21 23:30:24 +02:00
|
|
|
$this->addElement($feedUrl);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|