SAAS-1234 - bind station feed url to angular data model

This commit is contained in:
Duncan Sommerville 2015-11-19 17:09:49 -05:00
parent c328515f4b
commit 641cfb9432
5 changed files with 11 additions and 28 deletions

View file

@ -17,16 +17,6 @@ class Application_Form_PodcastPreferences extends Zend_Form_SubForm {
));
$stationPodcastPrivacy->setValue($isPrivate);
$this->addElement($stationPodcastPrivacy);
$stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId());
$url = $stationPodcast->getDbUrl();
$feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl");
$feedUrl->setAttrib('class', 'input_text')
->setAttrib('disabled', 'disabled')
->setRequired(false)
->setLabel(_("Feed URL"))
->setValue($url);
$this->addElement($feedUrl);
}
}

View file

@ -1,4 +0,0 @@
<fieldset class="padded">
<?php echo $this->element->getElement('stationPodcastPrivacy')->render() ?>
<?php echo $this->element->getElement('stationPodcastFeedUrl')->render() ?>
</fieldset>

View file

@ -26,9 +26,6 @@
<label><?php echo _("Creator") ?></label>
<input name="podcast_creator" ng-model="podcast.creator" type="text"/>
<label><?php echo _("URL") ?></label>
<input disabled name="podcast_url" ng-model="podcast.url" type="text"/>
<label><?php echo _("Description") ?></label>
<textarea name="podcast_description" ng-model="podcast.description"></textarea>
@ -81,8 +78,12 @@
<?php echo $this->form->getSubform('preferences_podcast')->getElement("stationPodcastPrivacy")->renderViewHelper() ?>
</div>
<div style="clear:both"></div>
<?php echo $this->form->getSubform('preferences_podcast')->getElement("stationPodcastFeedUrl") ?>
<dt>
<label for="stationPodcastFeedUrl" class="optional">Feed URL</label>
</dt>
<dd>
<input type="url" ng-model="podcast.url" disabled="disabled" class="input_text" />
</dd>
</dl>
</fieldset>
</div>
@ -122,5 +123,4 @@
$(this).toggleClass("closed");
return false;
});
</script>