예제 #1
0
 public function Form_Validate($blnToReturn = true)
 {
     if ($this->txtAssignedTo->Required && $this->txtAssignedTo->Text == '[none]') {
         $this->txtAssignedTo->Warning = 'Required';
         $blnToReturn = false;
     }
     foreach ($this->txtMutableFields as $intIssueFieldId => $txtField) {
         if ($txtField->Visible && strlen(trim($txtField->Text))) {
             $strToken = IssueFieldOption::TokenizeName($txtField->Text);
             if (IssueFieldOption::LoadByIssueFieldIdToken($intIssueFieldId, $strToken)) {
                 $txtField->Warning = 'Value already exists';
                 $blnToReturn = false;
             }
         }
     }
     return parent::Form_Validate($blnToReturn);
 }
 /**
  * This will set the Token field of this object to the TokenizeName-d version of the Name field of this object.
  * @return void
  */
 public function SetToken()
 {
     $this->strToken = IssueFieldOption::TokenizeName($this->strName);
 }