public function init() { $this->setAttrib('id', 'frmDrmProfileConfigure'); $this->setMethod('post'); $titleElement = new Zend_Form_Element_Hidden('generalTitle'); $titleElement->setLabel('General'); $titleElement->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b')))); $this->addElement($titleElement); $this->addElement('text', 'id', array('label' => 'ID:', 'filters' => array('StringTrim'), 'readonly' => true, 'disabled' => 'disabled')); $this->addElement('text', 'partnerId', array('label' => 'Related Publisher ID:', 'required' => true, 'filters' => array('StringTrim'), 'placement' => 'prepend', 'readonly' => true)); $this->addElement('text', 'name', array('label' => 'Drm Profile Name:', 'required' => true, 'filters' => array('StringTrim'), 'placement' => 'prepend')); $this->addElement('text', 'description', array('label' => 'Description:', 'required' => false, 'filters' => array('StringTrim'))); $providerForView = new Kaltura_Form_Element_EnumSelect('typeForView', array('enum' => 'Kaltura_Client_Drm_Enum_DrmProviderType')); $providerForView->setLabel('Provider:'); $providerForView->setAttrib('readonly', true); $providerForView->setAttrib('disabled', 'disabled'); $providerForView->setValue($this->drmProfileProvider); $this->addElement($providerForView); $this->addElement('hidden', 'provider', array('filters' => array('StringTrim'), 'decorators' => array('ViewHelper'), 'value' => $this->drmProfileProvider)); $this->addElement('hidden', 'crossLine1', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $titleElement = new Zend_Form_Element_Hidden('detailsTitle'); $titleElement->setLabel('Details'); $titleElement->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b')))); $this->addElement($titleElement); $this->addElement('text', 'licenseServerUrl', array('label' => 'License Server Url', 'required' => false, 'filters' => array('StringTrim'))); // -------------------------------- $extendTypeSubForm = KalturaPluginManager::loadObject('Form_DrmProfileConfigureExtend_SubForm', $this->drmProfileProvider); if ($extendTypeSubForm) { $extendTypeSubForm->setDecorators(array('FormElements')); $this->addSubForm($extendTypeSubForm, self::EXTENSION_SUBFORM_NAME); } //------------------------------------ }
public function init() { $this->setAttrib('id', 'frmDropFolderConfigure'); $this->setMethod('post'); $titleElement = new Zend_Form_Element_Hidden('generalTitle'); $titleElement->setLabel('General'); $titleElement->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b')))); $this->addElement($titleElement); $this->addElement('text', 'id', array('label' => 'ID:', 'filters' => array('StringTrim'), 'readonly' => true, 'disabled' => 'disabled')); $this->addElement('text', 'partnerId', array('label' => 'Related Publisher ID:', 'required' => true, 'filters' => array('StringTrim'), 'placement' => 'prepend', 'readonly' => true)); $this->addElement('text', 'name', array('label' => 'Drop Folder Name:', 'required' => true, 'filters' => array('StringTrim'), 'placement' => 'prepend')); $this->addElement('text', 'description', array('label' => 'Description:', 'required' => false, 'filters' => array('StringTrim'))); $typeForView = new Kaltura_Form_Element_EnumSelect('typeForView', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderType')); $typeForView->setLabel('Type:'); $typeForView->setAttrib('readonly', true); $typeForView->setAttrib('disabled', 'disabled'); $typeForView->setValue($this->dropFolderType); $this->addElement($typeForView); $this->addElement('hidden', 'type', array('filters' => array('StringTrim'), 'decorators' => array('ViewHelper'), 'value' => $this->dropFolderType)); $this->addElement('text', 'tags', array('label' => 'Tags: (used by batch workers)', 'required' => false, 'filters' => array('StringTrim'))); $this->addElement('hidden', 'crossLine1', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); // -------------------------------- $titleElement = new Zend_Form_Element_Hidden('ingestionSettingsTitle'); $titleElement->setLabel('Ingestion Settings'); $titleElement->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b')))); $this->addElement($titleElement); $this->addConversionProfiles(); $this->addElement('text', 'fileNamePatterns', array('label' => 'Source File Name Patterns (to handle):', 'required' => true, 'value' => '*.*', 'filters' => array('StringTrim'))); $this->addElement('text', 'ignoreFileNamePatterns', array('label' => 'Ignore file name patterns (don\'t even list them) :', 'filters' => array('StringTrim'))); $fileHandlerTypes = new Kaltura_Form_Element_EnumSelect('fileHandlerType', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderFileHandlerType')); $fileHandlerTypes->setLabel('Ingestion Source:'); $fileHandlerTypes->setRequired(true); $fileHandlerTypes->setAttrib('onchange', 'handlerTypeChanged()'); $this->addElement($fileHandlerTypes); $handlerConfigForm = new Form_ContentFileHandlerConfig(); $this->addSubForm($handlerConfigForm, 'contentHandlerConfig'); $this->addElement('hidden', 'crossLine2', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); // -------------------------------- $titleElement = new Zend_Form_Element_Hidden('locationTitle'); $titleElement->setLabel('Local Storage Folder Location'); $titleElement->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b')))); $this->addElement($titleElement); $this->addElement('text', 'dc', array('label' => 'Drop Folder Batch Jobs Datacenter Location:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('text', 'path', array('label' => 'Drop Folder Storage Path:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('hidden', 'crossLine3', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); // -------------------------------- $titleElement = new Zend_Form_Element_Hidden('policiesTitle'); $titleElement->setLabel('Folder Policies'); $titleElement->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b')))); $this->addElement($titleElement); $this->addElement('text', 'fileSizeCheckInterval', array('label' => 'Check file size every (seconds):', 'required' => true, 'filters' => array('StringTrim'))); $fileDeletePolicies = new Kaltura_Form_Element_EnumSelect('fileDeletePolicy', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderFileDeletePolicy')); $fileDeletePolicies->setLabel('File Deletion Policy:'); $fileDeletePolicies->setRequired(true); $this->addElement($fileDeletePolicies); $this->addElement('text', 'autoFileDeleteDays', array('label' => 'Auto delete files after (days):', 'required' => true, 'filters' => array('StringTrim'))); // -------------------------------- $extendTypeSubForm = KalturaPluginManager::loadObject('Form_DropFolderConfigureExtend_SubForm', $this->dropFolderType); if ($extendTypeSubForm) { $this->addElement('hidden', 'crossLine4', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $extendTypeSubFormTitle = new Zend_Form_Element_Hidden(self::EXTENSION_SUBFORM_NAME . '_title'); $extendTypeSubFormTitle->setLabel($extendTypeSubForm->getTitle()); $extendTypeSubFormTitle->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b')))); $this->addElement($extendTypeSubFormTitle); $extendTypeSubForm->setDecorators(array('FormElements')); $this->addSubForm($extendTypeSubForm, self::EXTENSION_SUBFORM_NAME); } }