当前位置: 首页>>代码示例>>PHP>>正文


PHP Textarea::setValue方法代码示例

本文整理汇总了PHP中Textarea::setValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Textarea::setValue方法的具体用法?PHP Textarea::setValue怎么用?PHP Textarea::setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Textarea的用法示例。


在下文中一共展示了Textarea::setValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($albumId)
 {
     parent::__construct(self::FORM_NAME);
     $album = PHOTO_BOL_PhotoAlbumService::getInstance()->findAlbumById($albumId);
     $this->setAction(OW::getRouter()->urlForRoute('photo.ajax_update_photo'));
     $this->setAjax(true);
     $this->setAjaxResetOnSuccess(false);
     $albumIdField = new HiddenField(self::ELEMENT_ALBUM_ID);
     $albumIdField->setValue($album->id);
     $albumIdField->setRequired();
     $albumIdField->addValidator(new PHOTO_CLASS_AlbumOwnerValidator());
     $this->addElement($albumIdField);
     $albumNameField = new TextField(self::ELEMENT_ALBUM_NAME);
     $albumNameField->setValue($album->name);
     $albumNameField->setRequired();
     if ($album->name != trim(OW::getLanguage()->text('photo', 'newsfeed_album'))) {
         $albumNameField->addValidator(new PHOTO_CLASS_AlbumNameValidator(true, null, $album->name));
     }
     $albumNameField->addAttribute('class', 'ow_photo_album_name_input');
     $this->addElement($albumNameField);
     $desc = new Textarea(self::ELEMENT_DESC);
     $desc->setValue(!empty($album->description) ? $album->description : NULL);
     $desc->setHasInvitation(TRUE);
     $desc->setInvitation(OW::getLanguage()->text('photo', 'describe_photo'));
     $desc->addAttribute('class', 'ow_photo_album_description_textarea');
     $this->addElement($desc);
     $this->triggerReady(array('albumId' => $albumId));
 }
开发者ID:tammyrocks,项目名称:photo,代码行数:28,代码来源:album_edit_form.php

示例2: testVerificaSeGetFieldPassaAlert

 public function testVerificaSeGetFieldPassaAlert()
 {
     $textarea = new Textarea();
     $textarea->setName("descricao");
     $textarea->setValue("descricao");
     $this->assertEquals('<textarea id="" name="descricao" class="" rows="" >descricao</textarea><p class="text-danger"></p>', $textarea->getField('alert'));
 }
开发者ID:joohnsro,项目名称:TestesAutomatizadosProjFinal,代码行数:7,代码来源:TextareaTest.php

