-implemented new ui design for preferences page.

This commit is contained in:
mkonecny 2011-02-07 12:36:35 -05:00
parent 89ae221f4c
commit 7c17758721
4 changed files with 17 additions and 20 deletions

View File

@ -10,6 +10,8 @@ class PreferenceController extends Zend_Controller_Action
public function indexAction()
{
$this->view->statusMsg = "";
$form = new Application_Form_Preferences();
$this->view->form = $form;
}
@ -23,15 +25,18 @@ class PreferenceController extends Zend_Controller_Action
$form = new Application_Form_Preferences();
if (!$form->isValid($request->getPost())) {
// Failed validation; redisplay form
$this->view->form = $form;
return $this->render('index'); //render the phtml file
} else {
$values = $form->getValues();
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
$this->view->statusMsg = "Preferences Updated.";
}
$values = $form->getValues();
Application_Model_Preference::SetHeadTitle($values["stationName"], $this->view);
$this->view->form = $form;
return $this->render('index'); //render the phtml file
}

View File

@ -9,24 +9,16 @@ class Application_Form_Preferences extends Zend_Form
// Add login element
$this->addElement('text', 'stationName', array(
'class' => 'input_text',
'label' => 'Station Name:',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array('NotEmpty'),
'value' => Application_Model_Preference::GetValue("station_name")
));
/*
$this->addElement('select', 'test', array(
'label' => 'Live Stream Button: ',
'multiOptions' => array(
"e" => "enabled",
"d" => "disabled"
))
);
*/
$this->addElement('submit', 'submit', array(
'class' => 'ui-button ui-state-default',
'ignore' => true,
'label' => 'Submit',
));

View File

@ -1,3 +1,6 @@
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong">
<?php
echo $this->statusMsg;
echo $this->form;
?>
</div>

View File

@ -1,4 +1 @@
Preferences Updated.
<?php
echo $this->form;
?>
Left empty on purpose