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')));
 }
예제 #2
0
 public function init()
 {
     //        if (!$this->hasTranslator()) {
     //            $this->setTranslator(Zend_Registry::get('Zend_Translate'));
     //        }
     $requestid = new Zend_Form_Element_Hidden('RequestID');
     $requestid->setDecorators(array(array('ViewHelper', array('helper' => 'formHidden'))));
     $maTS = new Zend_Form_Element_Text('MaTS');
     $maTS->setOptions(array('label' => 'Mã TS', 'required' => TRUE, 'filters' => array('StringTrim')))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     //
     //        $UserID = new Zend_Form_Element_Text('UserID');
     //        $UserID->setOptions(array(
     //                    'label' => 'UserID',
     //                    'required' => TRUE,
     //                    'filters' => array('StringTrim')
     //                ))
     //                ->setDecorators(array(
     //                    array('ViewHelper', array('helper' => 'formText')),
     //                    array('Label', array('class' => 'label'))
     //                ));
     $utype = new Zend_Form_Element_Select('Type');
     $utype->setOptions(array('label' => 'Loại yêu cầu', 'required' => TRUE, 'MultiOptions' => array(0 => 'Yêu cầu mượn TS', 1 => 'Yêu cầu nâng cấp')))->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect')), array('Label', array('class' => 'label'))));
     $detail = new Zend_Form_Element_Textarea('Detail');
     $detail->setOptions(array('label' => 'Chi tiết yêu cầu', 'style' => "width: 200px; height: 100px"))->setDecorators(array(array('ViewHelper', array('helper' => 'formTextarea')), array('Label', array('class' => 'label'))));
     $this->setName('item-form')->setMethod(Zend_Form::METHOD_POST)->setEnctype(Zend_Form::ENCTYPE_URLENCODED)->addElements(array($requestid, $maTS, $utype, $detail))->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'fieldset', 'style' => "padding: 0; border: 0; margin-top: 25px;")), 'Form'));
 }
예제 #3
0
 protected function _id_encontro()
 {
     $e = new Zend_Form_Element_Hidden('id_encontro');
     $e->addFilter('Int');
     $e->setDecorators(array('ViewHelper', 'Description', 'Errors', array('HtmlTag', ''), array('Label', '')));
     return $e;
 }
예제 #4
0
 public function init()
 {
     //        if (!$this->hasTranslator()) {
     //            $this->setTranslator(Zend_Registry::get('Zend_Translate'));
     //        }
     $itemid = new Zend_Form_Element_Hidden('ItemID');
     $itemid->setDecorators(array(array('ViewHelper', array('helper' => 'formHidden'))));
     $maTS = new Zend_Form_Element_Text('MaTS');
     $maTS->setOptions(array('label' => 'Mã TS', 'required' => TRUE, 'filters' => array('StringTrim')))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $tenTS = new Zend_Form_Element_Text('TenTS');
     $tenTS->setOptions(array('label' => 'Tên tài sản', 'required' => TRUE, 'filters' => array('StringTrim')))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $descr = new Zend_Form_Element_Textarea('Description');
     $descr->setOptions(array('label' => 'Mô tả', 'style' => "width: 200px; height: 50px"))->setDecorators(array(array('ViewHelper', array('helper' => 'formTextarea')), array('Label', array('class' => 'label'))));
     $type = new Zend_Form_Element_Select('Type');
     $type->setOptions(array('label' => 'Loại bảo mật', 'required' => TRUE, 'MultiOptions' => array(1 => 'Bảo mật thấp', 0 => 'Bảo mật cao')))->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect')), array('Label', array('class' => 'label'))));
     $startDate = new Zend_Form_Element_Text('StartDate');
     $startDate->setOptions(array('label' => 'Bắt đầu SD', 'required' => TRUE))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $price = new Zend_Form_Element_Text('Price');
     $price->setOptions(array('label' => 'Giá', 'required' => TRUE, 'filters' => array('Int')))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $warrantyTime = new Zend_Form_Element_Text('WarrantyTime');
     $warrantyTime->setOptions(array('label' => 'Bảo hành', 'required' => TRUE, 'filters' => array('Int')))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $status = new Zend_Form_Element_Select('Status');
     $status->setOptions(array('label' => 'Tình trạng', 'required' => TRUE, 'MultiOptions' => array(0 => 'Có thể mượn', 1 => 'Đang cho mượn', 2 => 'Hỏng')))->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect')), array('Label', array('class' => 'label'))));
     $place = new Zend_Form_Element_Textarea('Place');
     $place->setOptions(array('label' => 'Địa điểm hiện tại', 'style' => "width: 200px; height: 50px"))->setDecorators(array(array('ViewHelper', array('helper' => 'formTextarea')), array('Label', array('class' => 'label'))));
     $this->setName('item-form')->setMethod(Zend_Form::METHOD_POST)->setEnctype(Zend_Form::ENCTYPE_URLENCODED)->addElements(array($itemid, $maTS, $tenTS, $descr, $type, $startDate, $price, $warrantyTime, $status, $place))->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'fieldset', 'style' => "padding: 0; border: 0; margin-top: 25px;")), 'Form'));
 }
 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')));
 }
