Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (9 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Form/Form.php

    r737 r738  
    5050    {
    5151      if(!array_key_exists($Index, $this->Values) and isset($Item['Default']))
    52         $this->Values[$Index] = $Item['Default'];
     52        $this->Values[$Index] = $Item['Default'];
    5353    }
    5454  }
     
    6262  function GetValue($Index, $Event = 'OnView')
    6363  {
    64         $Item = $this->Definition['Items'][$Index];
    65         if(array_key_exists($Item['Type'], $this->FormManager->FormTypes))
    66         {
    67                 if(!array_key_exists($Item['Type'], $this->FormManager->Type->TypeDefinitionList))
    68                         $this->FormManager->Type->RegisterType($Item['Type'], '', $this->FormManager->FormTypes[$Item['Type']]);
    69                 if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Reference')
    70                         $UseType = 'OneToMany';
    71                 else if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Enumeration')
    72                         $UseType = 'Enumeration';
    73         } else $UseType = $Item['Type'];
    74         return $this->FormManager->Type->ExecuteTypeEvent($UseType, $Event,
     64    $Item = $this->Definition['Items'][$Index];
     65    if(array_key_exists($Item['Type'], $this->FormManager->FormTypes))
     66    {
     67      if(!array_key_exists($Item['Type'], $this->FormManager->Type->TypeDefinitionList))
     68        $this->FormManager->Type->RegisterType($Item['Type'], '', $this->FormManager->FormTypes[$Item['Type']]);
     69      if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Reference')
     70        $UseType = 'OneToMany';
     71      else if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Enumeration')
     72        $UseType = 'Enumeration';
     73    } else $UseType = $Item['Type'];
     74    return $this->FormManager->Type->ExecuteTypeEvent($UseType, $Event,
    7575        array('Value' => $this->Values[$Index], 'Name' => $Index,
    7676        'Type' => $Item['Type'], 'Values' => $this->Values,
     
    163163      if(array_key_exists($Index, $this->ValuesValidate) and
    164164        $this->ValuesValidate[$Index]) {
    165                 $Format = $this->FormManager->Type->ExecuteTypeEvent($UseType, 'GetValidationFormat', array());
    166                 if($Format != '') $Caption .= '<br/><small>'.$Format.'</small>';
    167                 $Caption = '<span style="color:red;">'.$Caption.'</span>';
     165          $Format = $this->FormManager->Type->ExecuteTypeEvent($UseType, 'GetValidationFormat', array());
     166          if($Format != '') $Caption .= '<br/><small>'.$Format.'</small>';
     167          $Caption = '<span style="color:red;">'.$Caption.'</span>';
    168168        }
    169169      if(!$this->FormManager->Type->IsHidden($UseType))
     
    305305    {
    306306      if(isset($Item['Default'])) {
    307         if(isset($Item['Null']) and ($Item['Null'] == true))
    308                 $Values[$Index] = null;
    309         else $Values[$Index] = $Item['Default'];
     307        if(isset($Item['Null']) and ($Item['Null'] == true))
     308          $Values[$Index] = null;
     309        else $Values[$Index] = $Item['Default'];
    310310      }
    311311    }
     
    342342        if(!$this->FormManager->Type->ExecuteTypeEvent($UseType, 'Validate',
    343343          $Parameters)) {
    344                 $this->ValuesValidate[$Index] = true;
    345                 $Valid = false;
     344            $this->ValuesValidate[$Index] = true;
     345            $Valid = false;
    346346          }
    347347    }
Note: See TracChangeset for help on using the changeset viewer.