• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP FormResponse类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: validate

 /**
  * Overloaded so that form error messages are displayed.
  * 
  * @see OrderFormValidator::php()
  * @see Form::validate()
  */
 function validate()
 {
     if ($this->validator) {
         $errors = $this->validator->validate();
         if ($errors) {
             if (Director::is_ajax() && $this->validator->getJavascriptValidationHandler() == 'prototype') {
                 FormResponse::status_message(_t('Form.VALIDATIONFAILED', 'Validation failed'), 'bad');
                 foreach ($errors as $error) {
                     FormResponse::add(sprintf("validationError('%s', '%s', '%s');\n", Convert::raw2js($error['fieldName']), Convert::raw2js($error['message']), Convert::raw2js($error['messageType'])));
                 }
             } else {
                 $data = $this->getData();
                 $formError = array();
                 if ($formMessageType = $this->MessageType()) {
                     $formError['message'] = $this->Message();
                     $formError['messageType'] = $formMessageType;
                 }
                 // Load errors into session and post back
                 Session::set("FormInfo.{$this->FormName()}", array('errors' => $errors, 'data' => $data, 'formError' => $formError));
             }
             return false;
         }
     }
     return true;
 }
开发者ID:helpfulrobot,项目名称:swipestripe-swipestripe,代码行数:31,代码来源:AddToCartForm.php


示例2: run

 function run(DataObjectSet $pages)
 {
     $pageIDs = $pages->column('ID');
     foreach ($pageIDs as $pageID) {
         FormResponse::add("\$('Form_EditForm').reloadIfSetTo({$pageID});");
     }
     $this->batchaction($pages, 'batchApprove', _t('BatchApprovePages.APPROVED_PAGES', 'Approved %d pages, %d failures'));
     return FormResponse::respond();
 }
开发者ID:helpfulrobot,项目名称:silverstripe-cmsworkflow,代码行数:9,代码来源:BatchApprovePages.php


示例3: saveInto

 public function saveInto($record)
 {
     $data = $this->form->getRecord();
     // if the record was written for the first time (has an arbitrary "new"-ID),
     // update the imagefield to enable uploading
     if ($record->ID && $data && substr($data->ID, 0, 3) == 'new') {
         FormResponse::update_dom_id($this->id(), $this->Field($record->ID));
     }
 }
开发者ID:ramziammar,项目名称:websites,代码行数:9,代码来源:ImageField.php


