Exemplo n.º 1
0
 /**
  * Adds the url field to the form
  */
 private function AddUrlField()
 {
     $name = 'Url';
     $this->AddField(Input::Text($name, $this->site->GetUrl()));
     $this->SetRequired($name);
     $this->AddValidator($name, PhpFilter::Url());
 }
 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());
     }
 }