本文整理汇总了PHP中Textarea类的典型用法代码示例。如果您正苦于以下问题:PHP Textarea类的具体用法?PHP Textarea怎么用?PHP Textarea使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Textarea类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testCompile
public function testCompile()
{
$field = new Textarea("test", "Test", array("help" => "help text"));
$expected = "<label for=\"test\">Test</label><textarea name=\"test\" ></textarea><div class='help'>help text</div>";
$value = $field->compile();
$this->assertEquals($expected, $value);
}
开发者ID:jenwachter,项目名称:html-form,代码行数:7,代码来源:TextareaTest.php
示例2: __construct
public function __construct()
{
parent::__construct('upload-form');
$language = OW::getLanguage();
$this->setEnctype(Form::ENCTYPE_MULTYPART_FORMDATA);
$fileField = new FileField('photo');
//$fileField->setRequired(true);
$this->addElement($fileField);
// album Field
$albumField = new TextField('album');
$albumField->setRequired(true);
$albumField->setHasInvitation(true);
$albumField->setId('album_input');
$albumField->setInvitation($language->text('photo', 'create_album'));
$this->addElement($albumField);
// description Field
$descField = new Textarea('description');
$descField->setHasInvitation(true);
$descField->setInvitation($language->text('photo', 'describe_photo'));
$this->addElement($descField);
$cancel = new Submit('cancel', false);
$cancel->setValue($language->text('base', 'cancel_button'));
$this->addElement($cancel);
$submit = new Submit('submit', false);
$this->addElement($submit);
}
开发者ID:tammyrocks,项目名称:photo,代码行数:26,代码来源:upload_form.php
示例3: __construct
public function __construct()
{
parent::__construct('add-album');
$this->setAjax();
$this->setAjaxResetOnSuccess(FALSE);
$this->setAction(OW::getRouter()->urlFor('PHOTO_CTRL_Photo', 'ajaxResponder'));
$ajaxFunc = new HiddenField('ajaxFunc');
$ajaxFunc->setValue('ajaxMoveToAlbum');
$ajaxFunc->setRequired();
$this->addElement($ajaxFunc);
$fromAlbum = new HiddenField('from-album');
$fromAlbum->setRequired();
$fromAlbum->addValidator(new PHOTO_CLASS_AlbumOwnerValidator());
$this->addElement($fromAlbum);
$toAlbum = new HiddenField('to-album');
$this->addElement($toAlbum);
$photos = new HiddenField('photos');
$photos->setRequired();
$this->albumPhotosValidator = new AlbumPhotosValidator();
$photos->addValidator($this->albumPhotosValidator);
$this->addElement($photos);
$albumName = new TextField('album-name');
$albumName->setRequired();
$albumName->addValidator(new PHOTO_CLASS_AlbumNameValidator(FALSE));
$albumName->setHasInvitation(TRUE);
$albumName->setInvitation(OW::getLanguage()->text('photo', 'album_name'));
$albumName->addAttribute('class', 'ow_smallmargin');
$this->addElement($albumName);
$desc = new Textarea('desc');
$desc->setHasInvitation(TRUE);
$desc->setInvitation(OW::getLanguage()->text('photo', 'album_desc'));
$this->addElement($desc);
$this->addElement(new Submit('add'));
}
开发者ID:tammyrocks,项目名称:photo,代码行数:34,代码来源:album_add_form.php
示例4: __construct
public function __construct($feedAutoId, $feedType, $feedId, $actionVisibility = null)
{
parent::__construct('newsfeed_update_status');
$this->setEnctype(FORM::ENCTYPE_MULTYPART_FORMDATA);
$field = new Textarea('status');
$field->setHasInvitation(true);
$field->setInvitation(OW::getLanguage()->text('newsfeed', 'status_field_invintation'));
$this->addElement($field);
$field = new HiddenField('attachment');
$this->addElement($field);
$field = new HiddenField('feedType');
$field->setValue($feedType);
$this->addElement($field);
$field = new HiddenField('feedId');
$field->setValue($feedId);
$this->addElement($field);
$field = new HiddenField('feedAutoId');
$field->setValue($feedAutoId);
$this->addElement($field);
$field = new HiddenField('visibility');
$field->setValue($actionVisibility);
$this->addElement($field);
$submit = new Submit('save');
$submit->setValue(OW::getLanguage()->text('newsfeed', 'status_btn_label'));
$this->addElement($submit);
if (!OW::getRequest()->isAjax()) {
$js = UTIL_JsGenerator::composeJsString('
owForms["newsfeed_update_status"].bind( "submit", function( r )
{
$("#newsfeed_status_save_btn_c").addClass("owm_preloader_circle");
});');
OW::getDocument()->addOnloadScript($js);
}
$this->setAction(OW::getRequest()->buildUrlQueryString(OW::getRouter()->urlFor('NEWSFEED_MCTRL_Feed', 'statusUpdate')));
}
开发者ID:vazahat,项目名称:dudex,代码行数:35,代码来源:update_status.php
示例5: __construct
public function __construct($opponentId)
{
parent::__construct('composeMessageForm');
$this->setEnctype(Form::ENCTYPE_MULTYPART_FORMDATA);
$field = new HiddenField('uid');
$field->setValue(UTIL_HtmlTag::generateAutoId('mailbox_new_message_' . $opponentId));
$this->addElement($field);
$field = new HiddenField('opponentId');
$field->setValue($opponentId);
$this->addElement($field);
$field = new TextField('subject');
$field->setInvitation(OW::getLanguage()->text('mailbox', 'subject'));
$field->setHasInvitation(true);
$field->setRequired();
$this->addElement($field);
$field = new Textarea('message');
$field->setInvitation(OW::getLanguage()->text('mailbox', 'text_message_invitation'));
$field->setHasInvitation(true);
$field->setRequired();
$this->addElement($field);
$field = new HiddenField('attachment');
$this->addElement($field);
$submit = new Submit('sendBtn');
$submit->setId('sendBtn');
$submit->setValue(OW::getLanguage()->text('mailbox', 'add_button'));
$this->addElement($submit);
if (!OW::getRequest()->isAjax()) {
$js = UTIL_JsGenerator::composeJsString('
owForms["composeMessageForm"].bind( "submit", function( r )
{
$("#newmessage-mail-send-btn").addClass("owm_preloader_circle");
});');
OW::getDocument()->addOnloadScript($js);
}
}
开发者ID:hardikamutech,项目名称:loov,代码行数:35,代码来源:compose_message_form.php
示例6: __construct
public function __construct($name)
{
parent::__construct($name);
$this->setAction(OW::getRouter()->urlForRoute('ocsaffiliates.action_signup'));
$this->setAjax();
$lang = OW::getLanguage();
$affName = new TextField('name');
$affName->setRequired(true);
$affName->setLabel($lang->text('ocsaffiliates', 'affiliate_name'));
$this->addElement($affName);
$email = new TextField('email');
$email->setRequired(true);
$email->setLabel($lang->text('ocsaffiliates', 'email'));
$email->addValidator(new EmailValidator());
$this->addElement($email);
$password = new PasswordField('password');
$password->setRequired(true);
$password->setLabel($lang->text('ocsaffiliates', 'password'));
$this->addElement($password);
$payment = new Textarea('payment');
$payment->setRequired(true);
$payment->setLabel($lang->text('ocsaffiliates', 'payment_details'));
$this->addElement($payment);
if (OW::getConfig()->getValue('ocsaffiliates', 'terms_agreement')) {
$terms = new CheckboxField('terms');
$validator = new RequiredValidator();
$validator->setErrorMessage($lang->text('ocsaffiliates', 'terms_required_msg'));
$terms->addValidator($validator);
$this->addElement($terms);
}
$submit = new Submit('signup');
$submit->setValue($lang->text('ocsaffiliates', 'signup_btn'));
$this->addElement($submit);
$this->bindJsFunction(Form::BIND_SUCCESS, "function(data){\n if ( !data.result ) {\n OW.error(data.error);\n }\n else {\n document.location.reload();\n }\n }");
}
开发者ID:vazahat,项目名称:dudex,代码行数:35,代码来源:signup_form.php
示例7: __construct
public function __construct(BASE_CommentsParams $params, $id, $formName)
{
parent::__construct();
$language = OW::getLanguage();
$form = new Form($formName);
$textArea = new Textarea('commentText');
$textArea->setHasInvitation(true);
$textArea->setInvitation($language->text('base', 'comment_form_element_invitation_text'));
$form->addElement($textArea);
$hiddenEls = array('entityType' => $params->getEntityType(), 'entityId' => $params->getEntityId(), 'displayType' => $params->getDisplayType(), 'pluginKey' => $params->getPluginKey(), 'ownerId' => $params->getOwnerId(), 'cid' => $id, 'commentCountOnPage' => $params->getCommentCountOnPage(), 'isMobile' => 1);
foreach ($hiddenEls as $name => $value) {
$el = new HiddenField($name);
$el->setValue($value);
$form->addElement($el);
}
$submit = new Submit('comment-submit');
$submit->setValue($language->text('base', 'comment_add_submit_label'));
$form->addElement($submit);
$form->setAjax(true);
$form->setAction(OW::getRouter()->urlFor('BASE_CTRL_Comments', 'addComment'));
// $form->bindJsFunction(Form::BIND_SUBMIT, "function(){ $('#comments-" . $id . " .comments-preloader').show();}");
// $form->bindJsFunction(Form::BIND_SUCCESS, "function(){ $('#comments-" . $id . " .comments-preloader').hide();}");
$this->addForm($form);
OW::getDocument()->addOnloadScript("window.owCommentCmps['{$id}'].initForm('" . $textArea->getId() . "', '" . $submit->getId() . "');");
$this->assign('form', true);
$this->assign('id', $id);
}
开发者ID:vazahat,项目名称:dudex,代码行数:27,代码来源:comments_form.php
示例8: __construct
public function __construct($widgetUniqName = null, $content = null)
{
parent::__construct('about_me_form');
$this->widgetUniqName = $widgetUniqName;
$this->setAjax(true);
$this->setAction(OW::getRouter()->urlFor('BASE_CTRL_ComponentPanel', 'ajaxSaveAboutMe'));
$input = new Textarea('about_me');
$input->addAttribute('style', 'width: 93%');
$input->setId('about_me_widget_input');
$input->setHasInvitation(true);
$input->setInvitation(OW::getLanguage()->text('base', 'about_me_widget_inv_text'));
//$input->setRequired(true);
$input->setValue($content);
$this->addElement($input);
$hidden = new HiddenField('widget_uniq_name');
$hidden->setValue($widgetUniqName);
$this->addElement($hidden);
$submit = new Submit('save');
//$submit->setLabel(OW::getLanguage()->text('base', 'widget_about_me_save_btn'));
$this->addElement($submit);
OW::getDocument()->addOnloadScript('
window.owForms["about_me_form"].bind("success", function(data){
OW.info(data.message);
});
window.owForms["about_me_form"].reset = false;
');
}
开发者ID:hardikamutech,项目名称:loov,代码行数:27,代码来源:about_me_widget.php
示例9: 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
示例10: init
public static function init($name, $value, $attrs = null)
{
$t = new Textarea($name, $value);
if ($attrs) {
$t->add_attrs($attrs);
}
return $t;
}
开发者ID:DaniloEpic,项目名称:slast,代码行数:8,代码来源:Formulario.php
示例11: __construct
/**
*
* Class constructor
*
* @param string $name
*
* @access public
*/
public function __construct($name)
{
parent::__construct($name);
$this->setRepeating(true);
$this->setSortable(true);
$this->setLabel(Translate::translate('Gallery'));
$name = new Text('name');
$name->setLabel(Translate::translate('Name'));
$this->addControl($name);
$values = new Textarea('values');
$values->setLabel(Translate::translate('Description'));
$this->addControl($values);
}
开发者ID:silversite,项目名称:silverwp,代码行数:21,代码来源:Features.php
示例12: __construct
public function __construct()
{
parent::__construct('config-form');
$lang = OW::getLanguage();
$months = new Textarea('months');
$months->setRequired(true);
$months->addValidator(new IntValidator(1, 12));
$months->setLabel($lang->text('ocsguests', 'store_period'));
$this->addElement($months);
$submit = new Submit('save');
$submit->setLabel($lang->text('skapi', 'save'));
$this->addElement($submit);
}
开发者ID:hardikamutech,项目名称:hammu,代码行数:13,代码来源:admin.php
示例13: initialize
/**
* Initializes backend form of pages
*/
public function initialize()
{
$lang = new Select('lang', $this->di->get('config')->application->langs->toArray());
$lang->setLabel('Language');
$this->add($lang);
$title = new Text('title');
$title->setLabel('Title');
$title->addValidator(new PresenceOf());
$title->setAttribute('placeholder', 'Title');
$this->add($title);
$content = new Textarea('content');
$content->setLabel('Content');
$content->addValidator(new PresenceOf());
$content->setAttribute('placeholder', 'content');
$this->add($content);
}
开发者ID:maniolek,项目名称:demo,代码行数:19,代码来源:Article.php
示例14: 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
示例15: __construct
public function __construct()
{
parent::__construct('questions_add');
$language = OW::getLanguage();
$this->setAjax();
$this->setAjaxResetOnSuccess(false);
$field = new Textarea('question');
$field->addAttribute('maxlength', 500);
$field->setRequired();
$field->setHasInvitation(true);
$field->setInvitation($language->text('questions', 'question_add_text_inv'));
$field->addAttribute("inv", $language->text('questions', 'question_add_text_inv'));
$this->addElement($field);
$field = new CheckboxField('allowAddOprions');
$field->addAttribute('checked');
$field->setLabel($language->text('questions', 'question_add_allow_add_opt'));
$this->addElement($field);
$field = new QUESTIONS_OptionsField('answers');
$field->setHasInvitation(true);
$field->setInvitation($language->text('questions', 'question_add_option_inv'));
$this->addElement($field);
$submit = new Submit('save');
$submit->setValue($language->text('questions', 'question_add_save'));
$this->addElement($submit);
if (!OW::getRequest()->isAjax()) {
OW::getLanguage()->addKeyForJs('questions', 'feedback_question_empty');
OW::getLanguage()->addKeyForJs('questions', 'feedback_question_min_length');
OW::getLanguage()->addKeyForJs('questions', 'feedback_question_max_length');
OW::getLanguage()->addKeyForJs('questions', 'feedback_question_two_apt_required');
OW::getLanguage()->addKeyForJs('questions', 'feedback_question_dublicate_option');
OW::getLanguage()->addKeyForJs('questions', 'feedback_option_max_length');
$this->initJsResponder();
}
$this->setAction(OW::getRequest()->buildUrlQueryString(OW::getRouter()->urlFor('QUESTIONS_CTRL_List', 'addQuestion')));
}
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:35,代码来源:question_add.php
示例16: __construct
public function __construct($photoId = NULL)
{
parent::__construct('photo-edit-form');
$this->setAjax(TRUE);
$this->setAction(OW::getRouter()->urlFor('PHOTO_CTRL_Photo', 'ajaxUpdatePhoto'));
$this->bindJsFunction('success', 'function( data )
{
OW.trigger("photo.afterPhotoEdit", data);
}');
$photo = PHOTO_BOL_PhotoService::getInstance()->findPhotoById($photoId);
$album = PHOTO_BOL_PhotoAlbumService::getInstance()->findAlbumById($photo->albumId);
$photoIdField = new HiddenField('photoId');
$photoIdField->setRequired(TRUE);
$photoIdField->setValue($photo->id);
$photoIdField->addValidator(new PHOTO_CLASS_PhotoOwnerValidator());
$this->addElement($photoIdField);
$albumField = new TextField('album');
$albumField->setId('ajax-upload-album');
$albumField->setRequired();
$albumField->setValue($album->name);
$albumField->setLabel(OW::getLanguage()->text('photo', 'create_album'));
$albumField->addAttribute('class', 'ow_dropdown_btn ow_inputready ow_cursor_pointer');
$albumField->addAttribute('autocomplete', 'off');
$albumField->addAttribute('readonly');
$this->addElement($albumField);
$albumNameField = new TextField('album-name');
$albumNameField->setRequired();
$albumNameField->setValue($album->name);
$albumNameField->addValidator(new PHOTO_CLASS_AlbumNameValidator(FALSE, NULL, $album->name));
$albumNameField->setHasInvitation(TRUE);
$albumNameField->setInvitation(OW::getLanguage()->text('photo', 'album_name'));
$albumNameField->addAttribute('class', 'ow_smallmargin invitation');
$this->addElement($albumNameField);
$desc = new Textarea('description');
$desc->setHasInvitation(TRUE);
$desc->setInvitation(OW::getLanguage()->text('photo', 'album_desc'));
$this->addElement($desc);
$photoDesc = new PHOTO_CLASS_HashtagFormElement('photo-desc');
$photoDesc->setValue($photo->description);
$photoDesc->setLabel(OW::getLanguage()->text('photo', 'album_desc'));
$this->addElement($photoDesc);
$submit = new Submit('edit');
$submit->setValue(OW::getLanguage()->text('photo', 'btn_edit'));
$this->addElement($submit);
}
开发者ID:tammyrocks,项目名称:photo,代码行数:45,代码来源:edit_form.php
示例17: initialize
public function initialize($entity = null)
{
// In edit page the id is hidden
if (!is_null($entity)) {
$this->add(new Hidden('id'));
}
//content
$content = new Textarea('content', array('placeholder' => t('Please be sure to answer the question. Provide details and share your research!'), 'class' => 'wmd-input', 'id' => 'wmd-input', 'required' => true, 'rows' => 8));
$content->addValidator(new PresenceOf(array('message' => t('content is required.'))));
$this->add($content);
$this->add(new Hidden('idObject'));
$this->add(new Hidden('object'));
$csrf = new Hidden('csrf');
$csrf->addValidator(new Identical(array('value' => $this->security->getSessionToken(), 'message' => t('CSRF validation failed'))));
$this->add($csrf);
//Submit
$this->add(new Submit('postAnswer', ['value' => t('Post Your Answer'), 'class' => 'btn btn-sm btn-info']));
}
开发者ID:SidRoberts,项目名称:phanbook,代码行数:18,代码来源:ReplyForm.php
示例18: __construct
public function __construct($name, $mode)
{
parent::__construct($name);
$this->setAction(OW::getRouter()->urlForRoute('ocsaffiliates.action_edit'));
$this->setAjax();
$lang = OW::getLanguage();
$idField = new HiddenField('affiliateId');
$this->addElement($idField);
$modeField = new HiddenField('mode');
$modeField->setValue($mode);
$this->addElement($modeField);
if ($mode == 'admin') {
$emailVerified = new CheckboxField('emailVerified');
$emailVerified->setLabel($lang->text('ocsaffiliates', 'email_verified'));
$this->addElement($emailVerified);
$status = new Selectbox('status');
$status->setLabel($lang->text('ocsaffiliates', 'status'));
$status->setHasInvitation(false);
$status->setRequired(true);
$options = array('active' => $lang->text('ocsaffiliates', 'status_active'), 'unverified' => $lang->text('ocsaffiliates', 'status_unverified'));
$status->setOptions($options);
$this->addElement($status);
}
$affName = new TextField('name');
$affName->setRequired(true);
$affName->setLabel($lang->text('ocsaffiliates', 'affiliate_name'));
$this->addElement($affName);
$email = new TextField('email');
$email->setRequired(true);
$email->setLabel($lang->text('ocsaffiliates', 'email'));
$email->addValidator(new EmailValidator());
$this->addElement($email);
$password = new PasswordField('password');
$password->setLabel($lang->text('ocsaffiliates', 'password'));
$this->addElement($password);
$payment = new Textarea('payment');
$payment->setRequired(true);
$payment->setLabel($lang->text('ocsaffiliates', 'payment_details'));
$this->addElement($payment);
$submit = new Submit('save');
$submit->setValue($lang->text('ocsaffiliates', 'edit'));
$this->addElement($submit);
$this->bindJsFunction(Form::BIND_SUCCESS, "function(data){\n if ( !data.result ) {\n OW.error(data.error);\n }\n else {\n document.location.reload();\n }\n }");
}
开发者ID:vazahat,项目名称:dudex,代码行数:44,代码来源:edit_form.php
示例19: __construct
/**
* @return Constructor.
*/
public function __construct()
{
parent::__construct();
$form = new Form('set_suspend_message');
$form->setAjax(true);
$form->setAjaxResetOnSuccess(true);
$textarea = new Textarea('message');
$textarea->setRequired();
$form->addElement($textarea);
$submit = new Submit('submit');
$submit->setLabel(OW::getLanguage()->text('base', 'submit'));
$form->addElement($submit);
// $form->bindJsFunction(Form::BIND_SUBMIT, ' function(e) {
// return false; }
//
// ');
$this->addForm($form);
$this->bindJs($form);
}
开发者ID:hardikamutech,项目名称:loov,代码行数:22,代码来源:set_suspend_message.php
示例20: __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
注:本文中的Textarea类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论