示例4: checkFolder

 function checkFolder()
 {
     if (!$this->RootFolderID) {
         $galleries = Folder::findOrMake('image-gallery');
         $galleries->Title = 'Image Gallery';
         $galleries->write();
         $folder = Folder::findOrMake('image-gallery/' . $this->URLSegment);
         $folder->Title = $this->Title;
         $folder->setName($this->Title);
         $folder->write();
         $this->RootFolderID = $folder->ID;
         $this->write();
         $this->requireDefaultAlbum();
         FormResponse::add("\$( 'Form_EditForm' ).getPageFromServer( {$this->ID} );");
     } else {
         $this->RootFolder()->setName($this->Title);
         $this->RootFolder()->write();
     }
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:19,代码来源:ImageGalleryPage.php


示例5: publish

 public function publish($comment, $member, $notify)
 {
     if (!$member) {
         $member = Member::currentUser();
     }
     // We have to mark as completed now, or we'll get
     // recursion from SiteTreeCMSWorkflow::onAfterPublish.
     $this->Status = 'Completed';
     $this->PublisherID = $member->ID;
     $this->write();
     $page = $this->Page();
     $page->doDeleteFromLive();
     // @todo Coupling to UI :-(
     FormResponse::add(LeftAndMain::deleteTreeNodeJS($page));
     if ($notify) {
         // notify
     }
     return _t('SiteTreeCMSWorkflow.PUBLISHMESSAGE', 'Published changes to live version. Emailed %s.');
 }
开发者ID:helpfulrobot,项目名称:silverstripe-cmsworkflow,代码行数:19,代码来源:WorkflowDeletionRequest.php


示例6: run

 function run(DataObjectSet $pages)
 {
     $pageIDs = $pages->column('ID');
     foreach ($pageIDs as $pageID) {
         FormResponse::add("\$('Form_EditForm').reloadIfSetTo({$pageID});");
     }
     $count = array();
     $count['PUBLISH_SUCCESS'] = $count['DELETE_SUCCESS'] = 0;
     $count['PUBLISH_FAILURE'] = $count['DELETE_FAILURE'] = 0;
     $arbitraryPage = $pages->First();
     $arbitraryPage->invokeWithExtensions('onBeforeBatchPublish', $pages);
     foreach ($pages as $page) {
         $type = $page->openWorkflowRequest() instanceof WorkflowDeletionRequest ? 'DELETE' : 'PUBLISH';
         if ($page->batchPublish()) {
             $count[$type . '_SUCCESS']++;
             // Now make sure the tree title is appropriately updated
             $publishedRecord = DataObject::get_by_id('SiteTree', $page->ID);
             if ($publishedRecord) {
                 $JS_title = Convert::raw2js($publishedRecord->TreeTitle());
                 FormResponse::add("\$('sitetree').setNodeTitle({$page->ID}, '{$JS_title}');");
             }
         } else {
             $count[$type . '_FAILURE']++;
             FormResponse::add("\$('sitetree').addNodeClassByIdx('{$page->ID}', 'failed');");
         }
         $page->destroy();
         unset($page);
     }
     $arbitraryPage->invokeWithExtensions('onAfterBatchPublish', $pages);
     $messages = array('PUBLISH_SUCCESS' => _t('BatchPublishPages.PUBLISH_SUCCESS', 'Published %d pages.'), 'PUBLISH_FAILURE' => _t('BatchPublishPages.PUBLISH_FAILURE', 'Failed to publish %d pages.'), 'DELETE_SUCCESS' => _t('BatchPublishPages.DELETE_SUCCESS', 'Deleted %d pages from the published site.'), 'DELETE_FAILURE' => _t('BatchPublishPages.DELETE_FAILURE', 'Failed to delete %d pages from the published site.'), 'PUBLISH_SUCCESS_ONE' => _t('BatchPublishPages.PUBLISH_SUCCESS_ONE', 'Published %d page.'), 'PUBLISH_FAILURE_ONE' => _t('BatchPublishPages.PUBLISH_FAILURE_ONE', 'Failed to publish %d page.'), 'DELETE_SUCCESS_ONE' => _t('BatchPublishPages.DELETE_SUCCESS_ONE', 'Deleted %d page from the published site.'), 'DELETE_FAILURE_ONE' => _t('BatchPublishPages.DELETE_FAILURE_ONE', 'Failed to delete %d page from the published site.'));
     $displayedMessages = array();
     foreach ($count as $type => $count) {
         if ($count) {
             $message = $count == 1 ? $messages[$type . '_ONE'] : $messages[$type];
             $displayedMessages[] = sprintf($message, $count);
         }
     }
     $displayedMessage = implode(" ", $displayedMessages);
     FormResponse::add('statusMessage("' . $displayedMessage . '","good");');
     return FormResponse::respond();
 }
开发者ID:helpfulrobot,项目名称:silverstripe-cmsworkflow,代码行数:41,代码来源:BatchPublishPages.php


示例7: moderate

 function moderate()
 {
     $id = (int) $this->urlParams['ID'];
     $className = Convert::raw2sql($this->urlParams['ClassName']);
     $state = Convert::raw2sql($this->urlParams['State']);
     $methods = array("delete" => "moderatorDelete", "isspam" => "markSpam", "isham" => "markHam", "approve" => "markApproved", "unapprove" => "markUnapproved");
     ModeratableState::push_state($state);
     $method = $methods[$this->urlParams['Command']];
     if (!$method) {
         FormResponse::clear();
         FormResponse::status_message("Command invalid", 'bad');
     } else {
         if ($error = DataObject::get_by_id($className, $id)->{$method}()) {
             FormResponse::status_message($error, 'bad');
         } else {
             FormResponse::add('$("moderation").elementMoved(' . $id . ');');
         }
     }
     ModeratableState::pop_state();
     return FormResponse::respond();
 }
开发者ID:muskie9,项目名称:silverstripe-moderation,代码行数:21,代码来源:ModeratableAdmin.php


示例8: doPublish

 /**
  * When an error page is published, create a static HTML page with its
  * content, so the page can be shown even when SilverStripe is not
  * functioning correctly before publishing this page normally.
  * @param string|int $fromStage Place to copy from. Can be either a stage name or a version number.
  * @param string $toStage Place to copy to. Must be a stage name.
  * @param boolean $createNewVersion Set this to true to create a new version number.  By default, the existing version number will be copied over.
  */
 function doPublish()
 {
     parent::doPublish();
     // Run the page
     $response = Director::test(Director::makeRelative($this->Link()));
     $errorContent = $response->getBody();
     // Check we have an assets base directory, creating if it we don't
     if (!file_exists(ASSETS_PATH)) {
         mkdir(ASSETS_PATH, 02775);
     }
     // if the page is published in a language other than default language,
     // write a specific language version of the HTML page
     $filePath = self::get_filepath_for_errorcode($this->ErrorCode, $this->Locale);
     if ($fh = fopen($filePath, "w")) {
         fwrite($fh, $errorContent);
         fclose($fh);
     } else {
         $fileErrorText = sprintf(_t("ErrorPage.ERRORFILEPROBLEM", "Error opening file \"%s\" for writing. Please check file permissions."), $errorFile);
         FormResponse::status_message($fileErrorText, 'bad');
         FormResponse::respond();
         return;
     }
 }
开发者ID:racontemoi,项目名称:shibuichi,代码行数:31,代码来源:ErrorPage.php


示例9: FieldHolder

    /**
     * @return String
     */
    function FieldHolder()
    {
        Requirements::javascript(THIRDPARTY_DIR . "/greybox/AmiJS.js");
        Requirements::javascript(THIRDPARTY_DIR . "/greybox/greybox.js");
        Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
        Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableListField.js');
        Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField.js");
        Requirements::css(THIRDPARTY_DIR . "/greybox/greybox.css");
        Requirements::css(SAPPHIRE_DIR . "/css/TableListField.css");
        Requirements::css(SAPPHIRE_DIR . "/css/ComplexTableField.css");
        // set caption if required
        if ($this->popupCaption) {
            $id = $this->id();
            if (Director::is_ajax()) {
                $js = <<<JS
\$('{$id}').GB_Caption = '{$this->popupCaption}';
JS;
                FormResponse::add($js);
            } else {
                $js = <<<JS
Event.observe(window, 'load', function() { \$('{$id}').GB_Caption = '{$this->popupCaption}'; });
JS;
                Requirements::customScript($js);
            }
        }
        // compute sourceItems here instead of Items() to ensure that
        // pagination and filters are respected on template accessors
        $this->sourceItems();
        return $this->renderWith($this->template);
    }
开发者ID:racontemoi,项目名称:shibuichi,代码行数:33,代码来源:ComplexTableField.php


示例10: delete

 /**
  * Custom delete implementation:
  * Remove member from group rather than from the database
  */
 function delete()
 {
     // Protect against CSRF on destructive action
     $token = $this->getForm()->getSecurityToken();
     // TODO Not sure how this is called, using $_REQUEST to be on the safe side
     if (!$token->check($_REQUEST['SecurityID'])) {
         return $this->httpError(400);
     }
     $groupID = Convert::raw2sql($_REQUEST['ctf']['ID']);
     $memberID = Convert::raw2sql($_REQUEST['ctf']['childID']);
     if (is_numeric($groupID) && is_numeric($memberID)) {
         $member = DataObject::get_by_id('Member', $memberID);
         $member->Groups()->remove($groupID);
     } else {
         user_error("MemberTableField::delete: Bad parameters: Group={$groupID}, Member={$memberID}", E_USER_ERROR);
     }
     return FormResponse::respond();
 }
开发者ID:comperio,项目名称:silverstripe-cms,代码行数:22,代码来源:MemberTableField.php


示例11: removememberfromgroup

 public function removememberfromgroup()
 {
     $groupID = $this->urlParams['ID'];
     $memberID = $this->urlParams['OtherID'];
     if (is_numeric($groupID) && is_numeric($memberID)) {
         $member = DataObject::get_by_id('Member', (int) $memberID);
         if (!$member->canDelete()) {
             return Security::permissionFailure($this);
         }
         $member->Groups()->remove((int) $groupID);
         FormResponse::add("reloadMemberTableField();");
     } else {
         user_error("SecurityAdmin::removememberfromgroup: Bad parameters: Group={$groupID}, Member={$memberID}", E_USER_ERROR);
     }
     return FormResponse::respond();
 }
开发者ID:hamishcampbell,项目名称:silverstripe-cms,代码行数:16,代码来源:SecurityAdmin.php


示例12: saveInto

	/** 
	 * Saves the Dataobjects contained in the field
	 */
	function saveInto(DataObject $record) {
		// CMS sometimes tries to set the value to one.
		if(is_array($this->value)){
			
			// Sort into proper array
			$this->value = ArrayLib::invert($this->value);
			$dataObjects = $this->sortData($this->value, $record->ID);
			if(isset($dataObjects['new']) && $dataObjects['new']) {
				$newFields = $this->sortData($dataObjects['new'], $record->ID);
			}

			$savedObj = $this->saveData($dataObjects, $this->editExisting);
			if($savedObj && isset($newFields)) {
				$savedObj = $this->saveData($newFields,false);
			} else if(isset($newFields)) {
				$savedObj = $this->saveData($newFields,false);
			}
			$items = $this->sourceItems();
			FormResponse::update_dom_id($this->id(), $this->FieldHolder());
		}
	}
开发者ID:neopba,项目名称:silverstripe-book,代码行数:24,代码来源:TableField.php


示例13: publish

	/**
	 * When an error page is published, create a static HTML page with its
	 * content, so the page can be shown even when SilverStripe is not
	 * functioning correctly before publishing this page normally.
	 * @param string|int $fromStage Place to copy from. Can be either a stage name or a version number.
	 * @param string $toStage Place to copy to. Must be a stage name.
	 * @param boolean $createNewVersion Set this to true to create a new version number.  By default, the existing version number will be copied over.
	 */
	function publish($fromStage, $toStage, $createNewVersion = false) {
		$oldStage = Versioned::current_stage();

		// Run the page
		$response = Director::test(Director::makeRelative($this->Link()));
		$errorContent = $response->getBody();
		
		// Check we have an assets base directory, creating if it we don't
		if(!file_exists(ASSETS_PATH)) {
			mkdir(ASSETS_PATH, 02775);
		}

		// Path to the error file in the file store
		$errorFile = ASSETS_PATH . "/error-$this->ErrorCode.html";

		// Attempt to open the file, writing it if it doesn't exist
		$fh = @fopen($errorFile, "w");
		if($fh) {
			fwrite($fh, $errorContent);
			fclose($fh);
		} else {
			$fileErrorText = sprintf(
				_t(
					"ErrorPage.ERRORFILEPROBLEM",
					"Error opening file \"%s\" for writing. Please check file permissions."
				),
				$errorFile
			);
			FormResponse::status_message($fileErrorText, 'bad');
			FormResponse::respond();
			return;
		}
		
		// Restore the version we're currently connected to.
		Versioned::reading_stage($oldStage);
		
		return $this->extension_instances['Versioned']->publish($fromStage, $toStage, $createNewVersion);
	}
开发者ID:neopba,项目名称:silverstripe-book,代码行数:46,代码来源:ErrorPage.php


示例14: createtranslation

 /**
  * Create a new translation from an existing item, switch to this language and reload the tree.
  */
 function createtranslation($request)
 {
     // Protect against CSRF on destructive action
     if (!SecurityToken::inst()->checkRequest($request)) {
         return $this->httpError(400);
     }
     $langCode = Convert::raw2sql($_REQUEST['newlang']);
     $originalLangID = (int) $_REQUEST['ID'];
     $record = $this->getRecord($originalLangID);
     $this->Locale = $langCode;
     Translatable::set_current_locale($langCode);
     // Create a new record in the database - this is different
     // to the usual "create page" pattern of storing the record
     // in-memory until a "save" is performed by the user, mainly
     // to simplify things a bit.
     // @todo Allow in-memory creation of translations that don't persist in the database before the user requests it
     $translatedRecord = $record->createTranslation($langCode);
     $url = sprintf("%s/%d/?locale=%s", $this->Link('show'), $translatedRecord->ID, $langCode);
     FormResponse::add(sprintf('window.location.href = "%s";', $url));
     return FormResponse::respond();
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:24,代码来源:CMSMain.php


示例15: doPublish

 /**
  * When an error page is published, create a static HTML page with its
  * content, so the page can be shown even when SilverStripe is not
  * functioning correctly before publishing this page normally.
  * @param string|int $fromStage Place to copy from. Can be either a stage name or a version number.
  * @param string $toStage Place to copy to. Must be a stage name.
  * @param boolean $createNewVersion Set this to true to create a new version number.  By default, the existing version number will be copied over.
  */
 function doPublish()
 {
     parent::doPublish();
     // Run the page (reset the theme, it might've been disabled by LeftAndMain::init())
     $oldTheme = SSViewer::current_theme();
     SSViewer::set_theme(SSViewer::current_custom_theme());
     $response = Director::test(Director::makeRelative($this->Link()));
     SSViewer::set_theme($oldTheme);
     $errorContent = $response->getBody();
     // Make the base tag dynamic.
     // $errorContent = preg_replace('/<base[^>]+href="' . str_replace('/','\\/', Director::absoluteBaseURL()) . '"[^>]*>/i', '<base href="$BaseURL" />', $errorContent);
     // Check we have an assets base directory, creating if it we don't
     if (!file_exists(ASSETS_PATH)) {
         mkdir(ASSETS_PATH, 02775);
     }
     // if the page is published in a language other than default language,
     // write a specific language version of the HTML page
     $filePath = self::get_filepath_for_errorcode($this->ErrorCode, $this->Locale);
     if ($fh = fopen($filePath, "w")) {
         fwrite($fh, $errorContent);
         fclose($fh);
     } else {
         $fileErrorText = sprintf(_t("ErrorPage.ERRORFILEPROBLEM", "Error opening file \"%s\" for writing. Please check file permissions."), $errorFile);
         FormResponse::status_message($fileErrorText, 'bad');
         FormResponse::respond();
         return;
     }
 }
开发者ID:Raiser,项目名称:Praktikum,代码行数:36,代码来源:ErrorPage.php


示例16: onAfterSave

 function onAfterSave($record)
 {
     if ($record->hasMethod('NormalRelated') && ($record->NormalRelated() || $record->ReverseRelated())) {
         FormResponse::status_message('Saved, please update related pages.', 'good');
     }
 }
开发者ID:hafriedlander,项目名称:silverstripe-config-experiment,代码行数:6,代码来源:LeftAndMainSubsites.php


示例17: saveComplexTableField

 /**
  * Use the URL-Parameter "action_saveComplexTableField"
  * to provide a clue to the main controller if the main form has to be rendered,
  * even if there is no action relevant for the main controller (to provide the instance of ComplexTableField
  * which in turn saves the record.
  *
  * @see {Form::ReferencedField}).
  */
 function saveComplexTableField()
 {
     if (isset($_REQUEST['ctf']['childID']) && is_numeric($_REQUEST['ctf']['childID'])) {
         $childObject = DataObject::get_by_id($this->sourceClass, $_REQUEST['ctf']['childID']);
     } else {
         $childObject = new $this->sourceClass();
         $this->fields->removeByName('ID');
     }
     $this->saveInto($childObject);
     $funcName = $this->controller->itemWriteMethod;
     if (!$funcName) {
         $funcName = "write";
     }
     $childObject->{$funcName}();
     // if ajax-call in an iframe, update window
     if (Director::is_ajax()) {
         // Newly saved objects need their ID reflected in the reloaded form to avoid double saving
         $form = $this->controller->DetailForm($childObject->ID);
         $form->loadDataFrom($childObject);
         FormResponse::update_dom_id($form->FormName(), $form->formHtmlContent(), true, 'update');
         return FormResponse::respond();
     } else {
         Director::redirectBack();
     }
 }
开发者ID:ramziammar,项目名称:websites,代码行数:33,代码来源:ComplexTableField.php


示例18: run

 function run(DataObjectSet $pages)
 {
     $ids = $pages->column('ID');
     $this->batchaction($pages, 'doUnpublish', _t('CMSBatchActions.DELETED_PAGES', 'Deleted %d pages from the published site, %d failures'));
     foreach ($ids as $pageID) {
         $id = $pageID;
         // check to see if the record exists on the stage site, if it doesn't remove the tree node
         $stageRecord = Versioned::get_one_by_stage('SiteTree', 'Stage', "\"SiteTree\".\"ID\"={$id}");
         if ($stageRecord) {
             $stageRecord->IsAddedToStage = true;
             $title = Convert::raw2js($stageRecord->TreeTitle());
             FormResponse::add("\$('sitetree').setNodeTitle({$id}, '{$title}');");
             FormResponse::add("\$('Form_EditForm').reloadIfSetTo({$id});");
         } else {
             FormResponse::add("var node = \$('sitetree').getTreeNodeByIdx('{$id}');");
             FormResponse::add("if(node && node.parentTreeNode)\tnode.parentTreeNode.removeTreeNode(node);");
             FormResponse::add("\$('Form_EditForm').reloadIfSetTo({$id});");
         }
     }
     return FormResponse::respond();
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:21,代码来源:CMSBatchAction.php


示例19: publish

 public function publish($comment, $member, $notify)
 {
     if (!$member) {
         $member = Member::currentUser();
     }
     // We have to mark as completed now, or we'll get
     // recursion from SiteTreeCMSWorkflow::onAfterPublish.
     $page = $this->Page();
     $page->LatestCompletedWorkflowRequestID = $this->ID;
     $page->writeWithoutVersion();
     // Embargo means we go Approved -> Scheduled
     if ($this->EmbargoDate) {
         $this->setSchedule();
         $this->PublisherID = $member->ID;
         $this->write();
         // Otherwise we go Approved -> Published
     } else {
         $this->Status = 'Completed';
         $this->PublisherID = $member->ID;
         $this->write();
         // Only publish the page if it hasn't already been published elsewhere.  This occurs when
         // SiteTree::doPublish() 'auto-closes' an open workflow
         //if($page->getIsModifiedOnStage()) {
         $page->doPublish();
         //}
         if ($notify) {
             $this->notifyPublished($comment);
         }
     }
     $this->addNewChange($comment, $this->Status, DataObject::get_by_id('Member', $this->PublisherID));
     // @todo Coupling to UI :-(
     $title = Convert::raw2js($page->TreeTitle());
     FormResponse::add("\$('sitetree').setNodeTitle({$page->ID}, \"{$title}\");");
     return _t('SiteTreeCMSWorkflow.PUBLISHMESSAGE', 'Published changes to live version. Emailed %s.');
 }
开发者ID:helpfulrobot,项目名称:silverstripe-cmsworkflow,代码行数:35,代码来源:WorkflowPublicationRequest.php


示例20: createtranslation

    /**
     * Create a new translation from an existing item, switch to this language and reload the tree.
     */
    function createtranslation()
    {
        if (!Director::is_ajax()) {
            Director::redirectBack();
            return;
        }
        $langCode = $_REQUEST['newlang'];
        $langName = i18n::get_language_name($langCode);
        $originalLangID = $_REQUEST['ID'];
        $record = $this->getRecord($originalLangID);
        $temporalID = "new-{$record->RecordClassName}-{$record->ParentID}-{$originalLangID}";
        Session::set($temporalID . '_originalLangID', $originalLangID);
        $tree = $this->switchlanguage($langCode, $originalLangID);
        FormResponse::add(<<<JS
\t\tif (Element.hasClassName('LangSelector_holder','onelang')) {
\t\t\tElement.removeClassName('LangSelector_holder','onelang');
\t\t\t\$('treepanes').resize();
\t\t}
\t\tif (\$('LangSelector').options['{$langCode}'] == undefined) {
\t\t\tvar option = document.createElement("option");
\t\t\toption.text = '{$langName}';
\t\t\toption.value = '{$langCode}';
\t\t\t\$('LangSelector').options.add(option);
\t\t}
JS
);
        FormResponse::add("\$('LangSelector').selectValue('{$langCode}');");
        $newrecord = clone $record;
        $newrecord->ID = $temporalID;
        $newrecord->CheckedPublicationDifferences = $newrecord->AddedToStage = true;
        return $this->returnItemToUser($newrecord);
    }
开发者ID:ramziammar,项目名称:websites,代码行数:35,代码来源:CMSMain.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP FormSpecialPage类代码示例发布时间:2022-05-23
下一篇:
PHP FormProcessor类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap