Author: jablko
Date: Mon Oct 18 09:25:02 2010
New Revision: 8223

Log:
Factor into base component

Modified:
   trunk/apps/qubit/modules/relation/actions/editComponent.class.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedAuthorityRecordComponent.class.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedFunctionComponent.class.php
   
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedResourceComponent.class.php

Modified: trunk/apps/qubit/modules/relation/actions/editComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/relation/actions/editComponent.class.php   Mon Oct 
18 04:21:57 2010        (r8222)
+++ trunk/apps/qubit/modules/relation/actions/editComponent.class.php   Mon Oct 
18 09:25:02 2010        (r8223)
@@ -23,9 +23,9 @@
   {
     switch ($name)
     {
-      case 'startDate':
-      case 'endDate':
       case 'dateDisplay':
+      case 'endDate':
+      case 'startDate':
         $this->form->setValidator($name, new sfValidatorString);
         $this->form->setWidget($name, new sfWidgetFormInput);
 
@@ -36,6 +36,12 @@
         $this->form->setWidget('description', new sfWidgetFormTextarea);
 
         break;
+
+      case 'resource':
+        $this->form->setValidator('resource', new sfValidatorString);
+        $this->form->setWidget('resource', new 
sfWidgetFormSelect(array('choices' => array())));
+
+        break;
     }
   }
 

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedAuthorityRecordComponent.class.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedAuthorityRecordComponent.class.php
   Mon Oct 18 04:21:57 2010        (r8222)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedAuthorityRecordComponent.class.php
   Mon Oct 18 09:25:02 2010        (r8223)
@@ -28,22 +28,6 @@
       'endDate',
       'dateDisplay');
 
-  protected function addField($name)
-  {
-    switch ($name)
-    {
-      case 'resource':
-        $this->form->setValidator('resource', new sfValidatorString);
-        $this->form->setWidget('resource', new sfWidgetFormInput);
-
-        break;
-
-      default:
-
-        return parent::addField($name);
-    }
-  }
-
   protected function processForm()
   {
     if (isset($this->request["{$formName}s"]))

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedFunctionComponent.class.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedFunctionComponent.class.php
  Mon Oct 18 04:21:57 2010        (r8222)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedFunctionComponent.class.php
  Mon Oct 18 09:25:02 2010        (r8223)
@@ -33,12 +33,6 @@
   {
     switch ($name)
     {
-      case 'resource':
-        $this->form->setValidator('authorisedFormOfName', new 
sfValidatorString);
-        $this->form->setWidget('resource', new 
sfWidgetFormSelect(array('choices' => array())));
-
-        break;
-
       case 'type':
         $this->form->setValidator('type', new sfValidatorString);
 

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedResourceComponent.class.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedResourceComponent.class.php
  Mon Oct 18 04:21:57 2010        (r8222)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/relatedResourceComponent.class.php
  Mon Oct 18 09:25:02 2010        (r8223)
@@ -28,22 +28,6 @@
       'endDate',
       'dateDisplay');
 
-  protected function addField($name)
-  {
-    switch ($name)
-    {
-      case 'resource':
-        $this->form->setValidator('resource', new sfValidatorString);
-        $this->form->setWidget('resource', new 
sfWidgetFormSelect(array('choices' => array())));
-
-        break;
-
-      default:
-
-        return parent::addField($name);
-    }
-  }
-
   protected function processForm()
   {
     if (isset($this->request["{$formName}s"]))

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