sintonia/airtime_mvc/application/forms/PodcastPreferences.php

31 lines
1.3 KiB
PHP
Raw Normal View History

2015-10-21 23:30:24 +02:00
<?php
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'));
2015-10-21 23:30:24 +02:00
$stationPodcastPrivacy->setMultiOptions(array(
_("Public"),
_("Private"),
));
$stationPodcastPrivacy->setValue($isPrivate);
$this->addElement($stationPodcastPrivacy);
$stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId());
$url = $stationPodcast->getDbUrl();
2015-10-21 23:30:24 +02:00
$feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl:");
$feedUrl->setAttrib('class', 'input_text')
->setAttrib('disabled', 'disabled')
->setRequired(false)
->setLabel(_("My Podcast Feed URL"))
2015-10-21 23:30:24 +02:00
->setValue($url);
$this->addElement($feedUrl);
}
}