Author: jablko
Date: Thu Sep 24 14:46:11 2009
New Revision: 3512
Log:
Process parent field
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Thu Sep 24 14:44:19 2009 (r3511)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Thu Sep 24 14:46:11 2009 (r3512)
@@ -148,6 +148,12 @@
{
switch ($field->getName())
{
+ case 'parent':
+ $params =
$this->context->routing->parse(preg_replace('/.*'.preg_quote($this->request->getPathInfoPrefix(),
'/').'/', null, $this->form->getValue('parent')));
+ $this->informationObject['parentId'] = $params['id'];
+
+ break;
+
case 'descriptionDetail':
case 'descriptionStatus':
case 'repository':
@@ -215,6 +221,11 @@
$this->form->setValidator('serialNumber', new sfValidatorInteger);
$this->form->setWidget('serialNumber', new sfWidgetFormInputHidden);
}
+ else
+ {
+ $this->form->setValidator('parent', new sfValidatorString);
+ $this->form->setWidget('parent', new sfWidgetFormInputHidden);
+ }
// HACK: Use static::$NAMES in PHP 5.3,
// http://php.net/oop5.late-static-bindings
@@ -262,6 +273,7 @@
}
}
+ $this->form->bind($request->getGetParameters());
if ($request->isMethod('post'))
{
$this->form->bind($request->getPostParameters());
--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---