示例3: __construct

 public function __construct($albumId)
 {
     parent::__construct('albumEditForm');
     $album = PHOTO_BOL_PhotoAlbumService::getInstance()->findAlbumById($albumId);
     $this->setAction(OW::getRouter()->urlForRoute('photo.ajax_update_photo'));
     $this->setAjax(TRUE);
     $this->setAjaxResetOnSuccess(FALSE);
     $albumIdField = new HiddenField('album-id');
     $albumIdField->setValue($album->id);
     $albumIdField->setRequired();
     $albumIdField->addValidator(new PHOTO_CLASS_AlbumOwnerValidator());
     $this->addElement($albumIdField);
     $albumNameField = new TextField('albumName');
     $albumNameField->setValue($album->name);
     $albumNameField->setRequired();
     if ($album->name != trim(OW::getLanguage()->text('photo', 'newsfeed_album'))) {
         $albumNameField->addValidator(new PHOTO_CLASS_AlbumNameValidator(TRUE, NULL, $album->name));
     }
     $albumNameField->addAttribute('class', 'ow_photo_album_name_input');
     $this->addElement($albumNameField);
     $desc = new Textarea('desc');
     $desc->setValue(!empty($album->description) ? $album->description : NULL);
     $desc->setHasInvitation(TRUE);
     $desc->setInvitation(OW::getLanguage()->text('photo', 'describe_photo'));
     $desc->addAttribute('class', 'ow_photo_album_description_textarea');
     $this->addElement($desc);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:27,代码来源:album_edit_form.php

示例4: index

 public function index(array $params = array())
 {
     $config = OW::getConfig();
     $configs = $config->getValues('antibruteforce');
     $form = new Form('settings');
     $form->setAjax();
     $form->setAjaxResetOnSuccess(false);
     $form->setAction(OW::getRouter()->urlForRoute('antibruteforce.admin'));
     $form->bindJsFunction(Form::BIND_SUCCESS, 'function(data){if(data.result){OW.info("Settings successfuly saved");}else{OW.error("Parser error");}}');
     $auth = new CheckboxField('auth');
     $auth->setValue($configs['authentication']);
     $form->addElement($auth);
     $reg = new CheckboxField('reg');
     $reg->setValue($configs['registration']);
     $form->addElement($reg);
     $tryCount = new TextField('tryCount');
     $tryCount->setRequired();
     $tryCount->addValidator(new IntValidator(1));
     $tryCount->setValue($configs['try_count']);
     $form->addElement($tryCount);
     $expTime = new TextField('expTime');
     $expTime->setRequired();
     $expTime->setValue($configs['expire_time']);
     $expTime->addValidator(new IntValidator(1));
     $form->addElement($expTime);
     $title = new TextField('title');
     $title->setRequired();
     $title->setValue($configs['lock_title']);
     $form->addElement($title);
     $desc = new Textarea('desc');
     $desc->setValue($configs['lock_desc']);
     $form->addElement($desc);
     $submit = new Submit('save');
     $form->addElement($submit);
     $this->addForm($form);
     if (OW::getRequest()->isAjax()) {
         if ($form->isValid($_POST)) {
             $config->saveConfig('antibruteforce', 'authentication', $form->getElement('auth')->getValue());
             $config->saveConfig('antibruteforce', 'registration', $form->getElement('reg')->getValue());
             $config->saveConfig('antibruteforce', 'try_count', $form->getElement('tryCount')->getValue());
             $config->saveConfig('antibruteforce', 'expire_time', $form->getElement('expTime')->getValue());
             $config->saveConfig('antibruteforce', 'lock_title', strip_tags($form->getElement('title')->getValue()));
             $config->saveConfig('antibruteforce', 'lock_desc', strip_tags($form->getElement('desc')->getValue()));
             exit(json_encode(array('result' => true)));
         }
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:47,代码来源:admin.php

示例5: __construct

 public function __construct(BOL_MenuItem $menuItem, $custom = false)
 {
     parent::__construct("settingForm");
     $this->menuItem = $menuItem;
     $language = OW::getLanguage();
     $this->setAjax();
     $this->setAction(OW::getRouter()->urlFor("ADMIN_CTRL_MobileNavigation", "saveItemSettings"));
     $item = new HiddenField("key");
     $item->setValue($menuItem->prefix . ':' . $menuItem->key);
     $this->addElement($item);
     $settings = BOL_MobileNavigationService::getInstance()->getItemSettings($this->menuItem);
     // Mail Settings
     $item = new TextField(BOL_MobileNavigationService::SETTING_LABEL);
     $item->setLabel($language->text("mobile", "admin_nav_item_label_field"));
     $item->setValue($settings[BOL_MobileNavigationService::SETTING_LABEL]);
     $this->addElement($item);
     if ($custom) {
         $item = new TextField(BOL_MobileNavigationService::SETTING_TITLE);
         $item->setLabel($language->text("mobile", "admin_nav_item_title_field"));
         $item->setValue($settings[BOL_MobileNavigationService::SETTING_TITLE]);
         $this->addElement($item);
         $item = new Textarea(BOL_MobileNavigationService::SETTING_CONTENT);
         $item->setLabel($language->text("mobile", "admin_nav_item_content_field"));
         $item->setValue($settings[BOL_MobileNavigationService::SETTING_CONTENT]);
         $this->addElement($item);
         $item = new CheckboxGroup(BOL_MobileNavigationService::SETTING_VISIBLE_FOR);
         $visibleFor = empty($settings[BOL_MobileNavigationService::SETTING_VISIBLE_FOR]) ? 0 : $settings[BOL_MobileNavigationService::SETTING_VISIBLE_FOR];
         $options = array('1' => OW::getLanguage()->text('admin', 'pages_edit_visible_for_guests'), '2' => OW::getLanguage()->text('admin', 'pages_edit_visible_for_members'));
         $values = array();
         foreach ($options as $value => $option) {
             if (!($value & $visibleFor)) {
                 continue;
             }
             $values[] = $value;
         }
         $this->addElement($item->setOptions($options)->setValue($values)->setLabel(OW::getLanguage()->text('admin', 'pages_edit_local_visible_for')));
     }
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('admin', 'save_btn_label'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:42,代码来源:mobile_navigation_item_settings_form.php

示例6: __construct

 public function __construct($value, $languageData)
 {
     parent::__construct('lang-values-edit');
     $this->setAjax(true);
     //$this->setAction('javascript://');
     $hidden = new HiddenField('value');
     $hidden->setValue($value);
     $this->addElement($hidden);
     $languageService = BOL_LanguageService::getInstance();
     $list = $languageService->findActiveList();
     foreach ($list as $item) {
         $textArea = new Textarea("lang[{$item->getId()}][value][{$value}]");
         if (isset($languageData[$item->getId()])) {
             $textArea->setValue($languageData[$item->getId()]);
         }
         $this->addElement($textArea);
     }
     $submit = new Submit('submit');
     $submit->setValue(OW::getLanguage()->text('admin', 'save_btn_label'));
     $this->addElement($submit);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:21,代码来源:edit_question_value_label.php

示例7: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $language = OW::getLanguage();
     $form = new Form('inite-friends');
     $emailList = new TagsInputField('emailList');
     $emailList->setRequired();
     $emailList->setDelimiterChars(array(',', ' '));
     $emailList->setInvitation($language->text('contactimporter', 'email_field_inv_message'));
     $emailList->setJsRegexp('/^(([^<>()[\\]\\.,;:\\s@\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\"]+)*)|(\\".+\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/');
     $form->addElement($emailList);
     $text = new Textarea('text');
     $text->setValue($language->text('contactimporter', 'email_invite_field_default_text'));
     $text->setHasInvitation(true);
     $form->addElement($text);
     $submit = new Submit('submit');
     $form->addElement($submit);
     $form->setAction(OW::getRouter()->urlFor('CONTACTIMPORTER_CTRL_Email', 'send'));
     $form->setAjax();
     $form->setAjaxResetOnSuccess(false);
     $form->bindJsFunction(Form::BIND_SUCCESS, "\n            function(data){                \n                if( data.success ){\n                    OW.info(data.message);\n                    owForms['inite-friends'].resetForm();\n                    window.ciMailFloatBox.close();\n                }\n                else{\n                    OW.error(data.message);\n                }\n              }");
     $this->addForm($form);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:23,代码来源:email_invite.php

示例8: __construct

 /**
  * Class constructor
  *
  */
 public function __construct($clipId)
 {
     parent::__construct('vwvcEditForm');
     $language = OW::getLanguage();
     // clip id field
     $clipIdField = new HiddenField('id');
     $clipIdField->setRequired(true);
     $this->addElement($clipIdField);
     // select box for permission
     $permArr0 = array('1' => 'moderators', '3' => 'none', '2' => 'owner', '0' => 'all');
     $permArr1 = array('0' => 'all', '3' => 'none', '2' => 'owner', '1' => 'moderators');
     // room_name Field
     $room_nameField = new TextField('room_name');
     $sValidator = new StringValidator(1, 22);
     $room_nameField->addValidator($sValidator);
     $room_nameField->setRequired(true);
     $this->addElement($room_nameField->setLabel($language->text('vwvc', 'room_name')));
     // Description Field
     $descriptionField = new Textarea('description');
     $this->addElement($descriptionField->setLabel($language->text('vwvc', 'description')));
     // welcome Field
     $welcomeField = new Textarea('welcome');
     $welcomeField->setValue($language->text('vwvc', 'welcome_default'));
     $this->addElement($welcomeField->setLabel($language->text('vwvc', 'welcome')));
     // resolution Field
     $resolutionArr = array('320x240' => '320x240', '160x120' => '160x120', '176x144' => '176x144', '352x288' => '352x288', '640x480' => '640x480');
     $resolutionField = new Selectbox('resolution');
     $resolutionField->addOptions($resolutionArr);
     $resolutionField->setRequired();
     $resolutionField->setHasInvitation(false);
     $this->addElement($resolutionField->setLabel($language->text('vwvc', 'resolution')));
     // camera_fps Field
     $camera_fpsArr = array('10' => '10', '12' => '12', '20' => '20', '25' => '25', '30' => '30');
     $camera_fpsField = new Selectbox('camera_fps');
     $camera_fpsField->addOptions($camera_fpsArr);
     $camera_fpsField->setRequired();
     $camera_fpsField->setHasInvitation(false);
     $this->addElement($camera_fpsField->setLabel($language->text('vwvc', 'camera_fps')));
     // Microphone Rate Field
     $microphone_rateArr = array('11' => '11', '22' => '22', '44' => '44', '48' => '48');
     $microphone_rateField = new Selectbox('microphone_rate');
     $microphone_rateField->addOptions($microphone_rateArr);
     $microphone_rateField->setRequired();
     $microphone_rateField->setHasInvitation(false);
     $this->addElement($microphone_rateField->setLabel($language->text('vwvc', 'microphone_rate')));
     // soundQuality Field
     $soundQualityField = new TextField('soundQuality');
     $soundQualityField->setRequired(true);
     $this->addElement($soundQualityField->setLabel($language->text('vwvc', 'soundQuality')));
     // Bandwidth Field
     $bandwidthField = new TextField('bandwidth');
     $bandwidthField->setRequired(true);
     $bandwidthField->setValue(40960);
     $this->addElement($bandwidthField->setLabel($language->text('vwvc', 'bandwidth')));
     // verbose_level Field
     $verbose_levelArr = array('2' => 'warning/recoverable failure', '0' => 'nothing', '1' => 'failure', '3' => 'success', '4' => 'action');
     $verbose_levelField = new Selectbox('verbose_level');
     $verbose_levelField->addOptions($verbose_levelArr);
     $verbose_levelField->setRequired();
     $verbose_levelField->setHasInvitation(false);
     $this->addElement($verbose_levelField->setLabel($language->text('vwvc', 'verbose_level')));
     // Background url Field
     $background_urlField = new TextField('background_url');
     $this->addElement($background_urlField->setLabel($language->text('vwvc', 'background_url')));
     // Layout Code Field
     $layout_codeField = new Textarea('layout_code');
     $this->addElement($layout_codeField->setLabel($language->text('vwvc', 'layout_code')));
     // Fill window Field
     $fill_windowField = new Selectbox('fill_window');
     $fill_windowField->addOptions($permArr0);
     $fill_windowField->setRequired();
     $fill_windowField->setHasInvitation(false);
     $this->addElement($fill_windowField->setLabel($language->text('vwvc', 'fill_window')));
     // FloodProtection Field
     $flood_protectionField = new TextField('flood_protection');
     $flood_protectionField->setValue(3);
     $this->addElement($flood_protectionField->setLabel($language->text('vwvc', 'flood_protection')));
     // Filter regex Field
     $filter_regexField = new TextField('filter_regex');
     $filter_regexField->setValue('(?i)(fuck|cunt)(?-i)');
     $this->addElement($filter_regexField->setLabel($language->text('vwvc', 'filter_regex')));
     // Filter replace Field
     $filter_replaceField = new TextField('filter_replace');
     $filter_replaceField->setValue('**');
     $this->addElement($filter_replaceField->setLabel($language->text('vwvc', 'filter_replace')));
     // Show Camera Settings Field
     $show_camera_settingsField = new Selectbox('show_camera_settings');
     $show_camera_settingsField->addOptions($permArr1);
     $show_camera_settingsField->setRequired();
     $show_camera_settingsField->setHasInvitation(false);
     $this->addElement($show_camera_settingsField->setLabel($language->text('vwvc', 'show_camera_settings')));
     // Advanced Camera Settings Field
     $advanced_camera_settingsField = new Selectbox('advanced_camera_settings');
     $advanced_camera_settingsField->addOptions($permArr1);
     $advanced_camera_settingsField->setRequired();
     $advanced_camera_settingsField->setHasInvitation(false);
//.........这里部分代码省略.........
开发者ID:vazahat,项目名称:dudex,代码行数:101,代码来源:vwvc.php

示例9: __construct

 public function __construct()
 {
     parent::__construct('add-css');
     $text = new Textarea('css');
     $dto = BOL_ThemeService::getInstance()->findThemeByKey(OW::getConfig()->getValue('base', 'selectedTheme'));
     $text->setValue($dto->getCustomCss());
     $this->addElement($text);
     $submit = new Submit('submit');
     $submit->setValue(OW::getLanguage()->text('admin', 'theme_css_edit_submit_label'));
     $this->addElement($submit);
     $this->setAjax(true);
     $this->setAjaxResetOnSuccess(false);
     $this->bindJsFunction(Form::BIND_SUCCESS, 'function(data){OW.info(data.message)}');
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:14,代码来源:theme.php

示例10: __construct

 public function __construct($entityType, $entityId, $albumId = NULL, $albumName = NULL, $albumDescription = NULL, $url = NULL)
 {
     parent::__construct('ajax-upload');
     $this->setAjax(TRUE);
     $this->setAjaxResetOnSuccess(FALSE);
     $this->setAction(OW::getRouter()->urlForRoute('photo.ajax_upload_submit'));
     $this->bindJsFunction('success', UTIL_JsGenerator::composeJsString('function( data )
         {
             if ( data )
             {
                 if ( !data.result )
                 {
                     if ( data.msg )
                     {
                         OW.error(data.msg);
                     }
                     else
                     {
                         OW.getLanguageText("photo", "photo_upload_error");
                     }
                 }
                 else
                 {
                     var url = {$url};
                     
                     if ( url )
                     {
                         window.location.href = url;
                     }
                     else if ( data.url )
                     {
                         window.location.href = data.url;
                     }
                 }
             }
             else
             {
                 OW.error("Server error");
             }
         }', array('url' => $url)));
     $language = OW::getLanguage();
     $albumField = new TextField('album');
     $albumField->setRequired();
     $albumField->addAttribute('class', 'ow_dropdown_btn ow_inputready ow_cursor_pointer');
     $albumField->addAttribute('autocomplete', 'off');
     $albumField->addAttribute('readonly');
     $albumNameField = new TextField('album-name');
     $albumNameField->setRequired();
     $albumNameField->addValidator(new PHOTO_CLASS_AlbumNameValidator(FALSE));
     $albumNameField->addAttribute('class', 'ow_smallmargin invitation');
     $this->addElement($albumNameField);
     $desc = new Textarea('description');
     $desc->addAttribute('class', 'invitation');
     if (!empty($albumDescription)) {
         $desc->setValue($albumDescription);
     } else {
         $desc->setValue($language->text('photo', 'album_desc'));
     }
     $this->addElement($desc);
     $userId = OW::getUser()->getId();
     if (!empty($albumId) && ($album = PHOTO_BOL_PhotoAlbumService::getInstance()->findAlbumById($albumId, $userId)) !== NULL && $album->userId == $userId && $album->name != trim(OW::getLanguage()->text('photo', 'newsfeed_album'))) {
         $albumField->setValue($album->name);
         $albumNameField->setValue($album->name);
     } elseif (!empty($albumName)) {
         $albumField->setValue($albumName);
         $albumNameField->setValue($albumName);
     } else {
         $event = new BASE_CLASS_EventCollector(PHOTO_CLASS_EventHandler::EVENT_SUGGEST_DEFAULT_ALBUM, array('userId' => $userId, 'entityType' => $entityType, 'entityId' => $entityId));
         OW::getEventManager()->trigger($event);
         $data = $event->getData();
         if (!empty($data)) {
             $albumField->setValue($data[0]);
             $albumNameField->setValue($data[0]);
         } else {
             $albumField->setValue($language->text('photo', 'choose_existing_or_create'));
             $albumNameField->setValue($language->text('photo', 'album_name'));
         }
     }
     $this->addElement($albumField);
     $submit = new Submit('submit');
     $submit->addAttribute('class', 'ow_ic_submit ow_positive');
     $this->addElement($submit);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:83,代码来源:ajax_upload_form.php

示例11: __construct


//.........这里部分代码省略.........
     $codecProfileField = new Selectbox('codecProfile');
     $codecProfileField->addOptions($codecProfileArr);
     $codecProfileField->setRequired();
     $codecProfileField->setHasInvitation(false);
     $this->addElement($codecProfileField->setLabel($language->text('vwvc', 'codecProfile')));
     // soundCodec Field
     $soundCodecArr = array('Speex' => 'Speex', 'Nellymoser' => 'Nellymoser');
     $soundCodecField = new Selectbox('soundCodec');
     $soundCodecField->addOptions($soundCodecArr);
     $soundCodecField->setRequired();
     $soundCodecField->setHasInvitation(false);
     $this->addElement($soundCodecField->setLabel($language->text('vwvc', 'soundCodec')));
     // p2pGroup Field
     $p2pGroupField = new TextField('p2pGroup');
     $p2pGroupField->setRequired(true);
     $this->addElement($p2pGroupField->setLabel($language->text('vwvc', 'p2pGroup')));
     // camMaxBandwidth Field
     $camMaxBandwidthField = new TextField('camMaxBandwidth');
     $camMaxBandwidthField->setRequired(true);
     $this->addElement($camMaxBandwidthField->setLabel($language->text('vwvc', 'camMaxBandwidth')));
     // bufferLive Field
     $bufferLiveField = new TextField('bufferLive');
     $bufferLiveField->setRequired(true);
     $this->addElement($bufferLiveField->setLabel($language->text('vwvc', 'bufferLive')));
     // bufferFull Field
     $bufferFullField = new TextField('bufferFull');
     $bufferFullField->setRequired(true);
     $this->addElement($bufferFullField->setLabel($language->text('vwvc', 'bufferFull')));
     // bufferLivePlayback Field
     $bufferLivePlaybackField = new TextField('bufferLivePlayback');
     $bufferLivePlaybackField->setRequired(true);
     $this->addElement($bufferLivePlaybackField->setLabel($language->text('vwvc', 'bufferLivePlayback')));
     // bufferFullPlayback Field
     $bufferFullPlaybackField = new TextField('bufferFullPlayback');
     $bufferFullPlaybackField->setRequired(true);
     $this->addElement($bufferFullPlaybackField->setLabel($language->text('vwvc', 'bufferFullPlayback')));
     // disableBandwidthDetection Field
     $disableBandwidthDetectionField = new Selectbox('disableBandwidthDetection');
     $disableBandwidthDetectionField->addOptions($par);
     $disableBandwidthDetectionField->setRequired();
     $disableBandwidthDetectionField->setHasInvitation(false);
     $this->addElement($disableBandwidthDetectionField->setLabel($language->text('vwvc', 'disableBandwidthDetection')));
     // disableUploadDetection Field
     $disableUploadDetectionField = new Selectbox('disableUploadDetection');
     $disableUploadDetectionField->addOptions($par);
     $disableUploadDetectionField->setRequired();
     $disableUploadDetectionField->setHasInvitation(false);
     $this->addElement($disableUploadDetectionField->setLabel($language->text('vwvc', 'disableUploadDetection')));
     // limitByBandwidth Field
     $limitByBandwidthField = new Selectbox('limitByBandwidth');
     $limitByBandwidthField->addOptions($par);
     $limitByBandwidthField->setRequired();
     $limitByBandwidthField->setHasInvitation(false);
     $this->addElement($limitByBandwidthField->setLabel($language->text('vwvc', 'limitByBandwidth')));
     // ws_ads Field
     $ws_adsField = new TextField('ws_ads');
     $ws_adsField->setRequired(true);
     $this->addElement($ws_adsField->setLabel($language->text('vwvc', 'ws_ads')));
     // adsTimeout Field
     $adsTimeoutField = new TextField('adsTimeout');
     $adsTimeoutField->setRequired(true);
     $this->addElement($adsTimeoutField->setLabel($language->text('vwvc', 'adsTimeout')));
     // adsInterval Field
     $adsIntervalField = new TextField('adsInterval');
     $adsIntervalField->setRequired(true);
     $this->addElement($adsIntervalField->setLabel($language->text('vwvc', 'adsInterval')));
     // statusInterval Field
     $statusIntervalField = new TextField('statusInterval');
     $statusIntervalField->setRequired(true);
     $this->addElement($statusIntervalField->setLabel($language->text('vwvc', 'statusInterval')));
     // availability Field
     $availabilityField = new TextField('availability');
     $availabilityField->setRequired(true);
     $this->addElement($availabilityField->setLabel($language->text('vwvc', 'availability')));
     // status Field
     $statusBox = array('approved' => 'approved', 'pending' => 'pending');
     $statusField = new Selectbox('status');
     $statusField->addOptions($statusBox);
     $statusField->setRequired();
     $statusField->setHasInvitation(false);
     $this->addElement($statusField->setLabel($language->text('vwvc', 'status')));
     // who can create room Field
     $memberBox = array('all' => 'all', 'member' => 'member list');
     $memberField = new Selectbox('member');
     $memberField->addOptions($memberBox);
     $memberField->setRequired();
     $memberField->setHasInvitation(false);
     $this->addElement($memberField->setLabel($language->text('vwvc', 'member')));
     // member_list Field
     $member_listField = new Textarea('member_list');
     $userService = BOL_UserService::getInstance();
     $user = $userService->findUserById(OW::getUser()->getId());
     $username = $user->getUsername();
     $member_listField->setValue($username);
     $this->addElement($member_listField->setLabel($language->text('vwvc', 'member_list')));
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('vwvc', 'btn_edit'));
     $this->addElement($submit);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:101,代码来源:admin.php

示例12: substr

            $insert .= $col[$i] . ', ';
            $vals[] = $item->{$col}[$i];
        }
        $insert = substr($insert, 0, -2) . ") VALUES ('";
        // var_dump($vals);
        for ($i = 0; $i < sizeof($vals); ++$i) {
            // var_dump($col);
            // echo "$col[$i] - waarde = ".$item->$col[$i].'<br />';
            $insert .= $vals[$i] . "','";
            // $vals[] = $item->$col[$i];
        }
        $insert = substr($insert, 0, -2) . ");\r\n";
        // echo '<hr />';
        // $body->line($insert.'<br />');
        $resultset .= $insert;
        $insert = '';
        unset($vals);
        // echo '<hr />';
    }
    $restext = new Textarea();
    $restext->setName('queries');
    $restext->setRows(20);
    $restext->setCols(85);
    $restext->setValue($resultset);
    // $restext->setSelected('true');
    $restext->build();
}
$body->line('</div>');
include_once './inc/footer.php';
unset($body);
unset($html);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:table_dump.php

示例13: __construct

 public function __construct(BOL_MenuItem $menuItem, $custom = false, $addUrlValidator = true)
 {
     parent::__construct("settingForm");
     $this->menuItem = $menuItem;
     $language = OW::getLanguage();
     $this->setAjax();
     $this->setAction(OW::getRouter()->urlFor("ADMIN_CTRL_MobileNavigation", "saveItemSettings"));
     $item = new HiddenField("key");
     $item->setValue($menuItem->prefix . ':' . $menuItem->key);
     $this->addElement($item);
     $settings = BOL_MobileNavigationService::getInstance()->getItemSettings($this->menuItem);
     // Mail Settings
     $item = new TextField(BOL_MobileNavigationService::SETTING_LABEL);
     $item->setLabel($language->text("mobile", "admin_nav_item_label_field"));
     $item->setValue($settings[BOL_MobileNavigationService::SETTING_LABEL]);
     $item->setRequired();
     $this->addElement($item);
     if ($custom) {
         $typeField = new RadioField(BOL_MobileNavigationService::SETTING_TYPE);
         $typeField->setLabel($language->text("mobile", "admin_nav_item_type_field"));
         $typeField->setValue($settings[BOL_MobileNavigationService::SETTING_TYPE]);
         $typeField->addOption("local", $language->text("mobile", "admin_nav_item_type_local"));
         $typeField->addOption("external", $language->text("mobile", "admin_nav_item_type_external"));
         $this->addElement($typeField);
         $item = new TextField(BOL_MobileNavigationService::SETTING_TITLE);
         $item->setLabel($language->text("mobile", "admin_nav_item_title_field"));
         $item->setValue($settings[BOL_MobileNavigationService::SETTING_TITLE]);
         $item->setRequired();
         $this->addElement($item);
         $item = new Textarea(BOL_MobileNavigationService::SETTING_CONTENT);
         $item->setLabel($language->text("mobile", "admin_nav_item_content_field"));
         $item->setValue($settings[BOL_MobileNavigationService::SETTING_CONTENT]);
         $this->addElement($item);
         $item = new TextField(BOL_MobileNavigationService::SETTING_URL);
         if ($addUrlValidator) {
             $item->addValidator(new UrlValidator());
             $item->setRequired();
         }
         $item->setLabel($language->text("mobile", "admin_nav_item_url_field"));
         $item->setValue($settings[BOL_MobileNavigationService::SETTING_URL]);
         $this->addElement($item);
         $item = new CheckboxGroup(BOL_MobileNavigationService::SETTING_VISIBLE_FOR);
         $visibleFor = empty($settings[BOL_MobileNavigationService::SETTING_VISIBLE_FOR]) ? 0 : $settings[BOL_MobileNavigationService::SETTING_VISIBLE_FOR];
         $options = array('1' => OW::getLanguage()->text('admin', 'pages_edit_visible_for_guests'), '2' => OW::getLanguage()->text('admin', 'pages_edit_visible_for_members'));
         $values = array();
         foreach ($options as $value => $option) {
             if (!($value & $visibleFor)) {
                 continue;
             }
             $values[] = $value;
         }
         $this->addElement($item->setOptions($options)->setValue($values)->setLabel(OW::getLanguage()->text('admin', 'pages_edit_local_visible_for')));
         $js = UTIL_JsGenerator::newInstance();
         $js->addScript('var url = owForms[{$name}].elements["url"]; var validators = url.validators; url.validators = []; $("input[name=type]", "#" + {$id}).change(function() { ' . 'if ($(this).val() == "local") { ' . '$("#mp-content").show(); $("#mp-url").hide(); url.validators = []; ' . '} else { ' . '$("#mp-content").hide(); $("#mp-url").show(); url.validators = validators; } ' . '});', array("id" => $this->getId(), "name" => $this->getName()));
         OW::getDocument()->addOnloadScript($js);
     }
     // submit
     $submit = new Submit('save');
     $submit->setValue($language->text('admin', 'save_btn_label'));
     $this->addElement($submit);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:61,代码来源:mobile_navigation_item_settings_form.php

示例14: robots

 public function robots()
 {
     if (OW::getRequest()->isPost()) {
         $contents = trim($_POST['robots']);
         OW::getConfig()->saveConfig('oaseo', OASEO_BOL_Service::CNF_ROBOTS_CONTENTS, $contents);
         OW::getFeedback()->info(OW::getLanguage()->text('oaseo', 'admin_saved_msg'));
         $this->redirect();
     }
     $form = new Form('robots');
     $textarea = new Textarea('robots');
     $textarea->setValue(OW::getConfig()->getValue('oaseo', OASEO_BOL_Service::CNF_ROBOTS_CONTENTS));
     $form->addElement($textarea);
     $submit = new Submit('submit');
     $form->addElement($submit);
     $this->addForm($form);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:16,代码来源:admin.php

示例15: setValue

 public function setValue($value)
 {
     if ($this->textarea !== null) {
         return $this->textarea->setValue($value);
     }
     $this->value = $value;
 }
开发者ID:vBulleteen,项目名称:oxwall,代码行数:7,代码来源:form_element.php


注:本文中的Textarea::setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。