コード例 #1
0
 private function AddNameField()
 {
     $name = 'Name';
     $this->AddField(Input::Text($name, $this->navi->GetName()));
     $this->SetRequired($name);
     $this->AddValidator($name, DatabaseCount::UniqueField($this->navi, $name));
 }
コード例 #2
0
ファイル: Login.php プロジェクト: agentmedia/phine-builtin
 private function AddPasswordField()
 {
     $name = 'Password';
     $field = Input::Password($name);
     $this->AddField($field);
     $this->SetRequired($name);
 }
コード例 #3
0
 /**
  * Adds the fragment field
  */
 private function AddFragmentField()
 {
     $name = 'Fragment';
     $field = Input::Text($name, Request::GetData($this->prefix . 'Fragment'));
     $this->AddField($field);
     $this->SetTransAttribute($name, 'placeholder');
 }
コード例 #4
0
 private function AddPasswordField()
 {
     $name = 'Password';
     $field = Input::Password($name);
     $this->AddField($field);
     $this->SetRequired($name);
     $this->AddValidator($name, StringLength::MinLength(6));
 }
コード例 #5
0
ファイル: MemberForm.php プロジェクト: agentmedia/phine-core
 /**
  * Adds the password field to the form
  */
 private function AddPasswordField()
 {
     $name = 'Password';
     $this->AddField(Input::Password($name));
     if (!$this->member->Exists()) {
         $this->SetRequired($name);
     }
     $this->AddValidator($name, StringLength::MinLength(6));
     $this->SetTransAttribute($name, 'placeholder');
 }
コード例 #6
0
 private function AddNameField()
 {
     $name = 'Name';
     $this->AddField(Input::Text($name, $this->template));
     $nameCheck = Validation\RegExp::LettersNumbers("-\\._");
     $this->AddValidator($name, $nameCheck);
     $fileCheck = new Validation\FileExists($this->folder, $this->template, 'phtml');
     $this->AddValidator($name, $fileCheck);
     $this->SetRequired($name);
 }
コード例 #7
0
ファイル: SiteForm.php プロジェクト: agentmedia/phine-core
 private function AddSitemapCacheLifetimeField()
 {
     $name = 'SitemapCacheLifetime';
     $value = $this->site->Exists() ? $this->site->GetSitemapCacheLifetime() : 24 * 60 * 60;
     $field = Input::Text($name, $value);
     $this->AddField($field);
     $this->AddValidator($name, Integer::PositiveOrNull());
 }
コード例 #8
0
ファイル: UserForm.php プロジェクト: agentmedia/phine-core
 /**
  * Adds the locked field
  */
 private function AddPasswordRepeatField()
 {
     $name = 'PasswordRepeat';
     $this->AddField(Input::Password($name));
     if (Request::PostData('Password')) {
         $this->SetRequired($name);
         $this->AddValidator($name, CompareCheck::Equals($this->Value('Password')));
     }
 }
コード例 #9
0
ファイル: ContentForm.php プロジェクト: agentmedia/phine-core
 /**
  * Adds the wording fields
  */
 private function AddWordingFields()
 {
     foreach ($this->Wordings() as $name) {
         $wording = $this->FindWording($name);
         $fieldName = $this->WordingFieldName($name);
         $field = Input::Text($fieldName, $wording ? $wording->GetText() : '');
         $field->SetHtmlAttribute('placeholder', Trans('Core.ContentForm.Wording.Placeholder'));
         $this->AddField($field);
     }
 }
コード例 #10
0
ファイル: PageForm.php プロジェクト: agentmedia/phine-core
 private function AddPublishToMinuteField()
 {
     $name = 'PublishToMinute';
     $to = $this->page->GetPublishTo();
     $field = Input::Text($name, $to ? $to->ToString('i') : '');
     $field->SetHtmlAttribute('data-type', 'minute');
     $this->AddField($field);
 }
コード例 #11
0
 private function AddUrlField()
 {
     $name = 'Url';
     $value = '';
     if ($this->naviItem->Exists() && $this->naviItem->GetUrlItem()) {
         $value = $this->naviItem->GetUrlItem()->GetUrl();
     }
     $this->AddField(Input::Text($name, $value));
     if ($this->Value('Type') == 'UrlItem') {
         $this->SetRequired($name);
         $this->AddValidator($name, PhpFilter::Url());
     }
 }
コード例 #12
0
ファイル: LayoutForm.php プロジェクト: agentmedia/phine-core
 /**
  * Adds the server path field to the form
  */
 private function AddAreasField()
 {
     $name = 'Areas';
     $field = Input::Text($name, join(', ', $this->areaNames));
     $this->AddField($field);
     if ($this->layout->Exists()) {
         $field->SetHtmlAttribute('readonly', 'readonly');
     } else {
         $this->SetTransAttribute($name, 'placeholder');
         $this->SetRequired($name);
     }
 }
コード例 #13
0
 /**
  * 
  * @param Input $field The field
  * @param string $previewImage The url of an optional preview image
  */
 function __construct(Input $field, $previewImage = '')
 {
     $this->field = $field;
     $this->attribs = $field->GetHtmlAttributes();
     $this->previewImage = $previewImage;
 }
コード例 #14
0
 function __construct(Input $field)
 {
     $this->field = $field;
     $this->attribs = $field->GetHtmlAttributes();
 }
コード例 #15
0
 /**
  * Gets all validators
  * @return IValidator[]
  */
 public function GetValidators()
 {
     return $this->pageField->GetValidators();
 }
コード例 #16
0
 private function AddMailFromField()
 {
     $name = 'MailFrom';
     $field = Input::Text($name, $this->register->GetMailFrom());
     $this->AddField($field);
     $this->SetRequired($name);
     $this->AddValidator($name, PhpFilter::EMail());
 }
コード例 #17
0
 /**
  * Adds the smtp password field
  */
 private function AddSmtpPasswordField()
 {
     $name = 'SmtpPassword';
     $field = Input::Text($name, $this->settings->GetSmtpPassword());
     $this->AddField($field);
 }