protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('YouTube Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     // General
     $this->addElement('text', 'username', array('label' => 'YouTube Account:', 'filters' => array('StringTrim')));
     // General
     $this->addElement('text', 'password', array('label' => 'YouTube Password:'******'filters' => array('StringTrim')));
     //		$this->addMetadataProfile();
     $this->addDisplayGroup(array('username', 'password'), 'general', array('legend' => 'General', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addMetadataProfile(true);
     // taken from http://gdata.youtube.com/schemas/2007/categories.cat
     $youTubeCategories = array('Film' => 'Film & Animation', 'Autos' => 'Autos & Vehicles', 'Music' => 'Music', 'Animals' => 'Pets & Animals', 'Sports' => 'Sports', 'Travel' => 'Travel & Events', 'Shortmov' => 'Short Movies', 'Videoblog' => 'Videoblogging', 'Games' => 'Gaming', 'Comedy' => 'Comedy', 'People' => 'People & Blogs', 'News' => 'News & Politics', 'Entertainment' => 'Entertainment', 'Education' => 'Education', 'Howto' => 'Howto & Style', 'Nonprofit' => 'Nonprofits & Activism', 'Tech' => 'Science & Technology', 'Movies_Anime_animation' => 'Movies - Anime/Animation', 'Movies' => 'Movies', 'Movies_Comedy' => 'Movies - Comedy', 'Movies_Documentary' => 'Movies - Documentary', 'Movies_Action_adventure' => 'Movies - Action/Adventure', 'Movies_Classics' => 'Movies - Classics', 'Movies_Foreign' => 'Movies - Foreign', 'Movies_Horror' => 'Movies - Horror', 'Movies_Drama' => 'Movies - Drama', 'Movies_Family' => 'Movies - Family', 'Movies_Shorts' => 'Movies - Shorts', 'Shows' => 'Shows', 'Movies_Sci_fi_fantasy' => 'Movies - Sci-Fi/Fantasy', 'Movies_Thriller' => 'Movies - Thriller', 'Trailers' => 'Trailers');
     //  Metadata
     $this->addElement('select', 'default_category', array('label' => 'Default Category:', 'multioptions' => $youTubeCategories));
     $this->addDisplayGroup(array('default_category', 'metadata_profile_id'), 'metadata', array('legend' => 'Metadata', 'decorators' => array('FormElements', 'Fieldset')));
     // Community
     $this->addElement('select', 'allow_comments', array('label' => 'Allow Comments:', 'multioptions' => array('allowed' => 'allowed', 'denied' => 'denied', 'moderated' => 'moderated')));
     $this->addElement('select', 'allow_embedding', array('label' => 'Allow Embedding:', 'multioptions' => array('allowed' => 'allowed', 'denied' => 'denied')));
     $this->addElement('select', 'allow_ratings', array('label' => 'Allow Ratings:', 'multioptions' => array('allowed' => 'allowed', 'denied' => 'denied')));
     $this->addElement('select', 'allow_responses', array('label' => 'Allow Responses:', 'multioptions' => array('allowed' => 'allowed', 'denied' => 'denied', 'moderated' => 'moderated')));
     $this->addDisplayGroup(array('allow_comments', 'allow_embedding', 'allow_ratings', 'allow_responses'), 'community', array('legend' => 'Community', 'decorators' => array('FormElements', 'Fieldset')));
 }
 protected function addProviderElements()
 {
     $this->setDescription('Unicorn Distribution Profile');
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Unicorn Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'api_host_url', array('label' => 'API host URL:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'username', array('label' => 'Username:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'password', array('label' => 'Password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'domain_name', array('label' => 'Domain name:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'domain_guid', array('label' => 'Domain GUID:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'channel_guid', array('label' => 'Channel GUID:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'ad_free_application_guid', array('label' => 'Ad free application GUID:', 'filters' => array('StringTrim')));
     $this->addElement('select', 'remote_asset_params_id', array('label' => 'Remote asset params ID:', 'registerInArrayValidator' => false));
     $storageProfiles = array();
     try {
         $client = Infra_ClientHelper::getClient();
         Infra_ClientHelper::impersonate($this->partnerId);
         $storageProfileList = $client->storageProfile->listAction();
         Infra_ClientHelper::unimpersonate();
         foreach ($storageProfileList->objects as $storageProfile) {
             /* @var $storageProfile Kaltura_Client_Type_StorageProfile */
             $storageProfiles[$storageProfile->id] = $storageProfile->name;
         }
     } catch (Kaltura_Client_Exception $e) {
     }
     $this->addElement('select', 'storage_profile_id', array('label' => 'Storage profile ID:', 'multiOptions' => $storageProfiles));
 }
Ejemplo n.º 3
0
 protected function _mensagem()
 {
     $e = new Zend_Form_Element_Hidden('mensagem');
     $e->setLabel(_('Message') . ":")->setRequired(true)->addFilter('StringTrim');
     $e->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', ''), array('Label', '')));
     return $e;
 }
 protected function addProviderElements()
 {
     $this->setDescription('');
     $this->loadDefaultDecorators();
     $this->addDecorator('Description', array('placement' => 'prepend'));
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('MetroPcs Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'ftp_host', array('label' => 'FTP Host:', 'filters' => array('StringTrim'), 'default' => 'ftp-int.vzw.real.com'));
     $this->addElement('text', 'ftp_login', array('label' => 'FTP Login:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_pass', array('label' => 'FTP Password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_path', array('label' => 'FTP Path:', 'filters' => array('StringTrim')));
     /*
     $this->addElement('text', 'provider_name', array(
     	'label'			=> 'Provider:',
     	'filters'		=> array('StringTrim')
     ));
     */
     $this->addElement('text', 'provider_id', array('label' => 'Provider id:', 'filters' => array('StringTrim')));
     $this->addDisplayGroup(array('ftp_host', 'ftp_login', 'ftp_pass', 'ftp_path', 'provider_name', 'provider_id'), 'general', array('legend' => 'General', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addElement('select', 'entitlements', array('label' => 'Entitlement:', 'filters' => array('StringTrim'), 'multiOptions' => array('METROPCS_VIDEO_BASIC' => 'METROPCS_VIDEO_BASIC', 'PREMIUM' => 'PREMIUM', 'SUBSCRIPTION' => 'SUBSCRIPTION')));
     $this->addElement('text', 'copyright', array('label' => 'Copyright:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'rating', array('label' => 'Rating:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'item_type', array('label' => 'Type:', 'filters' => array('StringTrim')));
     $this->addDisplayGroup(array('entitlements', 'copyright', 'rating', 'item_type'), 'default_config_group', array('legend' => 'Default Metadata', 'decorators' => array('FormElements', 'Fieldset')));
 }
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('DoubleClick Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $element = new Zend_Form_Element_Text('cue_points_provider');
     $element->setLabel('Cue Points Provider:');
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('items_per_page');
     $element->setLabel('Items Per Page:');
     $this->addElement($element);
     $this->setDefault('items_per_page', 100);
     $this->addDisplayGroup(array('cue_points_provider', 'items_per_page'), 'general_group', array('legend' => 'General', 'decorators' => array('FormElements', 'Fieldset')));
     $element = new Zend_Form_Element_Text('channel_title');
     $element->setLabel('Channel title:');
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('channel_description');
     $element->setLabel('Channel description:');
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('channel_link');
     $element->setLabel('Channel link:');
     $this->addElement($element);
     $element = new Zend_Form_Element_Checkbox('ignore_scheduling_in_feed');
     $element->setLabel('Ignore Scheduling In Feed, As Default Feed Behavior');
     $this->addElement($element);
     $this->addDisplayGroup(array('channel_title', 'channel_description', 'channel_link', 'ignore_scheduling_in_feed'), 'channel', array('legend' => 'Feed Configuration', 'decorators' => array('FormElements', 'Fieldset')));
     $element = new Zend_Form_Element_Hidden('feed_url');
     $element->clearDecorators();
     $element->addDecorator('Callback', array('callback' => array($this, 'renderFeedUrl')));
     $this->addElement($element);
     $this->addDisplayGroup(array('feed_url'), 'feed_url_group', array('legend' => '', 'decorators' => array('FormElements', 'Fieldset')));
 }
Ejemplo n.º 6
0
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('TV.com Provider Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('feed_title');
     $element->setLabel('Feed title:');
     $element->addValidator(new Zend_Validate_StringLength(0, 128));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('feed_link');
     $element->setLabel('Feed link:');
     $element->addValidator(new Zend_Validate_StringLength(0, 255));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('feed_description');
     $element->setLabel('Feed description:');
     $element->addValidator(new Zend_Validate_StringLength(0, 255));
     $this->addElement($element);
     $this->addElement('Text', 'feed_language', array('label' => 'Feed language:', 'value' => 'en-us'));
     $this->addElement('Text', 'feed_copyright', array('label' => 'Feed copyright:'));
     $this->addElement('Text', 'feed_image_title', array('label' => 'Feed image title:'));
     $this->addElement('Text', 'feed_image_url', array('label' => 'Feed image url:'));
     $this->addElement('Text', 'feed_image_link', array('label' => 'Feed image link:'));
     $this->addElement('Text', 'feed_image_width', array('label' => 'Feed image width:'));
     $this->addElement('Text', 'feed_image_height', array('label' => 'Feed image height:'));
     $element = new Zend_Form_Element_Hidden('feed_url');
     $element->clearDecorators();
     $element->addDecorator('Callback', array('callback' => array($this, 'renderFeedUrl')));
     $this->addElement($element);
     $this->addDisplayGroup(array('feed_title', 'feed_link', 'feed_description', 'feed_language', 'feed_copyright'), 'feed', array('legend' => 'Feed Configuration', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addDisplayGroup(array('feed_image_title', 'feed_image_url', 'feed_image_link', 'feed_image_width', 'feed_image_height'), 'feed_image', array('legend' => 'Feed Image Configuration', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addDisplayGroup(array('feed_url'), 'feed_url_group', array('legend' => '', 'decorators' => array('FormElements', 'Fieldset')));
 }
Ejemplo n.º 7
0
 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);
     }
     //------------------------------------
 }
Ejemplo n.º 8
0
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Hulu Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('select', 'protocol', array('label' => 'Protocol:', 'filters' => array('StringTrim'), 'multiOptions' => array(Kaltura_Client_ContentDistribution_Enum_DistributionProtocol::SFTP => 'SFTP', Kaltura_Client_ContentDistribution_Enum_DistributionProtocol::ASPERA => 'ASPERA'), 'required' => true));
     $this->addElement('text', 'sftp_host', array('label' => 'SFTP Host:', 'filters' => array('StringTrim'), 'default' => 'sftp.hulu.com'));
     $this->addElement('text', 'aspera_host', array('label' => 'Aspera Host:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'port', array('label' => 'Port:', 'filters' => array('StringTrim'), 'value' => '22', 'required' => true));
     $this->addElement('text', 'sftp_login', array('label' => 'SFTP Login:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'sftp_pass', array('label' => 'SFTP Password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'aspera_login', array('label' => 'Aspera Login:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'aspera_pass', array('label' => 'Aspera Password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'passphrase', array('label' => 'Key Passphrase:', 'filters' => array('StringTrim')));
     $this->addElement('file', 'aspera_public_key', array('label' => 'Public Key:'));
     $this->addElement('textarea', 'aspera_public_key_readonly', array('label' => 'Public Key:', 'readonly' => true));
     $this->addElement('file', 'aspera_private_key', array('label' => 'Private Key:'));
     $this->addElement('textarea', 'aspera_private_key_readonly', array('label' => 'Private Key:', 'readonly' => true));
     $this->addDisplayGroup(array('protocol', 'sftp_host', 'port', 'sftp_login', 'sftp_pass', 'aspera_host', 'aspera_login', 'aspera_pass', 'passphrase', 'aspera_public_key', 'aspera_public_key_readonly', 'aspera_private_key', 'aspera_private_key_readonly'), 'general', array('legend' => 'General', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addElement('text', 'series_channel', array('label' => 'Series Channel:', 'filters' => array('StringTrim')));
     $this->addElement('select', 'series_primary_category', array('label' => 'Series Primary Category:', 'filters' => array('StringTrim'), 'multiOptions' => array_merge(array('' => ''), $this->getPrimaryCategoryList())));
     $this->addElement('multiCheckbox', 'series_additional_categories', array('label' => 'Series Additional Categories:', 'filters' => array('StringTrim'), 'multiOptions' => $this->getPrimaryCategoryList()));
     $this->addElement('text', 'season_number', array('label' => 'Season Number:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'season_synopsis', array('label' => 'Season Synopsis:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'season_tune_in_information', array('label' => 'Season Tune In Information:', 'filters' => array('StringTrim')));
     $this->addElement('select', 'video_media_type', array('label' => 'Video Media Type:', 'filters' => array('StringTrim'), 'multiOptions' => array_merge(array('' => ''), $this->getVideoMediaTypeList())));
     $this->addDisplayGroup(array('series_channel', 'series_primary_category', 'series_additional_categories', 'season_number', 'season_synopsis', 'season_tune_in_information', 'video_media_type'), 'default_config_group', array('legend' => 'Default Metadata', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addElement('checkbox', 'disable_episode_number_custom_validation', array('label' => 'Disable Episode Number Custom Validation:'));
     $this->addDisplayGroup(array('disable_episode_number_custom_validation'), 'custom_config_group', array('legend' => '', 'decorators' => array('FormElements', 'Fieldset')));
 }
Ejemplo n.º 9
0
 protected function addProviderElements()
 {
     $this->setDescription(null);
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Tvinci Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('hidden', self::FORM_PLACEHOLDER_ELEMENT_ID);
 }
Ejemplo n.º 10
0
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Example Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'username', array('label' => 'Username:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'password', array('label' => 'Password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'account_id', array('label' => 'Account:', 'filters' => array('StringTrim')));
 }
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Syndication Provider Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'feed_id', array('label' => 'Feed ID', 'readonly' => true, 'decorators' => array('ViewHelper', array('Label', array('placement' => 'prepend')), array('HtmlTag', array('tag' => 'dt')))));
     $this->addElement('hidden', 'xsl', array('class' => 'xsl-data file-data'));
     $this->addElement('file', 'xsl-file', array('label' => 'MRSS Transformer (XSL)', 'decorators' => array('File', array('Label', array('placement' => 'prepend', 'class' => 'xsl-file-label')), array('HtmlTag', array('tag' => 'dt')))));
 }
Ejemplo n.º 12
0
    public function init()
    {
        $this->setMethod('post');
        $this->setAttrib('enctype', 'multipart/form-data');

        $photo = new Zend_Form_Element_File('photo');
        $photo->setLabel('photo.upload');
        $photo->setDestination($this->getAttrib('tmp'));

        $photo->addValidator('Count', false, 1);
        $photo->addValidator('Size', false, $this->getAttrib('filesize'));
        $photo->addValidator(
            'Extension', false, $this->getAttrib('extensions')
        );

        $photo->setRequired(true);
        $photo->removeDecorator('Errors');

        $this->addElement($photo, 'photo');

        $fbId = new Zend_Form_Element_Hidden('fbid');
        $fbId->addValidator(
            'Db_NoRecordExists', false,
            array(
                'table' => 'zdjecia',
                'field' => 'fbuserid'
            )
        );
        $fbId->setLabel('fbid');

        $fbId->setRequired(true);
        $fbId->removeDecorator('Errors');
        $fbId->removeDecorator('Label');

        $this->addElement($fbId);

        $save = new Zend_Form_Element_Submit('Save');
        $save->setLabel('Zgłoś Zdjęcie');
        $save->setAttrib('class', 'ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only');

        $this->addElement($save);

        $this->addDecorator(
                new Zend_Form_Decorator_FormErrors(
                    array(
                        'ignoreSubForms'=>true,
                        'markupListStart' => '<ul class="ui-state-error ui-corner-all">',
                    )
                )
            )
            ->addDecorator('FormElements')
            ->addDecorator('HtmlTag')
            ->addDecorator('Form');
    }
 protected function addProviderElements()
 {
     $this->setDescription(null);
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Dailymotion Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'user', array('label' => 'User:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'password', array('label' => 'Password:'******'filters' => array('StringTrim')));
     $this->addElement('select', 'geo_blocking_mapping', array('label' => 'Geo Blocking Mapping:', 'filters' => array('StringTrim'), 'multiOptions' => array(Kaltura_Client_DailymotionDistribution_Enum_DailymotionGeoBlockingMapping::DISABLED => 'Disabled', Kaltura_Client_DailymotionDistribution_Enum_DailymotionGeoBlockingMapping::ACCESS_CONTROL => 'Access Control', Kaltura_Client_DailymotionDistribution_Enum_DailymotionGeoBlockingMapping::METADATA => 'Custom Data')));
 }
Ejemplo n.º 14
0
 protected function addProviderElements()
 {
     $this->setDescription(null);
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Facebook Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'api_authorize_url', array('label' => 'Authorize API Access:', 'decorators' => array(array('ViewScript', array('viewScript' => 'facebook-distribution-api-authorize-field.phtml')))));
     // General
     $this->addElement('text', 'page_id', array('label' => 'Facebook Page ID:', 'filters' => array('StringTrim'), 'required' => true));
     $this->addDisplayGroup(array('page_id'), 'general', array('legend' => 'General', 'decorators' => array('FormElements', 'Fieldset')));
 }
Ejemplo n.º 15
0
 protected function addProviderElements()
 {
     $this->setDescription(null);
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('YouTube Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('select', 'feed_spec_version', array('label' => 'Feed Specification Version:', 'multioptions' => array('1' => 'Version 1 (Legacy Feed)', '2' => 'Version 2 (YouTube Rights Feeds)'), 'description' => 'Save to see specific spec configurations'));
     $this->addElement('text', 'api_authorize_url', array('label' => 'Authorize API Access:', 'decorators' => array(array('ViewScript', array('viewScript' => 'youtube-distribution-api-authorize-field.phtml')))));
     $this->addDisplayGroup(array('feed_spec_version'), 'feed_spec_version_group', array('legend' => '', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addElement('hidden', self::FORM_PLACEHOLDER_ELEMENT_ID);
 }
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Freewheel Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'apikey', array('label' => 'API Key:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'email', array('label' => 'E-Mail:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'sftp_login', array('label' => 'SFTP Login:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'sftp_pass', array('label' => 'SFTP Password:'******'filters' => array('StringTrim')));
     $this->addMetadataProfile();
 }
Ejemplo n.º 17
0
 protected function addProviderElements()
 {
     $this->setDescription('indetic-distribution-note');
     $this->loadDefaultDecorators();
     $this->addDecorator('Description', array('placement' => 'prepend'));
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('IDETIC Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'ftp_path', array('label' => 'FTP Path:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'username', array('label' => 'Username:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'password', array('label' => 'Password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'domain', array('label' => 'Domain:', 'filters' => array('StringTrim')));
 }
Ejemplo n.º 18
0
 public function init()
 {
     $this->setName('category');
     $id = new Zend_Form_Element_Hidden('id');
     $id->addFilter('Int');
     $parentid = new Zend_Form_Element_Select('parentid');
     $parentid->setLabel('CATEGORIES_PARENT')->addMultiOption(0, 'CATEGORIES_MAIN_CATEGORY')->addFilter('Int');
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('CATEGORIES_TITLE')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
     $type = new Zend_Form_Element_Hidden('type');
     $type->setRequired(true)->addValidator('NotEmpty');
     $ordering = new Zend_Form_Element_Hidden('ordering');
     $ordering->setLabel('CATEGORIES_ORDERING')->addFilter('Int');
     $this->addElements(array($id, $parentid, $title, $type, $ordering));
 }
Ejemplo n.º 19
0
 public function addThumbDimensions(KalturaDistributionThumbDimensions $dimensions, $isRequired)
 {
     if (!$this->dimensionsCounter) {
         $element = new Zend_Form_Element_Hidden('setThumbnailDimensions');
         $element->setLabel('Thumbnail Dimensions');
         $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
         $this->addElements(array($element));
     }
     $this->addElement('text', 'dimensionsWidth_' . $this->dimensionsCounter, array('label' => 'Width:', 'value' => $dimensions->width, 'filters' => array('StringTrim')));
     $this->addElement('text', 'dimensionsHeight_' . $this->dimensionsCounter, array('label' => 'Height:', 'value' => $dimensions->height, 'filters' => array('StringTrim')));
     $this->addElement('checkbox', 'dimensionsRequired_' . $this->dimensionsCounter, array('label' => 'Is Required', 'value' => $isRequired, 'decorators' => array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'dt')))));
     $this->addElement('button', 'removeThumbDimensions_' . $this->dimensionsCounter, array('label' => 'Remove', 'onclick' => "removeThumbDimensions({$this->dimensionsCounter})", 'decorators' => array('ViewHelper')));
     $this->addDisplayGroup(array('dimensionsWidth_' . $this->dimensionsCounter, 'dimensionsHeight_' . $this->dimensionsCounter, 'dimensionsRequired_' . $this->dimensionsCounter, 'removeThumbDimensions_' . $this->dimensionsCounter), 'thumbDimensions_' . $this->dimensionsCounter, array('decorators' => array('FormElements', 'Fieldset', array('HtmlTag', array('tag' => 'div', 'class' => 'thumbDimensions_' . $this->dimensionsCounter)))));
     $this->dimensionsCounter++;
 }
Ejemplo n.º 20
0
 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'))));
 }
Ejemplo n.º 21
0
 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));
 }
Ejemplo n.º 22
0
 protected function addProviderElements()
 {
     $this->setDescription('');
     $this->loadDefaultDecorators();
     $this->addDecorator('Description', array('placement' => 'prepend'));
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('YAHOO Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'contact_telephone', array('label' => 'Contact Telephone:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'contact_email', array('label' => 'Contact Email:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_host', array('label' => 'FTP Host:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_username', array('label' => 'FTP user name:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_password', array('label' => 'FTP password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_path', array('label' => 'FTP Path:', 'filters' => array('StringTrim')));
     $this->addElement('select', 'process_feed', array('label' => 'Process Feed:', 'filters' => array('StringTrim'), 'multiOptions' => array(0 => 'Manual', 1 => 'Automatic')));
 }
Ejemplo n.º 23
0
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('AVN Provider Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('feed_title');
     $element->setLabel('Feed title:');
     $element->addValidator(new Zend_Validate_StringLength(0, 128));
     $this->addElement($element);
     $element = new Zend_Form_Element_Hidden('feed_url');
     $element->clearDecorators();
     $element->addDecorator('Callback', array('callback' => array($this, 'renderFeedUrl')));
     $this->addElement($element);
     $this->addDisplayGroup(array('feed_title', 'feed_link', 'feed_description'), 'feed', array('legend' => 'Feed Configuration', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addDisplayGroup(array('feed_url'), 'feed_url_group', array('legend' => '', 'decorators' => array('FormElements', 'Fieldset')));
 }
 public function __construct($options = null)
 {
     $this->_disabledDefaultActions = true;
     parent::__construct($options);
     // email
     $regexValidate = new Cible_Validate_Email();
     $regexValidate->setMessage($this->getView()->getCibleText('validation_message_emailAddressInvalid'), 'regexNotMatch');
     $email = new Zend_Form_Element_Text('email');
     $this->setAttrib('class', 'zendFormNewsletter');
     $email->setLabel($this->getView()->getCibleText('form_label_email'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addFilter('StringToLower')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->addValidator($regexValidate)->setAttrib('class', 'stdTextInput');
     $this->addElement($email);
     //unsubscription reason
     $reason = new Zend_Form_Element_Select('reason');
     $this->setAttrib('class', 'zendFormNewsletter');
     $reason->setLabel($this->getView()->getCibleText('form_label_unsubscribe_reason'))->setDecorators(array('ViewHelper', array('label', array('placement' => 'prepend')), array('Errors', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'reasonSelect', 'id' => ''))))->setAttrib('class', 'stdSelect');
     $selectoptions = array();
     $oRef = new ReferencesObject();
     $options = $oRef->getRefByType('unsubscrArg');
     foreach ($options as $option) {
         $value = $option['R_TypeRef'] . '-' . $option['R_ID'];
         $selectoptions[$option['R_ID']] = $option['RI_Value'];
     }
     $reason->addMultiOptions($selectoptions);
     $reason->addMultiOption(0, 'Autre');
     $this->addElement($reason);
     //unsubscription reason
     $reasonOther = new Zend_Form_Element_Textarea('reasonOther');
     $this->setAttrib('class', 'zendFormNewsletter');
     $reasonOther->addFilter('StripTags')->addFilter('StringTrim')->addFilter('StringToLower')->setDecorators(array('ViewHelper', array('label', array('placement' => 'prepend')), array('Errors', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'reasonOther hidden', 'id' => ''))))->setAttrib('class', 'reasonTextarea');
     $this->addElement($reasonOther);
     $unsubscribeButton = new Zend_Form_Element_Submit('unsubscribe');
     $unsubscribeButton->setLabel($this->getView()->getCibleText('newsletter_title_desabonnement_text'))->setAttrib('id', 'unsubmitSave')->setAttrib('class', 'unsubscribeButton1')->removeDecorator('Label')->removeDecorator('DtDdWrapper');
     $this->addElement($unsubscribeButton);
     $this->addDisplayGroup(array('unsubscribe'), 'actions');
     $actions = $this->getDisplayGroup('actions');
     $this->setDisplayGroupDecorators(array('formElements', 'fieldset', array(array('outerHtmlTag' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'dd-unsubscribe-button'))));
     $requiredFields = new Zend_Form_Element_Hidden('RequiredFields');
     $requiredFields->setLabel('<span class="field_required">*</span>' . $this->getView()->getCibleText('form_field_required_label') . '<br /><br />');
     $requiredFields->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_required_fields'))));
     $this->addElement($requiredFields);
     $this->setDecorators(array('FormElements', 'Form'));
 }
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('VerizonVcast Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'ftp_host', array('label' => 'FTP Host:', 'filters' => array('StringTrim'), 'default' => 'ftp-int.vzw.real.com'));
     $this->addElement('text', 'ftp_login', array('label' => 'FTP Login:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_pass', array('label' => 'FTP Password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'provider_name', array('label' => 'Provider:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'provider_id', array('label' => 'Provider id:', 'filters' => array('StringTrim')));
     $this->addDisplayGroup(array('ftp_host', 'ftp_login', 'ftp_pass', 'provider_name', 'provider_id'), 'general', array('legend' => 'General', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addElement('select', 'entitlement', array('label' => 'Entitlement:', 'filters' => array('StringTrim'), 'multiOptions' => array('BASIC' => 'BASIC', 'PREMIUM' => 'PREMIUM', 'SUBSCRIPTION' => 'SUBSCRIPTION')));
     $this->addElement('text', 'priority', array('label' => 'Priority:', 'filters' => array('StringTrim')));
     $this->addElement('select', 'allow_streaming', array('label' => 'Allow streaming:', 'filters' => array('StringTrim'), 'multiOptions' => array('Y' => 'Yes', 'N' => 'No')));
     $this->addElement('text', 'streaming_price_code', array('label' => 'Streaming price code:', 'filters' => array('StringTrim')));
     $this->addElement('select', 'allow_download', array('label' => 'Allow download:', 'filters' => array('StringTrim'), 'multiOptions' => array('Y' => 'Yes', 'N' => 'No')));
     $this->addElement('text', 'download_price_code', array('label' => 'Download price code:', 'filters' => array('StringTrim')));
     $this->addDisplayGroup(array('entitlement', 'priority', 'allow_streaming', 'streaming_price_code', 'allow_download', 'download_price_code'), 'default_config_group', array('legend' => 'Default Metadata', 'decorators' => array('FormElements', 'Fieldset')));
 }
Ejemplo n.º 26
0
 public function init()
 {
     $this->setMethod('post')->setAction('/test/catalogo/')->setAttrib('id', 'frmVentaCataloto');
     $e = new Zend_Form_Element_Hidden('id_producto');
     $e->setLabel('Producto');
     $e->setRequired();
     $this->addElement($e);
     // Cantidad
     $e = new Zend_Form_Element_Text('cantidad');
     $e->setLabel('Cantidad');
     $e->setRequired();
     $e->addValidator(new Zend_Validate_Int(new Zend_Locale('US')));
     $e->addValidator(new Zend_Validate_GreaterThan(0));
     $e->addValidator(new Zend_Validate_LessThan(100));
     $this->addElement($e);
     //Submit
     $e = new Zend_Form_Element_Submit('submit');
     $e->setlabel('Registrar');
     $this->addElement($e);
 }
 protected function addProviderElements()
 {
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('Freewheel Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'apikey', array('label' => 'API Key:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'email', array('label' => 'E-Mail:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'sftp_login', array('label' => 'SFTP Login:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'sftp_pass', array('label' => 'SFTP Password:'******'filters' => array('StringTrim')));
     $this->addElement('select', 'replace_group', array('label' => 'Replace Group:', 'filters' => array('StringTrim'), 'multiOptions' => array('true' => 'true', 'false' => 'false')));
     $this->addElement('select', 'replace_air_dates', array('label' => 'Replace Air Dates:', 'filters' => array('StringTrim'), 'multiOptions' => array('true' => 'true', 'false' => 'false')));
     $this->addDisplayGroup(array('apikey', 'email', 'sftp_login', 'sftp_pass', 'replace_group', 'replace_air_dates'), 'general', array('legend' => 'General', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addElement('select', 'content_owner', array('label' => 'fwContentOwner:', 'filters' => array('StringTrim'), 'multiOptions' => array('OutFwContentOwner' => 'OutFwContentOwner', 'InFwContentOwner' => 'InFwContentOwner', 'UnassignContentOwner' => 'UnassignContentOwner', 'SelfContentOwner' => 'SelfContentOwner'), 'value' => 'SelfContentOwner'));
     $this->addElement('text', 'upstream_video_id', array('label' => 'Upstream Video ID:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'upstream_network_name', array('label' => 'Upstream Network Name:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'upstream_network_id', array('label' => 'Upstream Network ID:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'category_id', array('label' => 'Category ID:', 'filters' => array('StringTrim')));
     $this->addDisplayGroup(array('content_owner', 'upstream_video_id', 'upstream_network_name', 'upstream_network_id', 'category_id'), 'content_owner_group', array('legend' => 'Content Owner', 'decorators' => array('FormElements', 'Fieldset')));
 }
Ejemplo n.º 28
0
 public function startFrom()
 {
     $setting = $this->setting;
     if (Application_Model_Preference::GetPlanLevel() == 'disabled') {
         $output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device');
         $output_sound_device->setLabel(_('Hardware Audio Output'))->setRequired(false)->setValue($setting['output_sound_device'] == "true" ? 1 : 0)->setDecorators(array('ViewHelper'));
         if (Application_Model_Preference::GetEnableStreamConf() == "false") {
             $output_sound_device->setAttrib("readonly", true);
         }
         $this->addElement($output_sound_device);
         $output_types = array("ALSA" => "ALSA", "AO" => "AO", "OSS" => "OSS", "Portaudio" => "Portaudio", "Pulseaudio" => "Pulseaudio");
         $output_type = new Zend_Form_Element_Select('output_sound_device_type');
         $output_type->setLabel(_("Output Type"))->setMultiOptions($output_types)->setValue($setting['output_sound_device_type'])->setDecorators(array('ViewHelper'));
         if ($setting['output_sound_device'] != "true") {
             $output_type->setAttrib("disabled", "disabled");
         }
         $this->addElement($output_type);
     }
     $icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata');
     $icecast_vorbis_metadata->setLabel(_('Icecast Vorbis Metadata'))->setRequired(false)->setValue($setting['icecast_vorbis_metadata'] == "true" ? 1 : 0)->setDecorators(array('ViewHelper'));
     if (Application_Model_Preference::GetEnableStreamConf() == "false") {
         $icecast_vorbis_metadata->setAttrib("readonly", true);
     }
     $this->addElement($icecast_vorbis_metadata);
     $stream_format = new Zend_Form_Element_Radio('streamFormat');
     $stream_format->setLabel(_('Stream Label:'));
     $stream_format->setMultiOptions(array(_("Artist - Title"), _("Show - Artist - Title"), _("Station name - Show name")));
     $stream_format->setValue(Application_Model_Preference::GetStreamLabelFormat());
     $stream_format->setDecorators(array('ViewHelper'));
     $this->addElement($stream_format);
     $offAirMeta = new Zend_Form_Element_Text('offAirMeta');
     $offAirMeta->setLabel(_('Off Air Metadata'))->setValue(Application_Model_StreamSetting::getOffAirMeta())->setDecorators(array('ViewHelper'));
     $this->addElement($offAirMeta);
     $enable_replay_gain = new Zend_Form_Element_Checkbox("enableReplayGain");
     $enable_replay_gain->setLabel(_("Enable Replay Gain"))->setValue(Application_Model_Preference::GetEnableReplayGain())->setDecorators(array('ViewHelper'));
     $this->addElement($enable_replay_gain);
     $replay_gain = new Zend_Form_Element_Hidden("replayGainModifier");
     $replay_gain->setLabel(_("Replay Gain Modifier"))->setValue(Application_Model_Preference::getReplayGainModifier())->setAttribs(array('style' => "border: 0; color: #f6931f; font-weight: bold;"))->setDecorators(array('ViewHelper'));
     $this->addElement($replay_gain);
 }
 protected function addProviderElements()
 {
     $this->setDescription(null);
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('YouTube Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     // General
     $this->addElement('text', 'username', array('label' => 'YouTube Account:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'notification_email', array('label' => 'Notification Email:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'owner_name', array('label' => 'Owner Name:'));
     $this->addElement('select', 'target', array('label' => 'Target:', 'multioptions' => array('upload,claim,fingerprint' => 'upload,claim,fingerprint', 'upload,claim' => 'upload,claim', 'claim,fingerprint' => 'claim,fingerprint')));
     $this->addDisplayGroup(array('username', 'notification_email', 'owner_name', 'target'), 'general', array('legend' => 'General', 'decorators' => array('FormElements', 'Fieldset')));
     // SFTP Configuration
     $this->addElement('text', 'sftp_host', array('label' => 'SFTP Host:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'sftp_port', array('label' => 'SFTP Port:', 'value' => '22', 'filters' => array('StringTrim')));
     $this->addElement('text', 'sftp_login', array('label' => 'SFTP Login:'******'filters' => array('StringTrim')));
     $this->addElement('file', 'sftp_public_key', array('label' => 'SFTP Public Key:'));
     $this->addElement('file', 'sftp_private_key', array('label' => 'SFTP Private Key:'));
     $this->addElement('text', 'sftp_base_dir', array('label' => 'SFTP Base Directory:', 'filters' => array('StringTrim')));
     $this->addDisplayGroup(array('sftp_host', 'sftp_port', 'sftp_login', 'sftp_public_key', 'sftp_private_key', 'sftp_base_dir'), 'sftp', array('legend' => 'SFTP Configuration', 'decorators' => array('FormElements', 'Fieldset')));
     //  Metadata
     $this->addElement('text', 'default_category', array('label' => 'Default Category:'));
     $this->addDisplayGroup(array('default_category'), 'metadata', array('legend' => 'Metadata', 'decorators' => array('FormElements', 'Fieldset')));
     // Advertising
     $this->addElement('checkbox', 'enable_ad_server', array('label' => 'Enable AD server:'));
     $this->addElement('text', 'ad_server_partner_id', array('label' => 'Ad Server Partner ID:'));
     $this->addElement('checkbox', 'allow_pre_roll_ads', array('label' => 'Allow Pre-Roll Ads:'));
     $this->addElement('checkbox', 'allow_post_roll_ads', array('label' => 'Allow Post-Roll Ads:'));
     $this->addDisplayGroup(array('enable_ad_server', 'ad_server_partner_id', 'allow_pre_roll_ads', 'allow_post_roll_ads'), 'advertising', array('legend' => 'Advertising', 'decorators' => array('FormElements', 'Fieldset')));
     // Community
     $this->addElement('select', 'allow_comments', array('label' => 'Allow Comments:', 'multioptions' => array('' => 'Default', 'Always' => 'Always', 'Approve' => 'Approve', 'Never' => 'Never')));
     $this->addElement('select', 'allow_embedding', array('label' => 'Allow Embedding:', 'multioptions' => array('' => 'Default', 'true' => 'True', 'false' => 'False')));
     $this->addElement('select', 'allow_ratings', array('label' => 'Allow Ratings:', 'multioptions' => array('' => 'Default', 'true' => 'True', 'false' => 'False')));
     $this->addElement('select', 'allow_responses', array('label' => 'Allow Responses:', 'multioptions' => array('' => 'Default', 'Always' => 'Always', 'Approve' => 'Approve', 'Never' => 'Never')));
     $this->addDisplayGroup(array('allow_comments', 'allow_embedding', 'allow_ratings', 'allow_responses'), 'community', array('legend' => 'Community', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addElement('text', 'commercial_policy', array('label' => 'Commercial Policy:'));
     $this->addElement('text', 'ugc_policy', array('label' => 'UGC Policy:'));
     $this->addDisplayGroup(array('commercial_policy', 'ugc_policy'), 'policies', array('legend' => 'Saved Policies', 'decorators' => array('FormElements', 'Fieldset')));
 }
 protected function addProviderElements()
 {
     $this->setDescription('');
     $this->loadDefaultDecorators();
     $this->addDecorator('Description', array('placement' => 'prepend'));
     $element = new Zend_Form_Element_Hidden('providerElements');
     $element->setLabel('At&t Uverse Specific Configuration');
     $element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag', array('tag' => 'b'))));
     $this->addElements(array($element));
     $this->addElement('text', 'channel_title', array('label' => 'Channel Title:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_host', array('label' => 'FTP Host:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_username', array('label' => 'FTP user name:', 'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_password', array('label' => 'FTP password:'******'filters' => array('StringTrim')));
     $this->addElement('text', 'ftp_path', array('label' => 'FTP Path:', 'filters' => array('StringTrim')));
     // Feed URL
     $element = new Zend_Form_Element_Hidden('feed_url');
     $element->clearDecorators();
     $element->addDecorator('Callback', array('callback' => array($this, 'renderFeedUrl')));
     $this->addElement($element);
     $this->addDisplayGroup(array('feed_url'), 'feed_url_group', array('legend' => '', 'decorators' => array('FormElements', 'Fieldset')));
     $this->addMetadataForm();
 }