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() { $fileDeletePolicies = new Kaltura_Form_Element_EnumSelect('contentMatchPolicy', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderContentFileHandlerMatchPolicy')); $fileDeletePolicies->setLabel('Content Match Policy:'); $fileDeletePolicies->setRequired(true); $this->addElement($fileDeletePolicies); $this->addElement('text', 'slugRegex', array('label' => 'Slug Regex:', 'value' => '/(?P<referenceId>.+)[.]\\w{3,}/', 'filters' => array('StringTrim'))); $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'span', 'id' => 'frmContentFileHandlerConfig')))); }
public function init() { $this->setAttrib('id', 'addNewStorage'); $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'fieldset')), array('Form', array('class' => 'simple')))); $this->addElement('text', 'newPartnerId', array('label' => 'Publisher ID:', 'filters' => array('StringTrim'), 'value' => $this->filer_input)); $newProtocolType = new Kaltura_Form_Element_EnumSelect('newProtocolType', array('enum' => 'Kaltura_Client_Enum_StorageProfileProtocol', 'excludes' => array(Kaltura_Client_Enum_StorageProfileProtocol::KALTURA_DC))); $newProtocolType->setLabel('Protocol:'); $this->addElements(array($newProtocolType)); // submit button $this->addElement('button', 'newStorage', array('label' => 'Create New', 'onclick' => "doAction('newStorage', \$('#newPartnerId').val(), \$('#newProtocolType').val())", 'decorators' => array('ViewHelper'))); }
public function init() { $this->setAttrib('id', 'frmCreateDropFolder'); $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'fieldset')), array('Form', array('class' => 'simple')))); $this->addElement('text', 'newPartnerId', array('label' => 'Publisher ID:', 'onkeypress' => "return supressFormSubmit(event)", 'filters' => array('StringTrim'))); $newDropFolderType = new Kaltura_Form_Element_EnumSelect('newDropFolderType', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderType', 'excludes' => array(Kaltura_Client_DropFolder_Enum_DropFolderType::S3, Kaltura_Client_DropFolder_Enum_DropFolderType::SCP))); $newDropFolderType->setLabel('Type:'); $newDropFolderType->setRequired(true); $this->addElement($newDropFolderType); // submit button $this->addElement('button', 'submit', array('ignore' => true, 'label' => 'Create New', 'onclick' => "newDropFolder(\$('#newPartnerId').val(), \$('#newDropFolderType').val())", 'decorators' => array('ViewHelper'))); }
public function init() { $fileDeletePolicies = new Kaltura_Form_Element_EnumSelect('contentMatchPolicy', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderContentFileHandlerMatchPolicy')); $fileDeletePolicies->setLabel('Content Match Policy:'); $fileDeletePolicies->setRequired(true); $this->addElement($fileDeletePolicies); $this->addElement('text', 'slugRegex', array('label' => 'Slug Regex:', 'value' => '/(?P<referenceId>.+)[.]\\w{2,}/', 'filters' => array('StringTrim'))); $this->addElement('text', 'metadataProfileId', array('label' => 'Metadata Profile ID:', 'filters' => array('StringTrim'))); $this->addElement('text', 'categoriesMetadataFieldName', array('label' => 'Categories Metadata Field Name:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'enforceEntitlement', array('label' => 'Enforce Entitlement', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'div', 'class' => 'rememeber'))))); $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'span', 'id' => 'frmContentFileHandlerConfig')))); }
public function init() { $this->addElement('hidden', 'crossLine5', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $titleElement = new Zend_Form_Element_Hidden('troubleshootTitle'); $titleElement->setLabel('Troubleshoot'); $titleElement->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b')))); $this->addElement($titleElement); $status = new Kaltura_Form_Element_EnumSelect('status', array('enum' => 'Kaltura_Client_DropFolder_Enum_DropFolderStatus')); $status->setLabel('Status:'); $status->setAttrib('readonly', true); $status->setAttrib('disabled', 'disabled'); $this->addElement($status); $this->addElement('text', 'lastAccessedAt', array('label' => 'Last Drop Folder Access Time/Date:', 'disabled' => true, 'filters' => array('StringTrim'))); $this->addElement('textarea', 'errorDescription', array('label' => 'Error Description:', 'disabled' => true, 'rows' => 3, 'filters' => array('StringTrim'))); $this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'span', 'id' => 'frmTroubleshootConfig')))); }
public function init() { // Set the method for the display form to POST $this->setMethod('post'); $this->setAttrib('id', 'frmStorageConfig'); $this->addElement('text', 'storageId', array('label' => 'Storage ID:', 'filters' => array('StringTrim'), 'validators' => array(), 'readonly' => true)); $this->addElement('text', 'partnerId', array('label' => 'Related Publisher ID*:', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array())); $this->addElement('text', 'name', array('label' => 'Remote Storage Name*:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('text', 'systemName', array('label' => 'System Name:', 'filters' => array('StringTrim'))); $deliveryStatus = new Kaltura_Form_Element_EnumSelect('deliveryStatus', array('enum' => 'Kaltura_Client_Enum_StorageProfileDeliveryStatus')); $deliveryStatus->setLabel('Delivery Status:'); $this->addElements(array($deliveryStatus)); $this->addElement('text', 'deliveryPriority', array('label' => 'Delivery Priority:', 'required' => false, 'filters' => array('StringTrim'))); $this->addElement('textarea', 'desciption', array('label' => 'Description:', 'cols' => 60, 'rows' => 3, 'filters' => array('StringTrim'))); $this->addElement('text', 'storageUrl', array('label' => 'Storage URL*:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'allowAutoDelete', array('label' => 'Allow auto-deletion of files:', 'filters' => array('StringTrim'))); $this->addElement('text', 'minFileSize', array('label' => 'Export only files bigger than:', 'filters' => array('Digits'))); $this->addElement('text', 'maxFileSize', array('label' => 'Export only files smaller than:', 'filters' => array('Digits'))); $this->addElement('select', 'trigger', array('label' => 'Trigger:', 'filters' => array('StringTrim'), 'multiOptions' => array(3 => 'Flavor Ready', 2 => 'Moderation Approved'))); $readyBehavior = new Kaltura_Form_Element_EnumSelect('readyBehavior', array('enum' => 'Kaltura_Client_Enum_StorageProfileReadyBehavior')); $readyBehavior->setLabel('Ready Behavior:'); $this->addElements(array($readyBehavior)); $this->addDisplayGroup(array('storageId', 'partnerId', 'name', 'systemName', 'deliveryStatus', 'deliveryPriority', 'desciption'), 'general_info', array('legend' => 'General')); $this->addElement('hidden', 'crossLine1', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $this->addDisplayGroup(array('storageUrl', 'allowAutoDelete'), 'storage_info', array('legend' => 'Export Details')); $this->addElement('hidden', 'crossLine2', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $this->addDisplayGroup(array('minFileSize', 'maxFileSize', 'trigger', 'readyBehavior'), 'export_policy', array('legend' => 'Export Policy')); $this->addElement('hidden', 'crossLine3', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $this->addElement('text', 'delivery_profile_ids', array('label' => "Delivery profile ids (JSON)", 'filters' => array('StringTrim'), 'readonly' => true)); $element = $this->addElement('select', 'deliveryFormat', array('filters' => array('StringTrim'), 'registerInArrayValidator' => false)); $this->addElement('button', 'editDeliveryProfiles', array('label' => 'Add', 'decorators' => array('ViewHelper'))); $this->getElement('editDeliveryProfiles')->setAttrib('onClick', 'addDeliveryProfile()'); $this->addDisplayGroup(array('delivery_profile_ids', 'deliveryFormat', 'editDeliveryProfiles'), 'playback_info', array('legend' => 'Delivery Details')); $this->addElement('hidden', 'crossLine4', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $displayGroups = $this->getDisplayGroups(); foreach ($displayGroups as $displayGroup) { $displayGroup->removeDecorator('label'); $displayGroup->removeDecorator('DtDdWrapper'); } $element = new Infra_Form_Html('place_holder1', array('content' => '<span/>')); $this->addElement($element); $this->addDisplayGroup(array('place_holder1'), 'advanced', array('legend' => 'Advanced')); $openLeftDisplayGroup = $this->getDisplayGroup('general_info'); $openLeftDisplayGroup->setDecorators(array('FormElements', 'Fieldset', array('HtmlTag', array('tag' => 'div', 'openOnly' => true, 'class' => 'storageConfigureFormPanel')))); $closeLeftDisplayGroup = $this->getDisplayGroup('advanced'); $closeLeftDisplayGroup->setDecorators(array('FormElements', 'Fieldset', array('HtmlTag', array('tag' => 'div', 'closeOnly' => true)))); }
public function init() { // Set the method for the display form to POST $this->setMethod('post'); $this->setAttrib('id', 'frmDeliveryProfileConfig'); $this->addElement('text', 'deliveryProfileId', array('label' => 'Delivery Profile ID:', 'filters' => array('StringTrim'), 'validators' => array(), 'readonly' => true)); $this->addElement('text', 'partnerId', array('label' => 'Related Publisher ID*:', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array())); $this->addElement('text', 'name', array('label' => 'Delivery profile name*:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('text', 'systemName', array('label' => 'System Name:', 'filters' => array('StringTrim'))); $this->addElement('text', 'description', array('label' => 'Description:', 'filters' => array('StringTrim'))); $deliveryStatus = new Kaltura_Form_Element_EnumSelect('status', array('enum' => 'Kaltura_Client_Enum_DeliveryStatus')); $deliveryStatus->setLabel('Delivery Status:'); $this->addElements(array($deliveryStatus)); $this->addDisplayGroup(array('deliveryProfileId', 'partnerId', 'name', 'systemName', 'description', 'status'), 'general_info', array('legend' => 'General')); $this->addElement('hidden', 'crossLine0', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $type = new Kaltura_Form_Element_EnumSelect('type', array('enum' => 'Kaltura_Client_Enum_DeliveryProfileType')); $type->setLabel('Delivery profile Type*:'); $this->addElements(array($type)); $streamerType = new Kaltura_Form_Element_EnumSelect('streamerType', array('enum' => 'Kaltura_Client_Enum_PlaybackProtocol')); $streamerType->setLabel('Streamer Type*:'); $this->addElements(array($streamerType)); $this->addElement('text', 'mediaProtocols', array('label' => 'Supported Media Protocols:', 'filters' => array('StringTrim'))); $this->addElement('text', 'url', array('label' => 'Delivery profile URL*:', 'required' => true, 'filters' => array('StringTrim'))); $this->addDisplayGroup(array('type', 'streamerType', 'mediaProtocols', 'url'), 'delivery_info', array('legend' => 'Delivery Info')); $this->addElement('hidden', 'crossLine1', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $element2 = new Infra_Form_Html('place_holder2', array('content' => '<span/>')); $this->addElement($element2); $this->addDisplayGroup(array('place_holder2'), 'recognizer', array('legend' => 'Recognizer configuration')); $this->addElement('hidden', 'crossLine2', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $element3 = new Infra_Form_Html('place_holder3', array('content' => '<span/>')); $this->addElement($element3); $this->addDisplayGroup(array('place_holder3'), 'tokenizer', array('legend' => 'Tokenizer configuration')); $this->addElement('hidden', 'crossLine3', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $advancedSettings = $this->getAdvancedSettings(); $this->addDisplayGroup($advancedSettings, 'advanced', array('legend' => 'Advanced')); // ----------------------- $displayGroups = $this->getDisplayGroups(); foreach ($displayGroups as $displayGroup) { $displayGroup->removeDecorator('label'); $displayGroup->removeDecorator('DtDdWrapper'); } $openLeftDisplayGroup = $this->getDisplayGroup('general_info'); $openLeftDisplayGroup->setDecorators(array('FormElements', 'Fieldset', array('HtmlTag', array('tag' => 'div', 'openOnly' => true, 'class' => 'deliveryProfileConfigureFormPanel')))); $closeLeftDisplayGroup = $this->getDisplayGroup('advanced'); $closeLeftDisplayGroup->setDecorators(array('FormElements', 'Fieldset', array('HtmlTag', array('tag' => 'div', 'closeOnly' => true)))); // ----------- }
public function init() { $this->setDecorators(array('FormElements', array('ViewScript', array('viewScript' => 'distribution-field-config-sub-form.phtml', 'placement' => false)))); $this->addElement('checkbox', 'override', array('filters' => array('StringTrim'), 'class' => 'override', 'decorators' => array('ViewHelper'))); // we add fieldName as 2 fields (1 hidden, 1 disabled text) because // disabled fields are not sent by the browser when the form is submitted $this->addElement('text', 'fieldNameForView', array('filters' => array('StringTrim'), 'disabled' => true, 'class' => 'field-name', 'decorators' => array('ViewHelper'))); $this->addElement('hidden', 'fieldName', array('filters' => array('StringTrim'), 'decorators' => array('ViewHelper'))); $this->addElement('text', 'userFriendlyFieldName', array('filters' => array('StringTrim'), 'label' => 'Name:')); $this->addElement('text', 'entryMrssXslt', array('filters' => array('StringTrim'), 'label' => 'MRSS XSLT:')); $isRequired = new Kaltura_Form_Element_EnumSelect('isRequired', array('enum' => 'Kaltura_Client_ContentDistribution_Enum_DistributionFieldRequiredStatus')); $isRequired->setLabel('Required:'); $isRequired->setFilters(array('StringTrim')); $this->addElements(array($isRequired)); $this->addElement('checkbox', 'updateOnChange', array('filters' => array('StringTrim'), 'decorators' => array('ViewHelper'), 'class' => 'update-on-change', 'label' => 'Trigger Update:')); $this->addElement('text', 'updateParamsArrayString', array('filters' => array('StringTrim'), 'class' => 'update-param', 'decorators' => array('ViewHelper'))); }
public function init() { // Set the method for the display form to POST $this->setMethod('post'); $this->setDescription('partner-configure intro text'); $this->loadDefaultDecorators(); $this->addDecorator('Description', array('placement' => 'prepend')); // $this->addElement('text', 'account_name', array( // 'label' => 'Publisher Name:', // 'decorators' => array('Label', 'Description') // )); $this->addElement('text', 'partner_name', array('label' => 'Publisher Name:', 'filters' => array('StringTrim'))); $this->addElement('text', 'description', array('label' => 'Description:', 'filters' => array('StringTrim'))); // change to read only $this->addElement('text', 'admin_name', array('label' => 'Administrator Name:', 'filters' => array('StringTrim'), 'readonly' => true, 'ignore' => true, 'disable' => 'disable')); // change to read only $this->addElement('text', 'admin_email', array('label' => 'Administrator E-Mail:', 'filters' => array('StringTrim'), 'readonly' => true, 'ignore' => true, 'disable' => 'disable')); $this->addElement('text', 'host', array('label' => 'Publisher Specific Host:', 'filters' => array('StringTrim'))); $this->addElement('text', 'cdn_host', array('label' => 'Publisher Specific CDN Host:', 'filters' => array('StringTrim'))); $this->addElement('text', 'rtmp_url', array('label' => 'RTMP URL:', 'filters' => array('StringTrim'))); $this->addElement('text', 'admin_login_users_quota', array('label' => 'Number of KMC admin users:', 'filters' => array('StringTrim'))); $this->addElement('select', 'partner_package', array('label' => 'Usage Package:', 'filters' => array('StringTrim'))); $this->addElement('text', 'def_thumb_offset', array('label' => 'Default Thumbnail Offset', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'live_stream_enabled'))))); $this->addElement('checkbox', 'monitor_usage', array('label' => 'Monitor Usage', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'live_stream_enabled'))))); $this->addElement('hidden', 'crossLine', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $element = new Zend_Form_Element_Hidden('setPublisherFunctionality'); $element->setLabel('Set Publisher Functionality'); $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b', 'class' => 'setPublisherFunctionality')))); $this->addElements(array($element)); $this->addElement('checkbox', 'live_stream_enabled', array('label' => 'Live workFlow', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'live_stream_enabled'))))); $this->addElement('checkbox', 'enable_silver_light', array('label' => 'Silverlight', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_silver_light'))))); $this->addElement('checkbox', 'enable_vast', array('label' => 'Vast', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_vast'))))); $this->addElement('checkbox', 'enable508_players', array('label' => '508 players', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_508_players'))))); $this->addElement('checkbox', 'enable_ps2_permission_validation', array('label' => 'PS2 permission validation', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_ps2_permission_validation'))))); $this->addElement('checkbox', 'enable_metadata', array('label' => 'Metadata', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_metadata'))))); $this->addElement('checkbox', 'enable_content_distribution', array('label' => 'Content Distribution', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_content_distribution'))))); $this->addElement('checkbox', 'enable_audit_trail', array('label' => 'Audit trail', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_audit_trail'))))); $this->addElement('checkbox', 'enable_annotation', array('label' => 'Annotation', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_annotation'))))); $this->addElement('checkbox', 'enable_mobile_flavors', array('label' => 'Mobile flavors', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_mobile_flavors'))))); $this->addElement('checkbox', 'enable_analytics_tab', array('label' => 'Analytics tab', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'enable_analytics_tab'))))); $this->addElement('checkbox', 'moderate_content', array('label' => 'Content Moderation', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'moderate_content'))))); $this->addElement('checkbox', 'storage_delete_from_kaltura', array('label' => 'Delete exported storage from Kaltura', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'storage_delete_from_kaltura'))))); $storageServP = new Kaltura_Form_Element_EnumSelect('storage_serve_priority', array('enum' => 'KalturaStorageServePriority')); $storageServP->setLabel('Delivery Policy:'); $this->addElements(array($storageServP)); }
public function init() { // Set the method for the display form to POST $this->setMethod('post'); $this->setAttrib('id', 'frmVirusScanProfileConfig'); $this->addElement('text', 'partnerId', array('label' => '*Related Publisher ID:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('text', 'name', array('label' => '*Virus Scan Profile Name:', 'required' => true, 'filters' => array('StringTrim'))); $engineType = new Kaltura_Form_Element_EnumSelect('engineType', array('enum' => 'Kaltura_Client_VirusScan_Enum_VirusScanEngineType')); $engineType->setLabel('Engine Type:'); $engineType->setRequired(true); $this->addElements(array($engineType)); $actionIfInfected = new Kaltura_Form_Element_EnumSelect('actionIfInfected', array('enum' => 'Kaltura_Client_VirusScan_Enum_VirusFoundAction')); $actionIfInfected->setLabel('Cleaning Policy:'); $actionIfInfected->setRequired(true); $this->addElements(array($actionIfInfected)); $this->addElement('multiselect', 'entryTypeToFilter', array('label' => 'Entry Type:', 'size' => 3, 'filters' => array('StringTrim'))); //entry type to filter drop down list $arr = array(Kaltura_Client_Enum_EntryType::DATA => 'Data', Kaltura_Client_Enum_EntryType::MEDIA_CLIP => 'Media Clip', Kaltura_Client_Enum_EntryType::DOCUMENT => 'Document'); $this->getElement('entryTypeToFilter')->setMultiOptions($arr); }
public function init() { // Set the method for the display form to POST $this->setMethod('post'); $this->setAttrib('id', 'frmStorageConfig'); $this->addElement('text', 'partnerId', array('label' => '*Related Publisher ID:', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array())); $this->addElement('text', 'name', array('label' => '*Remote Storage Name:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('text', 'systemName', array('label' => 'System Name:', 'filters' => array('StringTrim'))); $deliveryStatus = new Kaltura_Form_Element_EnumSelect('deliveryStatus', array('enum' => 'Kaltura_Client_Enum_StorageProfileDeliveryStatus')); $deliveryStatus->setLabel('Delivery Status:'); $this->addElements(array($deliveryStatus)); $this->addElement('text', 'deliveryPriority', array('label' => 'Delivery Priority:', 'required' => false, 'filters' => array('StringTrim'))); $this->addElement('textarea', 'desciption', array('label' => 'Description:', 'cols' => 60, 'rows' => 3, 'filters' => array('StringTrim'))); $this->addElement('select', 'protocol', array('label' => 'Transfer Protocol:', 'filters' => array('StringTrim'))); $this->addElement('text', 'storageUrl', array('label' => '*Storage URL:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('text', 'storageBaseDir', array('label' => 'Storage Base Directory:', 'filters' => array('StringTrim'))); $this->addElement('text', 'storageUsername', array('label' => '*Storage Username:'******'required' => true, 'filters' => array('StringTrim'))); $this->addElement('text', 'storagePassword', array('label' => '*Storage Password:'******'required' => true, 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'storageFtpPassiveMode', array('label' => 'Storage FTP Passive Mode', 'filters' => array('StringTrim'), 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append'))))); $this->addElement('text', 'deliveryHttpBaseUrl', array('label' => '*HTTP Delivery Base URL:', 'required' => true, 'filters' => array('StringTrim'))); $this->addElement('text', 'deliveryRmpBaseUrl', array('label' => 'RTMP Delivery Base URL:', 'filters' => array('StringTrim'))); $this->addElement('text', 'rtmpPrefix', array('label' => 'RTMP stream URL prefix:', 'filters' => array('StringTrim'))); $this->addElement('text', 'deliveryIisBaseUrl', array('label' => 'IIS Delivery Base URL:', 'filters' => array('StringTrim'))); $this->addElement('text', 'minFileSize', array('label' => 'Export only files bigger than:', 'filters' => array('Digits'))); $this->addElement('text', 'maxFileSize', array('label' => 'Export only files smaller than:', 'filters' => array('Digits'))); $this->addElement('select', 'pathManagerClass', array('label' => 'Path Manager:', 'filters' => array('StringTrim'))); $this->getElement('pathManagerClass')->setRegisterInArrayValidator(false); $this->addElement('select', 'urlManagerClass', array('label' => 'Delivery URL format :', 'filters' => array('StringTrim'))); $this->getElement('urlManagerClass')->setRegisterInArrayValidator(false); $this->addElement('select', 'trigger', array('label' => 'Trigger:', 'filters' => array('StringTrim'))); $readyBehavior = new Kaltura_Form_Element_EnumSelect('readyBehavior', array('enum' => 'Kaltura_Client_Enum_StorageProfileReadyBehavior')); $readyBehavior->setLabel('Ready Behavior:'); $this->addElements(array($readyBehavior)); $this->addElement('textarea', 'urlManagerParamsJson', array('label' => 'URL Manager Params (JSON):', 'cols' => 48, 'rows' => 2, 'filters' => array('StringTrim'))); $this->addElement('textarea', 'pathManagerParamsJson', array('label' => 'Path Manager Params (JSON):', 'cols' => 48, 'rows' => 2, 'filters' => array('StringTrim'))); }
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); } }
public function init() { $permissionNames = array(); $permissionNames[self::GROUP_ENABLE_DISABLE_FEATURES] = array(); $permissionNames[self::GROUP_CONTENT_INGESTION_OPTIONS] = array(); $permissionNames[self::GROUP_PUBLISHER_DELIVERY_SETTINGS] = array(); $permissionNames[self::GROUP_REMOTE_STORAGE] = array(); $permissionNames[self::GROUP_NOTIFICATION_CONFIG] = array(); $permissionNames[self::GROUP_ACCESS_CONTROL] = array(); $permissionNames[self::THUMBNAIL_CONFIGURATION] = array(); $permissionNames[self::SECURITY_OPTIONS] = array(); // Set the method for the display form to POST $this->setMethod('post'); $this->setAttrib('id', 'frmPartnerConfigure'); //$this->setDescription('partner-configure intro text'); $this->loadDefaultDecorators(); $this->addDecorator('Description', array('placement' => 'prepend')); // $this->addElement('text', 'account_name', array( // 'label' => 'Publisher Name:', // 'decorators' => array('Label', 'Description') // )); //--------------------------- General Information --------------------------- $this->addElement('text', 'partner_name', array('label' => 'partner-configure Publisher Name', 'filters' => array('StringTrim'), 'required' => true)); $this->addElement('text', 'description', array('label' => 'partner-configure Description', 'filters' => array('StringTrim'))); // change to read only $this->addElement('text', 'admin_name', array('label' => 'partner-configure Administrator Name', 'filters' => array('StringTrim'), 'readonly' => true)); // change to read only $this->addElement('text', 'admin_email', array('label' => 'Administrator E-Mail:', 'filters' => array('StringTrim'), 'readonly' => true, 'ignore' => true)); $this->addElement('text', 'id', array('label' => 'Partner ID:', 'filters' => array('StringTrim'), 'readonly' => true, 'ignore' => true)); $this->addElement('text', 'kmc_version', array('label' => 'KMC Release Version:', 'filters' => array('StringTrim'), 'readonly' => true, 'ignore' => true)); $this->addElement('select', 'language', array('label' => "UI language:", 'filters' => array('StringTrim'), 'value' => 'en')); $arr = array(); foreach (Zend_Registry::get('config')->languages as $language) { $arr[$language->id] = $language->name; } $this->getElement('language')->setMultiOptions($arr); $this->addElement('checkbox', 'default_entitlement_enforcement', array('label' => 'Default Entitlement Enforcement', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); //--------------------------- Publisher specific Delivery Settings --------------------------- $this->addElement('checkbox', 'enforce_delivery', array('label' => 'Enforce Delivery', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field_only'))))); $this->addElement('checkbox', 'checkbox_host', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'host', array('label' => 'Service Host Name:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'checkbox_cdn_host', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'cdn_host', array('label' => 'CDN Host:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'checkbox_thumbnail_host', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'thumbnail_host', array('label' => 'Thumbnail Delivery URL:', 'filters' => array('StringTrim'))); $this->addElement('text', 'delivery_profile_ids', array('label' => "Delivery profile ids (JSON)", 'filters' => array('StringTrim'), 'readonly' => true)); $this->addElement('select', 'deliveryFormat', array('label' => 'Add format', 'registerInArrayValidator' => false)); $this->addElement('button', 'editDeliveryProfiles', array('label' => 'Add', 'decorators' => array('ViewHelper'))); $this->getElement('editDeliveryProfiles')->setAttrib('onClick', 'addDeliveryProfile()'); $this->addElement('checkbox', 'checkbox_cache_flavor_version', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'cache_flavor_version', array('label' => 'Cache Flavor Version:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'restrict_thumbnail_by_ks', array('label' => 'Apply access control rule on thumbnail', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'live_stream_enabled'))))); $this->addElement('checkbox', 'support_animated_thumbnails', array('label' => 'Support animated (gif) thumbnails', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt'))))); $this->addElement('select', 'default_delivery_type', array('label' => 'Default Delivery Type:', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'prepend')), array('HtmlTag', array('tag' => 'dt'))))); $this->addElement('select', 'default_embed_code_type', array('label' => 'Default Embed Code Type:', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'prepend')), array('HtmlTag', array('tag' => 'dt'))))); $this->addElement('checkbox', 'use_default_streamers', array('label' => 'Enable system streamer types', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt'))))); $permissionNames[self::GROUP_PUBLISHER_DELIVERY_SETTINGS]['Apply access control rule on thumbnail'] = 'restrict_thumbnail_by_ks'; $permissionNames[self::GROUP_PUBLISHER_DELIVERY_SETTINGS]['Default Delivery Type'] = 'default_delivery_type'; $permissionNames[self::GROUP_PUBLISHER_DELIVERY_SETTINGS]['Default Embed Code Type'] = 'default_embed_code_type'; $permissionNames[self::GROUP_PUBLISHER_DELIVERY_SETTINGS]['Enable system streamer types'] = 'use_default_streamers'; foreach ($this->playerDeliveryTypes as $playerDeliveryType) { /* @var $playerDeliveryType Kaltura_Client_Type_PlayerDeliveryType */ $systemDefault = $playerDeliveryType->enabledByDefault ? 'Enabled' : 'Disabled'; $description = $playerDeliveryType->id ? "(<b>{$systemDefault}</b> as system default)" : ''; $this->addElement('checkbox', 'delivery_type_' . $playerDeliveryType->id, array('label' => "Enable {$playerDeliveryType->label}", 'description' => $description, 'data-checked' => $playerDeliveryType->enabledByDefault, 'disabled' => true, 'checked' => $playerDeliveryType->enabledByDefault, 'class' => 'delivery_type', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('Description', array('escape' => false)), array('HtmlTag', array('tag' => 'dt'))))); $permissionNames[self::GROUP_PUBLISHER_DELIVERY_SETTINGS][$playerDeliveryType->label] = 'delivery_type_' . $playerDeliveryType->id; } //--------------------------- Remote Storage Account policy --------------------------- $storageServP = new Kaltura_Form_Element_EnumSelect('storage_serve_priority', array('enum' => 'Kaltura_Client_Enum_StorageServePriority')); $storageServP->setLabel('Delivery Policy:'); $this->addElements(array($storageServP)); $this->addElement('checkbox', 'storage_delete_from_kaltura', array('label' => 'Delete exported storage from Kaltura', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('checkbox', 'import_remote_source_for_convert', array('label' => 'Import remote source for convert', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); //--------------------------- Advanced Notification settings --------------------------- $this->addElement('text', 'notifications_config', array('label' => 'Notification Configuration:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'allow_multi_notification', array('label' => 'Allow multi-notifications', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field_only'))))); //--------------------------- Content Ingestion Options --------------------------- $this->addElement('text', 'def_thumb_offset', array('label' => 'Default Thumbnail Offset')); $this->addElement('text', 'def_thumb_density', array('label' => 'Default Thumbnail Density')); $this->addElement('checkbox', 'enable_bulk_upload_notifications_emails', array('label' => 'Bulk Upload Notifications Emails (Legacy)', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'bulk_upload_notifications_email', array('label' => 'Bulk Upload Notifications Email (Legacy)')); //--------------------------- Password Security --------------------------- $this->addElement('text', 'login_block_period', array('label' => 'Login Block Period (seconds):', 'filters' => array('StringTrim'))); $this->addElement('text', 'num_prev_pass_to_keep', array('label' => 'Number of recent passwords kept:', 'filters' => array('StringTrim'))); $this->addElement('text', 'pass_replace_freq', array('label' => 'Password replacement frequency (seconds):', 'filters' => array('StringTrim'))); //--------------------------- Single Sign On --------------------------- $this->addElement('text', 'logout_url', array('label' => 'Logout Url:', 'filters' => array('StringTrim'))); //--------------------------- Access Control --------------------------- $this->addElement('text', 'api_access_control_id', array('label' => 'API Access Control ID:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'restrict_entry_by_metadata', array('label' => 'Apply access control on entry metadata', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field_only'))))); //--------------------------- Group Association --------------------------- $partnerGroupTypes = new Kaltura_Form_Element_EnumSelect('partner_group_type', array('enum' => 'Kaltura_Client_Enum_PartnerGroupType')); $partnerGroupTypes->setLabel('Account Type:'); $this->addElements(array($partnerGroupTypes)); $this->addElement('text', 'partner_parent_id', array('label' => 'Parent Account Id:', 'filters' => array('StringTrim'))); $this->addElement('text', 'reference_id', array('label' => 'Reference Id:', 'filters' => array('StringTrim'))); //--------------------------- Service Packages --------------------------- $this->addElement('select', 'partner_package', array('label' => 'Service Edition Type:', 'filters' => array('StringTrim'), 'onChange' => 'openChangeServicePackageAlertBox()')); $this->addElement('select', 'partner_package_class_of_service', array('label' => 'Class of Service:', 'filters' => array('StringTrim'))); $this->addElement('select', 'vertical_clasiffication', array('label' => 'Vertical Classification:', 'filters' => array('StringTrim'))); $this->addElement('text', 'crm_id', array('label' => 'CRM ID:', 'filters' => array('StringTrim'))); $this->addElement('text', 'crm_link', array('label' => 'Link to CRM record:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'internal_use', array('label' => 'Internal Use Account', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field_only'))))); //--------------------------- New Account Options --------------------------- $this->addElement('button', 'monitor_usage_history', array('label' => 'View History')); $this->addElement('checkbox', 'extended_free_trail', array('label' => 'Extended Free Trial', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'extended_free_trail_expiry_date', array('label' => 'Free Trial Extension Expiry Date:')); $this->addElement('text', 'extended_free_trail_expiry_reason', array('label' => 'Free Trial Extension Reason:')); $this->addElement('checkbox', 'is_first_login', array('label' => 'Force First Login Message in KMC', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('class' => 'partner_configuration_checkbox_field_only'))))); //--------------------------- Included Usage --------------------------- $element = new Zend_Form_Element_Hidden('includedUsageLabel'); $element->setLabel('For reporting purposes only. Leave empty for unlimited usage or when not applicable'); $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partnerConfigurationDescription')))); $this->addElements(array($element)); $this->addElement('radio', 'mothly_bandwidth_combined', array('label' => 'Mothly Bandwidth:', 'multiOptions' => array('1' => 'Combined Usage:', '2' => 'Separated Usage:'), 'decorators' => array('ViewHelper', array('HtmlTag', array('tag' => 'dt', 'id' => 'mothly_bandwidth_combined'))))); //--------------- Live Stream Params ---------------------------- $sourceTypes = array(Kaltura_Client_Enum_SourceType::AKAMAI_LIVE => 'Akamai Live'); $this->addElement('select', 'default_live_stream_entry_source_type', array('label' => 'Live Stream source type:', 'filters' => array('StringTrim'))); $this->getElement('default_live_stream_entry_source_type')->setMultiOptions($sourceTypes); $this->addElement('text', 'live_stream_provision_params', array('label' => 'Provision parameters (JSON format)', 'filters' => array('StringTrim'))); //--------------- Host white list ---------------------------- $this->addElement('text', 'cdn_host_white_list', array('label' => 'CDN Host white list regex (comma seperated)', 'filters' => array('StringTrim'))); //----------------------------------------------------------------------- $this->addElement('hidden', 'crossLine', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $this->addLimitsElements(); //--------------------------- Enable/Disable Features --------------------------- $moduls = Zend_Registry::get('config')->moduls; if ($moduls) { foreach ($moduls as $name => $modul) { $attributes = array('label' => $modul->label, 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field')))); if (!$modul->enabled) { $attributes['disabled'] = true; } $this->addElement('checkbox', $modul->permissionName, $attributes); if ($modul->indexLink != null) { //check permission to access the link's page $indexLinkArray = explode('/', $modul->indexLink); $element = $this->getElement($modul->permissionName); $element->setDescription('<a class=linkToPage href="../' . $modul->indexLink . '">(config)</a>'); $element->addDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('Description', array('escape' => false, 'tag' => false)))); } $permissionNames[$modul->group][$modul->label] = $modul->permissionName; } $this->addElement('checkbox', 'moderate_content', array('label' => 'Content Moderation', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $permissionNames[self::GROUP_CONTENT_INGESTION_OPTIONS]['Content Moderation'] = 'moderate_content'; $permissionNames[self::GROUP_ENABLE_DISABLE_FEATURES]['Default Entitlement Enforcement'] = 'default_entitlement_enforcement'; ksort($permissionNames[self::GROUP_ENABLE_DISABLE_FEATURES]); ksort($permissionNames[self::GROUP_CONTENT_INGESTION_OPTIONS]); ksort($permissionNames[self::GROUP_REMOTE_STORAGE]); ksort($permissionNames[self::GROUP_NOTIFICATION_CONFIG]); ksort($permissionNames[self::SECURITY_OPTIONS]); $this->addAllDisplayGroups($permissionNames); } //adding display group to all features $this->addElement('checkbox', 'checkbox_audio_thumb_entry_id', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'audio_thumb_entry_id', array('label' => 'Image Entry ID For Audio Entry Thumbnails:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'checkbox_live_thumb_entry_id', array('decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'live_thumb_entry_id', array('label' => 'Image Entry ID For Live Entry Thumbnails:', 'filters' => array('StringTrim'))); $permissionNames[self::THUMBNAIL_CONFIGURATION]['checkbox audio thumb entry id'] = 'checkbox_audio_thumb_entry_id'; $permissionNames[self::THUMBNAIL_CONFIGURATION]['Audio Thumbnail Entry Id:'] = 'audio_thumb_entry_id'; $permissionNames[self::THUMBNAIL_CONFIGURATION]['checkbox live thumb entry id'] = 'checkbox_live_thumb_entry_id'; $permissionNames[self::THUMBNAIL_CONFIGURATION]['Live Thumbnail Entry Id:'] = 'live_thumb_entry_id'; $this->addDisplayGroup(array('checkbox_audio_thumb_entry_id', 'audio_thumb_entry_id', 'checkbox_live_thumb_entry_id', 'live_thumb_entry_id', 'crossLine'), 'thumbnailConfiguration', array('legend' => 'Thumbnail Configuration:')); $this->addDisplayGroup($permissionNames[self::GROUP_ENABLE_DISABLE_FEATURES], 'enableDisableFeatures', array('legend' => 'Enable/Disable Features:')); //removing decorators from display groups $displayGroups = $this->getDisplayGroups(); foreach ($displayGroups as $displayGroup) { $displayGroup->removeDecorator('label'); $displayGroup->removeDecorator('DtDdWrapper'); } //creating divs for left right dividing $this->setDisplayColumn('generalInformation', 'passwordSecurity', true); $this->setDisplayColumn('accountPackagesService', 'enableDisableFeatures', false); //---------------- Display DisplayGroups according to Permissions --------------- $this->handlePermissions(); }
public function init() { $permissionNames = array(); $permissionNames[self::GROUP_ENABLE_DISABLE_FEATURES] = array(); $permissionNames[self::GROUP_CONTENT_INGESTION_OPTIONS] = array(); $permissionNames[self::GROUP_PUBLISHER_DELIVERY_SETTINGS] = array(); $permissionNames[self::GROUP_REMOTE_STORAGE] = array(); $permissionNames[self::GROUP_NOTIFICATION_CONFIG] = array(); // Set the method for the display form to POST $this->setMethod('post'); $this->setAttrib('id', 'frmPartnerConfigure'); //$this->setDescription('partner-configure intro text'); $this->loadDefaultDecorators(); $this->addDecorator('Description', array('placement' => 'prepend')); // $this->addElement('text', 'account_name', array( // 'label' => 'Publisher Name:', // 'decorators' => array('Label', 'Description') // )); //--------------------------- General Information --------------------------- $this->addElement('text', 'partner_name', array('label' => 'partner-configure Publisher Name', 'filters' => array('StringTrim'), 'required' => true)); $this->addElement('text', 'description', array('label' => 'partner-configure Description', 'filters' => array('StringTrim'))); // change to read only $this->addElement('text', 'admin_name', array('label' => 'partner-configure Administrator Name', 'filters' => array('StringTrim'), 'readonly' => true)); // change to read only $this->addElement('text', 'admin_email', array('label' => 'Administrator E-Mail:', 'filters' => array('StringTrim'), 'readonly' => true, 'ignore' => true)); $this->addElement('text', 'id', array('label' => 'Partner ID:', 'filters' => array('StringTrim'), 'readonly' => true, 'ignore' => true)); $this->addElement('text', 'kmc_version', array('label' => 'KMC Release Version:', 'filters' => array('StringTrim'), 'readonly' => true, 'ignore' => true)); $this->addElement('text', 'wams_account_name', array('label' => 'partner-configure WAMS Account Name', 'filters' => array('StringTrim'), 'ignore' => true)); $this->addElement('text', 'wams_account_key', array('label' => 'partner-configure WAMS Account Key', 'filters' => array('StringTrim'), 'ignore' => true)); $this->addElement('checkbox', 'default_entitlement_enforcement', array('label' => 'Default Entitlement Enforcement', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); //--------------------------- Publisher specific Delivery Settings --------------------------- // $this->addElement('checkbox', 'checkbox_host', array( // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))), // )); // // $this->addElement('text', 'host', array( // 'label' => 'Service Host Name:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('checkbox', 'checkbox_cdn_host', array( // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))) // )); // // $this->addElement('text', 'cdn_host', array( // 'label' => 'CDN HTTP Delivery URL:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('checkbox', 'checkbox_rtmp_url', array( // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))) // )); // // $this->addElement('text', 'rtmp_url', array( // 'label' => 'RTMP Delivery URL:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('checkbox', 'checkbox_thumbnail_host', array( // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))) // )); // // $this->addElement('text', 'thumbnail_host', array( // 'label' => 'Thumbnail Delivery URL:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('checkbox', 'checkbox_delivery_restrictions', array( // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))) // )); // // $this->addElement('text', 'delivery_restrictions', array( // 'label' => 'Delivery Restrictions:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('checkbox', 'checkbox_cache_flavor_version', array( // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))) // )); // // $this->addElement('text', 'cache_flavor_version', array( // 'label' => 'Cache Flavor Version:', // 'filters' => array('StringTrim'), // )); $this->addElement('checkbox', 'restrict_thumbnail_by_ks', array('label' => 'Apply access control rule on thumbnail', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'live_stream_enabled'))))); // $this->addElement('checkbox', 'support_animated_thumbnails', array( // 'label' => 'Support animated (gif) thumbnails', // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt'))) // )); // $permissionNames[self::GROUP_PUBLISHER_DELIVERY_SETTINGS]['Apply access control rule on thumbnail'] = 'restrict_thumbnail_by_ks'; //--------------------------- Remote Storage Account policy --------------------------- // $storageServP = new Kaltura_Form_Element_EnumSelect('storage_serve_priority', array('enum' => 'Kaltura_Client_Enum_StorageServePriority')); // $storageServP->setLabel('Delivery Policy:'); // $this->addElements(array($storageServP)); // // $this->addElement('checkbox', 'storage_delete_from_kaltura', array( // 'label' => 'Delete exported storage from Kaltura', // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))) // )); // // $this->addElement('checkbox', 'import_remote_source_for_convert', array( // 'label' => 'Import remote source for convert', // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))) // )); //--------------------------- Advanced Notification settings --------------------------- $this->addElement('text', 'notifications_config', array('label' => 'Notification Configuration:', 'filters' => array('StringTrim'))); $this->addElement('checkbox', 'allow_multi_notification', array('label' => 'Allow multi-notifications', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field_only'))))); //--------------------------- Content Ingestion Options --------------------------- $this->addElement('text', 'def_thumb_offset', array('label' => 'Default Thumbnail Offset')); $this->addElement('text', 'def_thumb_density', array('label' => 'Default Thumbnail Density')); $this->addElement('checkbox', 'enable_bulk_upload_notifications_emails', array('label' => 'Bulk Upload Notifications Emails (Legacy)', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $this->addElement('text', 'bulk_upload_notifications_email', array('label' => 'Bulk Upload Notifications Email (Legacy)')); //--------------------------- Password Security --------------------------- $this->addElement('text', 'login_block_period', array('label' => 'Login Block Period (seconds):', 'filters' => array('StringTrim'))); $this->addElement('text', 'num_prev_pass_to_keep', array('label' => 'Number of recent passwords kept:', 'filters' => array('StringTrim'))); $this->addElement('text', 'pass_replace_freq', array('label' => 'Password replacement frequency (seconds):', 'filters' => array('StringTrim'))); //--------------------------- Single Sign On --------------------------- $this->addElement('text', 'logout_url', array('label' => 'Logout Url:', 'filters' => array('StringTrim'))); //--------------------------- Access Control --------------------------- // $this->addElement('text', 'api_access_control_id', array( // 'label' => 'API Access Control ID:', // 'filters' => array('StringTrim'), // )); //--------------------------- Group Association --------------------------- $partnerGroupTypes = new Kaltura_Form_Element_EnumSelect('partner_group_type', array('enum' => 'Kaltura_Client_Enum_PartnerGroupType')); $partnerGroupTypes->setLabel('Account Type:'); $this->addElements(array($partnerGroupTypes)); // $this->addElement ('text','partner_parent_id', array( // 'label' => 'Parent Account Id:', // 'filters' => array('StringTrim'), // )); //--------------------------- Service Packages --------------------------- // $this->addElement('select', 'partner_package', array( // 'label' => 'Service Edition Type:', // 'filters' => array('StringTrim'), // 'onChange' => 'openChangeServicePackageAlertBox()', // )); // // $this->addElement('select', 'partner_package_class_of_service', array( // 'label' => 'Class of Service:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('select', 'vertical_clasiffication', array( // 'label' => 'Vertical Clasiffication:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('text', 'crm_id', array( // 'label' => 'CRM ID:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('text', 'crm_link', array( // 'label' => 'Link to CRM record:', // 'filters' => array('StringTrim'), // )); // // $this->addElement('checkbox', 'internal_use', array( // 'label' => 'Internal Use Account', // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field_only'))) // )); //--------------------------- New Account Options --------------------------- // $this->addElement('checkbox', 'extended_free_trail', array( // 'label' => 'Extended Free Trial', // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))) // )); // // $this->addElement('text', 'extended_free_trail_expiry_date', array( // 'label' => 'Free Trial Extension Expiry Date:', // )); // // $this->addElement('text', 'extended_free_trail_expiry_reason', array( // 'label' => 'Free Trial Extension Expiry Reason:', // )); // // $this->addElement('button', 'monitor_usage_history', array( // 'label' => 'View History', // // //'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('class' => 'partner_configuration_checkbox_field'))) // )); // // // $this->addElement('checkbox', 'is_first_login', array( // 'label' => 'Force First Login Message in KMC', // 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('class' => 'partner_configuration_checkbox_field_only'))) // )); // // //--------------------------- Included Usage --------------------------- $element = new Zend_Form_Element_Hidden('includedUsageLabel'); $element->setLabel('For reporting purposes only. Leave empty for unlimited usage or when not applicable'); $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partnerConfigurationDescription')))); $this->addElements(array($element)); $this->addElement('radio', 'mothly_bandwidth_combined', array('label' => 'Mothly Bandwidth:', 'multiOptions' => array('1' => 'Combined Usage:', '2' => 'Separated Usage:'), 'decorators' => array('ViewHelper', array('HtmlTag', array('tag' => 'dt', 'id' => 'mothly_bandwidth_combined'))))); //--------------- Live Stream Params ---------------------------- // $sourceTypes = array(Kaltura_Client_Enum_SourceType::AKAMAI_LIVE => 'Akamai Live'); //// if (defined('Kaltura_Client_Enum_SourceType::LIMELIGHT_LIVE')) { //// $sourceTypes[Kaltura_Client_Enum_SourceType::LIMELIGHT_LIVE] = 'Lime Light Live'; //// } // // $this->addElement('select', 'default_live_stream_entry_source_type', array( // 'label' => 'Live Stream source type:', // 'filters' => array('StringTrim'))); // $this->getElement('default_live_stream_entry_source_type')->setMultiOptions($sourceTypes); // // $this->addElement('text', 'live_stream_provision_params', array( // 'label' => 'Provision parameters (JSON format)', // 'filters' => array('StringTrim'), // )); //----------------------------------------------------------------------- $this->addElement('hidden', 'crossLine', array('lable' => 'line', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'hr', 'class' => 'crossLine'))))); $this->addLimitsElements(); //--------------------------- Enable/Disable Features --------------------------- $moduls = Zend_Registry::get('config')->moduls; if ($moduls) { foreach ($moduls as $name => $modul) { $attributes = array('label' => $modul->label, 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field')))); if (!$modul->enabled) { $attributes['disabled'] = true; } $this->addElement('checkbox', $modul->permissionName, $attributes); if ($modul->indexLink != null) { //check permission to access the link's page $indexLinkArray = explode('/', $modul->indexLink); // Commented by Tan-Tan // The system admin user is never allowed to use these features, the features are allowed to the partner // // $linkAllowed= false; // if (($indexLinkArray[0])=='plugin'){ // $linkAllowed = Infra_AclHelper::isAllowed($indexLinkArray[1], null); // } // else{ // $linkAllowed = Infra_AclHelper::isAllowed($indexLinkArray[0], $indexLinkArray[1]); // } // if ($linkAllowed) // { $element = $this->getElement($modul->permissionName); $element->setDescription('<a class=linkToPage href="../' . $modul->indexLink . '">(config)</a>'); $element->addDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('Description', array('escape' => false, 'tag' => false)))); // } } $permissionNames[$modul->group][$modul->label] = $modul->permissionName; } $this->addElement('checkbox', 'moderate_content', array('label' => 'Content Moderation', 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt', 'class' => 'partner_configuration_checkbox_field'))))); $permissionNames[self::GROUP_CONTENT_INGESTION_OPTIONS]['Content Moderation'] = 'moderate_content'; $permissionNames[self::GROUP_ENABLE_DISABLE_FEATURES]['Default Entitlement Enforcement'] = 'default_entitlement_enforcement'; ksort($permissionNames[self::GROUP_ENABLE_DISABLE_FEATURES]); ksort($permissionNames[self::GROUP_CONTENT_INGESTION_OPTIONS]); ksort($permissionNames[self::GROUP_REMOTE_STORAGE]); ksort($permissionNames[self::GROUP_NOTIFICATION_CONFIG]); $this->addAllDisplayGroups($permissionNames); } //adding display group to all features $this->addDisplayGroup($permissionNames[self::GROUP_ENABLE_DISABLE_FEATURES], 'enableDisableFeatures', array('legend' => 'Enable/Disable Features:')); //removing decorators from display groups $displayGroups = $this->getDisplayGroups(); foreach ($displayGroups as $displayGroup) { $displayGroup->removeDecorator('label'); $displayGroup->removeDecorator('DtDdWrapper'); } //creating divs for left right dividing $this->setDisplayColumn('generalInformation', 'passwordSecurity', true); $this->setDisplayColumn('includedUsage', 'enableDisableFeatures', false); //---------------- Display DisplayGroups according to Permissions --------------- $this->handlePermissions(); }