Author: jablko
Date: Sat Oct 10 17:38:34 2009
New Revision: 3720
Log:
Use sfValidatorChoice for scripts, sanitizes data and fixes issue 1001
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
Sat Oct 10 17:26:35 2009 (r3719)
+++ trunk/apps/qubit/modules/informationobject/actions/editAction.class.php
Sat Oct 10 17:38:34 2009 (r3720)
@@ -150,9 +150,10 @@
case 'script':
case 'scriptOfDescription':
$this->form->setDefault($name, $this->informationObject[$name]);
- $this->form->setValidator($name, new sfValidatorPass);
$c = sfCultureInfo::getInstance($this->context->user->getCulture());
+
+ $this->form->setValidator($name, new sfValidatorChoice(array('choices'
=> array_keys($c->getScripts()), 'multiple' => true)));
$this->form->setWidget($name, new sfWidgetFormSelect(array('choices'
=> $c->getScripts(), 'multiple' => true)));
break;
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---