diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php index 3c76d1e71..44639333b 100644 --- a/airtime_mvc/application/forms/GeneralPreferences.php +++ b/airtime_mvc/application/forms/GeneralPreferences.php @@ -48,6 +48,18 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm $third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi()); $third_party_api->setDecorators(array('ViewHelper')); $this->addElement($third_party_api); + // + // Add the description element + $this->addElement('textarea', 'widgetCode', array( + 'label' => 'Javascript Code:', + 'required' => false, + 'readonly' => true, + 'class' => 'input_text_area', + 'value' => self::getWidgetCode(), //$_SERVER["SERVER_NAME"], + 'decorators' => array( + 'ViewHelper' + ) + )); /* Form Element for setting the Timezone */ $timezone = new Zend_Form_Element_Select("timezone"); @@ -93,6 +105,33 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm return $tzlist; } + private static function getWidgetCode() { + + $code = << +
+ +
+
+ element->getElement('widgetCode') ?> + element->getElement('widgetCode')->hasErrors()) : ?> + + +
+