sintonia/airtime_mvc/application/forms/AddShowStyle.php

51 lines
1.4 KiB
PHP
Raw Normal View History

<?php
class Application_Form_AddShowStyle extends Zend_Form_SubForm
{
public function init()
{
// Add show background-color input
2011-01-21 19:25:12 +01:00
$this->addElement('text', 'add_show_background_color', array(
'label' => 'Background Colour:',
'class' => 'input_text',
2011-01-21 20:58:23 +01:00
'filters' => array('StringTrim')
));
$bg = $this->getElement('add_show_background_color');
$bg->setDecorators(array(array('ViewScript', array(
'viewScript' => 'form/add-show-style.phtml',
'class' => 'big'
))));
// Add show color input
2011-01-21 19:25:12 +01:00
$this->addElement('text', 'add_show_color', array(
'label' => 'Text Colour:',
'class' => 'input_text',
2011-01-21 20:58:23 +01:00
'filters' => array('StringTrim')
));
$c = $this->getElement('add_show_color');
$c->setDecorators(array(array('ViewScript', array(
'viewScript' => 'form/add-show-style.phtml',
'class' => 'big'
))));
}
public function disable(){
$elements = $this->getElements();
foreach ($elements as $element)
{
if ($element->getType() != 'Zend_Form_Element_Hidden')
{
$element->setAttrib('readonly',true);
$element->setAttribs(array('style' => 'color: #B1B1B1; '));
}
}
}
}