Author: sevein
Date: Fri Aug 12 16:55:14 2011
New Revision: 9486
Log:
Add single fk_rightsholder to right component
Modified:
trunk/apps/qubit/modules/right/actions/editComponent.class.php
trunk/apps/qubit/modules/right/actions/indexAction.class.php
Modified: trunk/apps/qubit/modules/right/actions/editComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/right/actions/editComponent.class.php Fri Aug
12 16:54:07 2011 (r9485)
+++ trunk/apps/qubit/modules/right/actions/editComponent.class.php Fri Aug
12 16:55:14 2011 (r9486)
@@ -103,15 +103,14 @@
break;
case 'rightsHolder':
- // $this->form->setValidator('resource', new
sfValidatorBlacklist(array(
- // 'forbidden_values' =>
array($this->context->routing->generate(null, $this->resource)))));
- $this->form->setWidget('rightsHolder', new
sfWidgetFormSelect(array('choices' => array(), 'multiple' => true)));
+ $this->form->setValidator('rightsHolder', new sfValidatorString);
+ $this->form->setWidget('rightsHolder', new
sfWidgetFormSelect(array('choices' => array())));
break;
case 'copyrightJurisdiction':
- $this->form->setValidator('copyrightJurisdiction', new
sfValidatorI18nChoiceCountry(array('multiple' => true)));
- $this->form->setWidget('copyrightJurisdiction', new
sfWidgetFormI18nChoiceCountry(array('culture' =>
$this->context->user->getCulture(), 'multiple' => true)));
+ $this->form->setValidator('copyrightJurisdiction', new
sfValidatorI18nChoiceCountry);
+ $this->form->setWidget('copyrightJurisdiction', new
sfWidgetFormI18nChoiceCountry(array('culture' =>
$this->context->user->getCulture())));
break;
@@ -143,6 +142,7 @@
case 'act':
case 'basis':
case 'copyrightStatus':
+ case 'rightsHolder':
unset($this->right[$field->getName()]);
$value = $this->form->getValue($field->getName());
@@ -154,11 +154,6 @@
break;
- case 'rightsHolder':
-
-
- break;
-
default:
$this->right[$field->getName()] =
$this->form->getValue($field->getName());
}
Modified: trunk/apps/qubit/modules/right/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/right/actions/indexAction.class.php Fri Aug
12 16:54:07 2011 (r9485)
+++ trunk/apps/qubit/modules/right/actions/indexAction.class.php Fri Aug
12 16:55:14 2011 (r9486)
@@ -39,7 +39,11 @@
$value['endDate'] = Qubit::renderDate($this->resource->endDate);
- // TODO rightsholder multivalue
+
+ if (isset($this->resource->rightsHolder))
+ {
+ $value['rightsHolder'] = $this->context->routing->generate(null,
array($this->resource->rightsHolder, 'module' => 'rightsholder'));
+ }
if (isset($this->resource->rightNote))
{
--
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.