Author: jablko
Date: Sun Oct 17 17:40:46 2010
New Revision: 8205

Log:
Factor common fields into base component

Modified:
   trunk/apps/qubit/modules/relation/actions/editComponent.class.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedAuthorityRecordsComponent.class.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedFunctionsComponent.class.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedResourcesComponent.class.php

Modified: trunk/apps/qubit/modules/relation/actions/editComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/relation/actions/editComponent.class.php   Sun Oct 
17 17:34:16 2010        (r8204)
+++ trunk/apps/qubit/modules/relation/actions/editComponent.class.php   Sun Oct 
17 17:40:46 2010        (r8205)
@@ -23,6 +23,19 @@
   {
     switch ($name)
     {
+      case 'startDate':
+      case 'endDate':
+      case 'dateDisplay':
+        $this->form->setValidator($name, new sfValidatorString);
+        $this->form->setWidget($name, new sfWidgetFormInput);
+
+        break;
+
+      case 'description':
+        $this->form->setValidator($name, new sfValidatorString);
+        $this->form->setWidget($name, new sfWidgetFormTextarea);
+
+        break;
     }
   }
 

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedAuthorityRecordsComponent.class.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedAuthorityRecordsComponent.class.php
  Sun Oct 17 17:34:16 2010        (r8204)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedAuthorityRecordsComponent.class.php
  Sun Oct 17 17:40:46 2010        (r8205)
@@ -33,23 +33,14 @@
     switch ($name)
     {
       case 'object':
-      case 'startDate':
-      case 'endDate':
-      case 'dateDisplay':
         $this->form->setValidator($name, new sfValidatorString);
         $this->form->setWidget($name, new sfWidgetFormInput);
 
         break;
 
-      case 'description':
-        $this->form->setValidator($name, new sfValidatorString);
-        $this->form->setWidget($name, new sfWidgetFormTextarea);
-
-        break;
-
       default:
 
-        return parent::addFeild($name);
+        return parent::addField($name);
     }
   }
 

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedFunctionsComponent.class.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedFunctionsComponent.class.php
 Sun Oct 17 17:34:16 2010        (r8204)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedFunctionsComponent.class.php
 Sun Oct 17 17:40:46 2010        (r8205)
@@ -56,20 +56,6 @@
 
         break;
 
-      case 'startDate':
-      case 'endDate':
-      case 'dateDisplay':
-        $this->form->setValidator($name, new sfValidatorString);
-        $this->form->setWidget($name, new sfWidgetFormInput);
-
-        break;
-
-      case 'description':
-        $this->form->setValidator($name, new sfValidatorString);
-        $this->form->setWidget($name, new sfWidgetFormTextarea);
-
-        break;
-
       default:
 
         return parent::addField($name);

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedResourcesComponent.class.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedResourcesComponent.class.php
 Sun Oct 17 17:34:16 2010        (r8204)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedResourcesComponent.class.php
 Sun Oct 17 17:40:46 2010        (r8205)
@@ -40,20 +40,6 @@
 
         break;
 
-      case 'startDate':
-      case 'endDate':
-      case 'dateDisplay':
-        $this->form->setValidator($name, new sfValidatorString);
-        $this->form->setWidget($name, new sfWidgetFormInput);
-
-        break;
-
-      case 'description':
-        $this->form->setValidator($name, new sfValidatorString);
-        $this->form->setWidget($name, new sfWidgetFormTextarea);
-
-        break;
-
       default:
 
         return parent::addField($name);

-- 
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