예제 #6
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')));
 }
 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));
 }
예제 #8
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);
     }
     //------------------------------------
 }
예제 #9
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;
 }
예제 #10
0
 protected function setupHash()
 {
     $this->hidden = new Zend_Form_Element_Hidden(self::HIDDEN_HASH);
     $this->hidden->setValue($this->formName);
     $this->addElements(array($this->hidden));
     $this->hidden->setDecorators($this->getHiddenDecorators());
 }
 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')));
 }
예제 #12
0
 /** Initialize this form. */
 public function init()
 {
     $this->setName('sizequota_folder');
     $this->setAction($this->getView()->baseUrl('/sizequota/folder/submit'));
     $this->setMethod('POST');
     $csrf = new Midas_Form_Element_Hash('csrf');
     $csrf->setSalt('FDXuUnSDkUE7Anh2kqgca8zv');
     $csrf->setDecorators(array('ViewHelper'));
     $folderId = new Zend_Form_Element_Hidden('folder_id');
     $folderId->setDecorators(array('ViewHelper'));
     $useDefaultFolderQuota = new Zend_Form_Element_Checkbox('use_default_folder_quota');
     $useDefaultFolderQuota->setLabel('Use Default Folder Quota');
     $folderQuotaValue = new Zend_Form_Element_Text('folder_quota_value');
     $folderQuotaValue->setLabel('Quota');
     $folderQuotaValue->addValidator('Float', true);
     $folderQuotaValue->addValidator('Between', true, array('min' => 0, 'max' => PHP_INT_MAX));
     $folderQuotaUnit = new Zend_Form_Element_Select('folder_quota_unit');
     $folderQuotaUnit->setLabel('Unit');
     $folderQuotaUnit->setRequired(true);
     $folderQuotaUnit->addValidator('NotEmpty', true);
     $folderQuotaUnit->addMultiOptions(array(MIDAS_SIZE_B => 'B', MIDAS_SIZE_KB => 'KB', MIDAS_SIZE_MB => 'MB', MIDAS_SIZE_GB => 'GB', MIDAS_SIZE_TB => 'TB'));
     $this->addDisplayGroup(array($useDefaultFolderQuota, $folderQuotaValue, $folderQuotaUnit), 'global');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Save');
     $this->addElements(array($csrf, $folderId, $useDefaultFolderQuota, $folderQuotaValue, $folderQuotaUnit, $submit));
 }
예제 #13
0
 public function init()
 {
     //        if (!$this->hasTranslator()) {
     //            $this->setTranslator(Zend_Registry::get('Zend_Translate'));
     //        }
     $userid = new Zend_Form_Element_Hidden('UserID');
     $userid->setDecorators(array(array('ViewHelper', array('helper' => 'formHidden'))));
     $username = new Zend_Form_Element_Text('Username');
     $username->setOptions(array('label' => 'Username', 'required' => TRUE))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $birthday = new Zend_Form_Element_Text('Birthday');
     $birthday->setOptions(array('label' => 'Birthday', 'required' => TRUE))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $role = new Zend_Form_Element_Select('Role');
     $role->setOptions(array('label' => 'User Type', 'MultiOptions' => array(3 => 'User', 2 => 'IT', 1 => 'Admin', 0 => 'SuperAdmin')))->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect')), array('Label', array('class' => 'label'))));
     $fullname = new Zend_Form_Element_Text('FullName');
     $fullname->setOptions(array('label' => 'FullName'))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $email = new Zend_Form_Element_Text('Email');
     $email->setOptions(array('label' => 'Email', 'required' => TRUE))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $group = new Zend_Form_Element_Text('Group');
     $group->setOptions(array('label' => 'Group'))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $phone = new Zend_Form_Element_Text('Phone');
     $phone->setOptions(array('label' => 'Phone'))->setDecorators(array(array('ViewHelper', array('helper' => 'formText')), array('Label', array('class' => 'label'))));
     $address = new Zend_Form_Element_Textarea('Address');
     $address->setOptions(array('label' => 'Address', 'style' => "width: 200px; height: 150px"))->setDecorators(array(array('ViewHelper', array('helper' => 'formTextarea')), array('Label', array('class' => 'label'))));
     $this->setName('user-form')->setMethod(Zend_Form::METHOD_POST)->setEnctype(Zend_Form::ENCTYPE_URLENCODED)->addElements(array($userid, $username, $role, $fullname, $email, $birthday, $group, $phone, $address))->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'fieldset', 'style' => "padding: 0; border: 0; margin-top: 25px;")), 'Form'));
 }
