SAAS-793 - Prevent show image upload when editing single instance of a repeating show

This commit is contained in:
Duncan Sommerville 2015-06-26 14:23:45 -04:00
parent 7e0b6ac7ba
commit 881471c6b8
2 changed files with 10 additions and 1 deletions

View File

@ -107,10 +107,17 @@ class Application_Form_AddShowStyle extends Zend_Form_SubForm
{
$elements = $this->getElements();
foreach ($elements as $element) {
if ($element->getType() != 'Zend_Form_Element_Hidden') {
if ($element->getType() != 'Zend_Form_Element_Hidden'
// We should still be able to remove the show logo
&& $element->getName() != 'add_show_logo_current_remove') {
$element->setAttrib('disabled','disabled');
}
}
}
public function hideShowLogo() {
$this->removeElement('add_show_logo');
$this->removeElement('add_show_logo_preview');
}
}

View File

@ -96,6 +96,8 @@ class Application_Service_ShowFormService
$forms["repeats"]->disable();
$forms["who"]->disable();
$forms["style"]->disable();
// Hide the show logo fields when users are editing a single instance
$forms["style"]->hideShowLogo();
$forms["live"]->disable();
$forms["record"]->disable();
$forms["rebroadcast"]->disable();