diff --git a/airtime_mvc/application/forms/AddShowLiveStream.php b/airtime_mvc/application/forms/AddShowLiveStream.php index b34aab2e5..65e2a19d3 100644 --- a/airtime_mvc/application/forms/AddShowLiveStream.php +++ b/airtime_mvc/application/forms/AddShowLiveStream.php @@ -72,4 +72,14 @@ class Application_Form_AddShowLiveStream extends Zend_Form_SubForm return $isValid; } + + public function disable() + { + $elements = $this->getElements(); + foreach ($elements as $element) { + if ($element->getType() != 'Zend_Form_Element_Hidden') { + $element->setAttrib('disabled','disabled'); + } + } + } } diff --git a/airtime_mvc/application/forms/AddShowWhat.php b/airtime_mvc/application/forms/AddShowWhat.php index 20aeb6ef5..a1e87701f 100644 --- a/airtime_mvc/application/forms/AddShowWhat.php +++ b/airtime_mvc/application/forms/AddShowWhat.php @@ -75,4 +75,14 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm } } } + + public function makeReadonly() + { + $elements = $this->getElements(); + foreach ($elements as $element) { + if ($element->getType() != 'Zend_Form_Element_Hidden') { + $element->setAttrib('readonly','readonly'); + } + } + } } diff --git a/airtime_mvc/application/services/CalendarService.php b/airtime_mvc/application/services/CalendarService.php index 41ad7c17c..4ba92e3bb 100644 --- a/airtime_mvc/application/services/CalendarService.php +++ b/airtime_mvc/application/services/CalendarService.php @@ -149,7 +149,7 @@ class Application_Service_CalendarService if ($isRepeating) { if ($populateInstance) { $menu["edit"] = array( - "name" => _("Edit Show"), + "name" => _("Edit This Instance"), "icon" => "edit", "url" => $baseUrl."Schedule/populate-repeating-show-instance-form"); } else { diff --git a/airtime_mvc/application/services/ShowFormService.php b/airtime_mvc/application/services/ShowFormService.php index d1eb1051e..5be58c386 100644 --- a/airtime_mvc/application/services/ShowFormService.php +++ b/airtime_mvc/application/services/ShowFormService.php @@ -81,9 +81,20 @@ class Application_Service_ShowFormService $this->populateFormLive($forms["live"]); $this->populateFormStyle($forms["style"]); - //no need to populate these forms since the user won't - //be able to see them + /* Only the field on the 'when' form will get updated so we should + * make all other forms disabled or readonly + * + * 'what' needs to be readonly because zendform will not validate + * if they are disabled + * + * All other forms can be disabled because we do not update those values + * when the user edits a repeating instance + */ + $forms["what"]->makeReadonly(); $forms["repeats"]->disable(); + $forms["who"]->disable(); + $forms["style"]->disable(); + $forms["live"]->disable(); $forms["record"]->disable(); $forms["rebroadcast"]->disable(); $forms["abs_rebroadcast"]->disable(); diff --git a/airtime_mvc/application/services/ShowService.php b/airtime_mvc/application/services/ShowService.php index 9b756337b..bca10af4a 100644 --- a/airtime_mvc/application/services/ShowService.php +++ b/airtime_mvc/application/services/ShowService.php @@ -560,8 +560,6 @@ SQL; $query = Application_Common_Database::prepareAndExecute( $sql, array( 'showId' => $this->ccShow->getDbId() ), 'single'); - - Logging::info($query); $date = null;