예제 #14
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')));
 }
예제 #15
0
 /**
  * @author code generate
  * @return mixed
  */
 public function __construct($option = array())
 {
     $classId = new Zend_Form_Element_Hidden('UserId');
     $classId->setDecorators(array('ViewHelper'));
     $this->addElement($classId);
     $email = new Zend_Form_Element_Text('Email');
     $email->setLabel('Email *');
     $email->addFilter('StringTrim');
     $email->setRequired(true);
     $email->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'col-lg-2 control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $email->addValidator(new Zend_Validate_Db_NoRecordExists("Users", "Email"));
     $email->addValidator('EmailAddress', true);
     $email->setRequired(true)->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => "Email không phù hợp")));
     $this->addElement($email);
     $save = new Zend_Form_Element_Submit('Save');
     $save->setLabel('Đăng ký');
     $save->setAttrib('class', 'btn btn-primary');
     $save->setDecorators(array('ViewHelper'));
     $this->addElement($save);
     $reset = new Zend_Form_Element_Reset('Reset');
     $reset->setLabel('Làm lại');
     $reset->setAttrib('class', 'btn btn-primary');
     $reset->setDecorators(array('ViewHelper'));
     $this->addElement($reset);
 }
예제 #16
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);
 }
 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')))));
 }
 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()
 {
     $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')));
 }
 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')));
 }
 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();
 }
 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);
 }
예제 #23
0
 public function init()
 {
     $history_id = new Zend_Form_Element_Hidden($this::ID_PREFIX . 'id');
     $history_id->setValidators(array(new Zend_Validate_Int()));
     $history_id->setDecorators(array('ViewHelper'));
     $this->addElement($history_id);
     $dynamic_attrs = new Zend_Form_SubForm();
     $this->addSubForm($dynamic_attrs, $this::ID_PREFIX . 'template');
     // Add the submit button
     $this->addElement('button', $this::ID_PREFIX . 'save', array('ignore' => true, 'class' => 'btn ' . $this::ID_PREFIX . 'save', 'label' => _('Save'), 'decorators' => array('ViewHelper')));
     // Add the cancel button
     $this->addElement('button', $this::ID_PREFIX . 'cancel', array('ignore' => true, 'class' => 'btn ' . $this::ID_PREFIX . 'cancel', 'label' => _('Cancel'), 'decorators' => array('ViewHelper')));
 }
예제 #24
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')));
 }
