Author: jablko
Date: Mon Oct 18 11:59:17 2010
New Revision: 8237

Log:
Pass resource to relation components

Modified:
   trunk/apps/qubit/modules/relation/actions/editComponent.class.php
   trunk/plugins/sfDcPlugin/modules/sfDcPlugin/actions/editAction.class.php
   trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/editAction.class.php
   trunk/plugins/sfModsPlugin/modules/sfModsPlugin/actions/editAction.class.php
   trunk/plugins/sfRadPlugin/modules/sfRadPlugin/actions/editAction.class.php

Modified: trunk/apps/qubit/modules/relation/actions/editComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/relation/actions/editComponent.class.php   Mon Oct 
18 11:37:48 2010        (r8236)
+++ trunk/apps/qubit/modules/relation/actions/editComponent.class.php   Mon Oct 
18 11:59:17 2010        (r8237)
@@ -117,7 +117,7 @@
       {
         foreach ($this->form as $field)
         {
-          if (isset($this->request[$field->getName()]))
+          if (isset($item[$field->getName()]))
           {
             $this->processField($field);
           }

Modified: 
trunk/plugins/sfDcPlugin/modules/sfDcPlugin/actions/editAction.class.php
==============================================================================
--- trunk/plugins/sfDcPlugin/modules/sfDcPlugin/actions/editAction.class.php    
Mon Oct 18 11:37:48 2010        (r8236)
+++ trunk/plugins/sfDcPlugin/modules/sfDcPlugin/actions/editAction.class.php    
Mon Oct 18 11:59:17 2010        (r8237)
@@ -64,6 +64,7 @@
     $this->response->setTitle("$title - {$this->response->getTitle()}");
 
     $this->eventComponent = new 
InformationObjectEventFormComponent($this->context, 'informationobject', 
'eventForm');
+    $this->eventComponent->resource = $this->resource;
     $this->eventComponent->execute($this->request);
 
     
$this->eventComponent->form->getWidgetSchema()->type->setHelp($this->context->i18n->__('Select
 the type of activity (creation, publication or contribution) that established 
the relation between the authority record and the archival description.'));
@@ -149,7 +150,6 @@
   {
     $this->resource->sourceStandard = 'Dublin Core Simple version 1.1';
 
-    $this->eventComponent->resource = $this->resource;
     $this->eventComponent->processForm();
 
     return parent::processForm();

Modified: 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/editAction.class.php
==============================================================================
--- 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/editAction.class.php    
    Mon Oct 18 11:37:48 2010        (r8236)
+++ 
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/actions/editAction.class.php    
    Mon Oct 18 11:59:17 2010        (r8237)
@@ -46,13 +46,16 @@
   {
     parent::earlyExecute();
 
-    $this->relatedAuthorityRecordComponent = new 
sfIsdfPluginRelatedAuthorityRecordComponent($this->context, 'sfIsdfPlugin', 
'relatedAuthorityRecords');
+    $this->relatedAuthorityRecordComponent = new 
sfIsdfPluginRelatedAuthorityRecordComponent($this->context, 'sfIsdfPlugin', 
'relatedAuthorityRecord');
+    $this->relatedAuthorityRecordComponent->resource = $this->resource;
     $this->relatedAuthorityRecordComponent->execute($this->request);
 
-    $this->relatedFunctionComponent = new 
sfIsdfPluginRelatedFunctionComponent($this->context, 'sfIsdfPlugin', 
'relatedFunctions');
+    $this->relatedFunctionComponent = new 
sfIsdfPluginRelatedFunctionComponent($this->context, 'sfIsdfPlugin', 
'relatedFunction');
+    $this->relatedAuthorityRecordComponent->resource = $this->resource;
     $this->relatedFunctionComponent->execute($this->request);
 
-    $this->relatedResourceComponent = new 
sfIsdfPluginRelatedResourceComponent($this->context, 'sfIsdfPlugin', 
'relatedResources');
+    $this->relatedResourceComponent = new 
sfIsdfPluginRelatedResourceComponent($this->context, 'sfIsdfPlugin', 
'relatedResource');
+    $this->relatedAuthorityRecordComponent->resource = $this->resource;
     $this->relatedResourceComponent->execute($this->request);
   }
 

Modified: 
trunk/plugins/sfModsPlugin/modules/sfModsPlugin/actions/editAction.class.php
==============================================================================
--- 
trunk/plugins/sfModsPlugin/modules/sfModsPlugin/actions/editAction.class.php    
    Mon Oct 18 11:37:48 2010        (r8236)
+++ 
trunk/plugins/sfModsPlugin/modules/sfModsPlugin/actions/editAction.class.php    
    Mon Oct 18 11:59:17 2010        (r8237)
@@ -60,6 +60,7 @@
     $this->response->setTitle("$title - {$this->response->getTitle()}");
 
     $this->eventComponent = new 
InformationObjectEventFormComponent($this->context, 'informationobject', 
'eventForm');
+    $this->eventComponent->resource = $this->resource;
     $this->eventComponent->execute($this->request);
 
     
$this->eventComponent->form->getWidgetSchema()->type->setHelp($this->context->i18n->__('Select
 the type of activity that established the relation between the authority 
record and the resource.'));
@@ -145,7 +146,6 @@
   {
     $this->resource->sourceStandard = 'MODS version 3.3';
 
-    $this->eventComponent->resource = $this->resource;
     $this->eventComponent->processForm();
 
     return parent::processForm();

Modified: 
trunk/plugins/sfRadPlugin/modules/sfRadPlugin/actions/editAction.class.php
==============================================================================
--- trunk/plugins/sfRadPlugin/modules/sfRadPlugin/actions/editAction.class.php  
Mon Oct 18 11:37:48 2010        (r8236)
+++ trunk/plugins/sfRadPlugin/modules/sfRadPlugin/actions/editAction.class.php  
Mon Oct 18 11:59:17 2010        (r8237)
@@ -102,6 +102,7 @@
     $this->response->setTitle("$title - {$this->response->getTitle()}");
 
     $this->eventComponent = new 
InformationObjectEventFormComponent($this->context, 'informationobject', 
'eventForm');
+    $this->eventComponent->resource = $this->resource;
     $this->eventComponent->execute($this->request);
 
     
$this->eventComponent->form->getWidgetSchema()->dateDisplay->setHelp($this->context->i18n->__('"Give
 the date(s) of creation of the unit being described either as a single date, 
or range of dates (for inclusive dates and/or predominant dates). Always give 
the inclusive dates. When providing predominant dates, specify them as such, 
preceded by the word predominant..." (RAD 1.4B2) Record probable and uncertain 
dates in square brackets, using the conventions described in 1.4B5.'));
@@ -238,7 +239,6 @@
   {
     $this->resource->sourceStandard = 'RAD version Jul2008';
 
-    $this->eventComponent->resource = $this->resource;
     $this->eventComponent->processForm();
 
     $this->updateNotes();

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