Merge branch '1.9.1' into devel

This commit is contained in:
James 2011-08-19 16:43:16 -04:00
commit dc6ed33b47
3 changed files with 29 additions and 2 deletions

View File

@ -29,7 +29,8 @@ class PreferenceController extends Zend_Controller_Action
if ($request->isPost()) {
if ($form->isValid($request->getPost())) {
$values = $form->getValues();
Application_Model_Preference::SetHeadTitle($values["preferences_general"]["stationName"], $this->view);
Application_Model_Preference::SetDefaultFade($values["preferences_general"]["stationDefaultFade"]);
Application_Model_Preference::SetStreamLabelFormat($values["preferences_general"]["streamFormat"]);
Application_Model_Preference::SetAllow3rdPartyApi($values["preferences_general"]["thirdPartyApi"]);

View File

@ -13,7 +13,19 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
if($defaultFade == ""){
$defaultFade = '00:00:00.000000';
}
//Station name
$this->addElement('text', 'stationName', array(
'class' => 'input_text',
'label' => 'Station Name',
'required' => false,
'filters' => array('StringTrim'),
'value' => Application_Model_Preference::GetValue("station_name"),
'decorators' => array(
'ViewHelper'
)
));
//Default station fade
$this->addElement('text', 'stationDefaultFade', array(
'class' => 'input_text',

View File

@ -1,5 +1,19 @@
<fieldset class="padded">
<dl class="zend_form">
<dt id="stationName-label" class="block-display">
<label class="required" for="stationName"><?php echo $this->element->getElement('stationName')->getLabel() ?>:
</label>
</dt>
<dd id="stationName-element" class="block-display">
<?php echo $this->element->getElement('stationName') ?>
<?php if($this->element->getElement('stationName')->hasErrors()) : ?>
<ul class='errors'>
<?php foreach($this->element->getElement('stationName')->getMessages() as $error): ?>
<li><?php echo $error; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</dd>
<dt id="stationDefaultFade-label" class="block-display">
<label class="optional" for="stationDefaultFade"><?php echo $this->element->getElement('stationDefaultFade')->getLabel() ?></label>
</dt>