Author: jablko
Date: Wed Oct 13 11:11:04 2010
New Revision: 8082

Log:
Use literals

Modified:
   trunk/apps/qubit/modules/repository/actions/editAction.class.php

Modified: trunk/apps/qubit/modules/repository/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/repository/actions/editAction.class.php    Wed Oct 
13 09:22:23 2010        (r8081)
+++ trunk/apps/qubit/modules/repository/actions/editAction.class.php    Wed Oct 
13 11:11:04 2010        (r8082)
@@ -85,9 +85,9 @@
           $choices[$this->context->routing->generate(null, array($term, 
'module' => 'term'))] = $term;
         }
 
-        $this->form->setDefault($name, $values);
-        $this->form->setValidator($name, new sfValidatorPass);
-        $this->form->setWidget($name, new sfWidgetFormSelect(array('choices' 
=> $choices, 'multiple' => true)));
+        $this->form->setDefault('type', $values);
+        $this->form->setValidator('type', new sfValidatorPass);
+        $this->form->setWidget('type', new sfWidgetFormSelect(array('choices' 
=> $choices, 'multiple' => true)));
 
         break;
 
@@ -149,10 +149,10 @@
         if (0 < count($maintenanceNotes))
         {
           $this->maintenanceNote = $maintenanceNotes[0];
-          $this->form->setDefault($name, $this->maintenanceNote->content);
+          $this->form->setDefault('maintenanceNotes', 
$this->maintenanceNote->content);
         }
-        $this->form->setValidator($name, new sfValidatorString);
-        $this->form->setWidget($name, new sfWidgetFormTextarea);
+        $this->form->setValidator('maintenanceNotes', new sfValidatorString);
+        $this->form->setWidget('maintenanceNotes', new sfWidgetFormTextarea);
 
         break;
 
@@ -283,7 +283,7 @@
         {
           $note = $maintenanceNotes[0];
         }
-        else if (null !== $this->form->getValue($name))
+        else if (null !== $this->form->getValue('maintenanceNotes'))
         {
           // Create a maintenance note for this object if one doesn't exist
           $note = new QubitNote;
@@ -294,7 +294,7 @@
           break;
         }
 
-        $note->content = $this->form->getValue($name);
+        $note->content = $this->form->getValue('maintenanceNotes');
 
         $this->resource->notes[] = $note;
 

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to