本文整理汇总了PHP中TextEdit::SetPasswordMode方法的典型用法代码示例。如果您正苦于以下问题:PHP TextEdit::SetPasswordMode方法的具体用法?PHP TextEdit::SetPasswordMode怎么用?PHP TextEdit::SetPasswordMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEdit
的用法示例。
在下文中一共展示了TextEdit::SetPasswordMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for username field
//
$editor = new TextEdit('username_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Username', 'username', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for email field
//
$editor = new TextEdit('email_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Email', 'email', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for password field
//
$editor = new TextEdit('password_edit');
$editor->SetPasswordMode(true);
$editColumn = new CustomEditColumn('Password', 'password', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for dept_id field
//
$editor = new ComboBox('dept_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(new MyConnectionFactory(), GetConnectionOptions(), '`department`');
$field = new IntegerField('DEPT_ID', null, null, true);
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('DEPARTMENT');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('MANAGER');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new IntegerField('DIRECTOR');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('LOCATION');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new StringField('PHONE_NO');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('DEPARTMENT', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn('Department', 'dept_id', $editor, $this->dataset, 'DEPT_ID', 'DEPARTMENT', $lookupDataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for position field
//
$editor = new TextEdit('position_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Position', 'position', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for emp_number field
//
$editor = new TextEdit('emp_number_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Employee No', 'emp_number', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for picture field
//
$editor = new ImageUploader('picture_edit');
$editor->SetShowImage(true);
$editColumn = new UploadFileToFolderColumn('Picture', 'picture', $editor, $this->dataset, false, false, 'images');
$editColumn->OnCustomFileName->AddListener('picture_GenerateFileName_insert', $this);
$editColumn->SetReplaceUploadedFileIfExist(true);
$editColumn->SetGenerationImageThumbnails('picture', 'images', Delegate::CreateFromMethod($this, 'picture_Thumbnail_GenerateFileName_insert'), new ImageFitByHeightResizeFilter(100));
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
//.........这里部分代码省略.........
示例2: AddInsertColumns
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for username field
//
$editor = new TextEdit('username_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Username', 'username', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for email field
//
$editor = new TextEdit('email_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Email', 'email', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for password field
//
$editor = new TextEdit('password_edit');
$editor->SetPasswordMode(true);
$editColumn = new CustomEditColumn('Password', 'password', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for dept_id field
//
$editor = new ComboBox('dept_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$editColumn = new CustomEditColumn('Department', 'dept_id', $editor, $this->dataset);
$validator = new RequiredValidator(StringUtils::Format($this->GetLocalizerCaptions()->GetMessageString('RequiredValidationMessage'), $this->RenderText($editColumn->GetCaption())));
$editor->GetValidatorCollection()->AddValidator($validator);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for position field
//
$editor = new TextEdit('position_edit');
$editor->SetSize(50);
$editor->SetMaxLength(50);
$editColumn = new CustomEditColumn('Position', 'position', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for emp_number field
//
$editor = new TextEdit('emp_number_edit');
$editor->SetSize(20);
$editor->SetMaxLength(20);
$editColumn = new CustomEditColumn('Employee No', 'emp_number', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for picture field
//
$editor = new ImageUploader('picture_edit');
$editor->SetShowImage(true);
$editColumn = new UploadFileToFolderColumn('Picture', 'picture', $editor, $this->dataset, false, false, 'images');
$editColumn->OnCustomFileName->AddListener('picture_GenerateFileName_insert', $this);
$editColumn->SetReplaceUploadedFileIfExist(true);
$editColumn->SetGenerationImageThumbnails('picture', 'images', Delegate::CreateFromMethod($this, 'picture_Thumbnail_GenerateFileName_insert'), new ImageFitByHeightResizeFilter(100));
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant()) {
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
} else {
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}