public function Edit($RouteIndex = FALSE) {
      $this->Permission('Garden.Settings.Manage');
      $this->AddSideMenu('dashboard/routes');
      $this->Route = Gdn::Router()->GetRoute($RouteIndex);
      
      $Validation = new Gdn_Validation();
      $ConfigurationModel = new Gdn_ConfigurationModel($Validation);
      $ConfigurationModel->SetField(array('Route', 'Target', 'Type'));
      
      // Set the model on the form.
      $this->Form->SetModel($ConfigurationModel);
            
      // If seeing the form for the first time...
      if (!$this->Form->AuthenticatedPostBack()) {
      
         // Apply the route info to the form.
         if ($this->Route !== FALSE)
            $this->Form->SetData(array(
               'Route'  => $this->Route['Route'], 
               'Target' => $this->Route['Destination'], 
               'Type'   => $this->Route['Type']
            ));
            
      } else {
         // Define some validation rules for the fields being saved
         $ConfigurationModel->Validation->ApplyRule('Route', 'Required');
         $ConfigurationModel->Validation->ApplyRule('Target', 'Required');
         $ConfigurationModel->Validation->ApplyRule('Type', 'Required');
         
         // Validate & Save
         $FormPostValues = $this->Form->FormValues();
         
         // Dunno.
         if ($this->Route['Reserved'])
            $FormPostValues['Route'] = $this->Route['Route'];
            
         if ($ConfigurationModel->Validate($FormPostValues)) {
            $NewRouteName = ArrayValue('Route', $FormPostValues);

            if ($this->Route !== FALSE && $NewRouteName != $this->Route['Route'])
               Gdn::Router()->DeleteRoute($this->Route['Route']);
         
            Gdn::Router()->SetRoute(
               $NewRouteName,
               ArrayValue('Target', $FormPostValues),
               ArrayValue('Type', $FormPostValues)
            );

            $this->InformMessage(T("The route was saved successfully."));
            $this->RedirectUrl = Url('dashboard/routes');
         } else {
            $this->Form->SetValidationResults($ConfigurationModel->ValidationResults());
         }
      }
      
      $this->Render();
   }