예제 #25
0
 /**
  * @author code generate
  * @return mixed
  */
 public function __construct($option = array())
 {
     $contactId = new Zend_Form_Element_Hidden('ContactId');
     $contactId->setDecorators(array('ViewHelper'));
     $this->addElement($contactId);
     $contactName = new Zend_Form_Element_Text('ContactName');
     $contactName->setLabel('Họ tên *');
     $contactName->addFilter('StringTrim');
     $contactName->setRequired(true);
     $contactName->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'col-lg-2 control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $contactName->addValidator('stringLength', false, array(1, 50, "messages" => " dài tối đa 50 ký tự"));
     $this->addElement($contactName);
     $userId = new Zend_Form_Element_Text('UserId');
     $userId->setLabel('UserId');
     $userId->addFilter('StringTrim');
     $userId->setAttrib('disabled', true);
     $userId->setDecorators(array('ViewHelper'));
     $this->addElement($userId);
     $contactPhone = new Zend_Form_Element_Text('ContactPhone');
     $contactPhone->setLabel('Điện thoại *');
     $contactPhone->addFilter('StringTrim');
     $contactPhone->setRequired(true);
     $contactPhone->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'col-lg-2 control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $contactPhone->addValidator('stringLength', false, array(1, 15, "messages" => " dài tối đa 50 ký tự"));
     $this->addElement($contactPhone);
     $contactTitle = new Zend_Form_Element_Text('ContactTitle');
     $contactTitle->setLabel('Tiêu đề *');
     $contactTitle->addFilter('StringTrim');
     $contactTitle->setRequired(true);
     $contactTitle->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'col-lg-2 control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $contactTitle->addValidator('stringLength', false, array(1, 250, "messages" => " dài tối đa 250 ký tự"));
     $this->addElement($contactTitle);
     $contactContent = new Zend_Form_Element_Textarea('ContactContent');
     $contactContent->setLabel('Nội dung *');
     $contactContent->setRequired(true);
     $contactContent->setOptions(array('cols' => '10', 'rows' => '4'));
     $contactContent->setDecorators(array('ViewHelper', array(array('control' => 'HtmlTag'), array('tag' => 'div', 'class' => 'element-control')), array('Label', array('class' => 'col-lg-2 control-label')), array(array('controls' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
     $contactPhone->addValidator('stringLength', false, array(1, 2000, "messages" => " dài tối đa 2000 ký tự"));
     $this->addElement($contactContent);
     $save = new Zend_Form_Element_Submit('Save');
     $save->setLabel('Gửi');
     $save->setAttrib('class', 'btn btn-primary');
     $save->setDecorators(array('ViewHelper'));
     $this->addElement($save);
     $reset = new Zend_Form_Element_Reset('Reset');
     $reset->setLabel('Làm lại');
     $reset->setAttrib('class', 'btn btn-primary');
     $reset->setDecorators(array('ViewHelper'));
     $this->addElement($reset);
 }
예제 #26
0
 public function __construct($options = null)
 {
     $this->_addSubmitSaveClose = false;
     parent::__construct($options);
     $galleryID = $options['galleryID'];
     $imageSrc = "";
     // show online
     $showOnline = new Zend_Form_Element_Checkbox('GI_Online');
     $showOnline->setValue(1);
     $showOnline->setLabel($this->getView()->getCibleText('form_label_showOnline'));
     $showOnline->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox'))));
     $this->addElement($showOnline);
     // image position
     $position = new Zend_Form_Element_Text('GI_Position');
     $position->setLabel($this->getView()->getCibleText('form_label_position'));
     $position->setRequired(true);
     $position->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))));
     $position->addValidator('Int', true, array('messages' => array('notInt' => $this->getView()->getCibleText('validation_message_int_field'))));
     $this->addElement($position);
     // IMAGE
     /*
      $imageSrc = "";
      $imageView = new Zend_Form_Element_Image('imageView',array('src' => $imageSrc));
      $imageView->setOrder(4);
     
      $this->addElement($imageView);
     */
     if ($galleryID != "") {
         $imageTmp = new Zend_Form_Element_Hidden('ImageSrc_tmp');
         $imageTmp->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'openOnly' => true))));
         $this->addElement($imageTmp);
         $imageOrg = new Zend_Form_Element_Hidden('ImageSrc_original');
         $imageOrg->setDecorators(array('ViewHelper'));
         $this->addElement($imageOrg);
         $imageView = new Zend_Form_Element_Image('ImageSrc_preview', array('src' => $imageSrc, 'onclick' => 'return false;'));
         $imageView->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'closeOnly' => true))));
         $this->addElement($imageView);
         $imagePicker = new Cible_Form_Element_ImageGalleryPicker('ImageSrc', array('associatedElement' => 'imageView', 'galleryID' => $galleryID));
         $imagePicker->removeDecorator('label');
         $this->addElement($imagePicker);
     }
     // Title
     $title = new Zend_Form_Element_Text('II_Title');
     $title->setLabel($this->getView()->getCibleText('form_label_title'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput');
     $this->addElement($title);
     // Description
     $title = new Zend_Form_Element_Text('II_Description');
     $title->setLabel($this->getView()->getCibleText('form_label_description'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput');
     $this->addElement($title);
 }
예제 #27
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++;
 }
예제 #28
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'))));
 }
예제 #29
0
 /**
  *
  * Add new post
  *
  */
 public function init()
 {
     $cname = explode('_', get_class());
     $this->preInit(end($cname), true, false);
     // show privacy
     $show_privacy = new Zend_Form_Element_Hidden('show_privacy');
     $show_privacy->setDecorators(array('ViewHelper'))->setValue($this->show_privacy);
     // use template file
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/AddPost.phtml'))));
     // fields
     $text = new Zend_Form_Element_Textarea('content');
     $text->setDecorators(array('ViewHelper', 'Errors'))->setAttrib('COLS', '')->setAttrib('ROWS', '4')->addFilter('StripTags')->setAttrib('class', 'form-control')->setAttrib('placeholder', $this->translator->translate('What is on your mind?'));
     $submit = new Zend_Form_Element_Submit('submitbutton');
     $submit->setDecorators(array('ViewHelper'))->setLabel($this->translator->translate('Post'))->setAttrib('class', 'submit btn btn-default');
     $this->addElements(array($text, $submit));
     $this->postInit();
 }
예제 #30
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')));
 }