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


PHP ReadonlyField::setReadonly方法代码示例

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


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

示例1: performReadonlyTransformation

	/**
	 * Makes a pretty readonly field with some stars in it
	 */
	function performReadonlyTransformation() {
		$stars = '*****';

		$field = new ReadonlyField($this->name, $this->title ? $this->title : '', $stars);
		$field->setForm($this->form);
		$field->setReadonly(true);
		return $field;
	}
开发者ID:nathancox,项目名称:silverstripe-extendedfields,代码行数:11,代码来源:ExtendedPasswordField.php

示例2: getCMSFields

 function getCMSFields()
 {
     $fields = new FieldList();
     $fields->push(new TabSet("Root"));
     $CountryCodes = CountryCodes::$iso_3166_countryCodes;
     $fields->addFieldsToTab('Root.About You', array($first_name_field = new ReadonlyField('FirstName', 'First name / Given name'), $last_name_field = new ReadonlyField('Surname', 'Last name / Family name'), $os_activity = new CustomCheckboxSetField('OpenStackActivity', 'Which of the following do you yourself personally do?<BR>Select All That Apply', DeploymentSurveyOptions::$activities_options), $os_relationship = new TextAreaField('OpenStackRelationship', 'Please describe your relationship with OpenStack'), $email_field = new ReadonlyField('Member.Email', 'Your Email', $this->Member()->Email), $ok_2_contact = new CheckboxField('OkToContact', 'The OpenStack Foundation and User Committee may communicate with me in the future about my usage.')));
     $fields->addFieldsToTab('Root.YourOrganization', array(new ReadonlyField('Org.Name', 'Organization', $this->Org()->Name), new DropdownField('Industry', 'Your Organization’s Primary Industry', ArrayUtils::AlphaSort(DeploymentSurveyOptions::$industry_options, array('' => '-- Please Select One --'), array('Other' => 'Other Industry (please specify)'))), new TextareaField('OtherIndustry', 'Other Industry'), $org_it_activity = new TextField('ITActivity', 'Your Organization’s Primary IT Activity'), new LiteralField('Break', '<p>Your Organization’s Primary Location or Headquarters</p>'), $ddl_country = new DropdownField('PrimaryCountry', 'Country', $CountryCodes), new TextField('PrimaryState', 'State / Province / Region'), new TextField('PrimaryCity', 'City'), new DropdownField('OrgSize', 'Your Organization Size (All Branches, Locations, Sites)', DeploymentSurveyOptions::$organization_size_options), new CheckboxSetField('OpenStackInvolvement', 'What best describes your Organization’s involvement with OpenStack?', ArrayUtils::AlphaSort(DeploymentSurveyOptions::$openstack_involvement_options))));
     $ddl_country->setEmptyString('-- Select One --');
     $fields->addFieldsToTab('Root.Your Thoughts', array(new CustomCheckboxSetField('BusinessDrivers', 'What are your top business drivers for using OpenStack?<BR>Please rank up to 5.<BR>1 = top business driver, 2 = next, 3 = third, and so on<BR>Select At Least One', ArrayUtils::AlphaSort(DeploymentSurveyOptions::$business_drivers_options, null, array('Other' => 'Something else not listed here (please specify)'))), new TextAreaField('OtherBusinessDrivers', ''), new CustomCheckboxSetField('InformationSources', 'Where do end up finding information about using OpenStack, after using search engines and talking to your colleagues?<BR>Select All That Apply', ArrayUtils::AlphaSort(DeploymentSurveyOptions::$information_options, null, array('Other' => 'Other Sources (please specify)'))), new TextAreaField('OtherInformationSources', ''), $ddl_rate = new DropdownField('OpenStackRecommendRate', 'How likely are you to recommend OpenStack to a friend or colleague? (0=Least Likely, 10=Most Likely)', DeploymentSurveyOptions::$openstack_recommendation_rate_options), new LiteralField('Break', '<hr/>'), new LiteralField('Break', '<p>We would love to hear how OpenStack and the OpenStack Foundation can better meet your needs. These free-form questions are optional, but will provide valuable insights.</p>'), new LiteralField('Break', '<p>Your responses are anonymous, and each of these text fields is independent, so we cannot “See previous answer”. We would really appreciate a separate answer to each question.</p>'), new TextAreaField('WhatDoYouLikeMost', 'What do you like most about OpenStack, besides “free” and “open”?'), new TextAreaField('FurtherEnhancement', 'What areas of OpenStack require further enhancement? '), new TextAreaField('FoundationUserCommitteePriorities', 'What should be the priorities for the Foundation and User Committee during the coming year?'), new CheckboxField('InterestedUsingContainerTechnology', 'Are you interested in using container technology with OpenStack?'), new CustomCheckboxSetField('ContainerRelatedTechnologies', 'Which of the following container related technologies are you interested in using?<BR>Please select all that apply', DeploymentSurveyOptions::$container_related_technologies)));
     $ddl_rate->setEmptyString('Neutral');
     $app_config = new GridFieldConfig_RecordEditor();
     $apps = new GridField("AppDevSurveys", "AppDevSurveys", $this->AppDevSurveys(), $app_config);
     $fields->addFieldsToTab('Root.Application Development', array($apps));
     $deployments_config = new GridFieldConfig_RecordEditor();
     $deployments = new GridField("Deployments", "Deployments", $this->Deployments(), $deployments_config);
     $fields->addFieldsToTab('Root.Deployments', array($deployments));
     $first_name_field->setReadonly(true);
     $last_name_field->setReadonly(true);
     $email_field->setReadonly(true);
     return $fields;
     //return parent::getCMSFields();
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:22,代码来源:DeploymentSurvey.php


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