Author: jablko
Date: Tue Oct 19 17:00:01 2010
New Revision: 8321
Log:
Use "type" field from base component
Modified:
trunk/apps/qubit/modules/informationobject/actions/eventComponent.class.php
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/actions/eventComponent.class.php
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/_event.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/eventComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/eventComponent.class.php
Tue Oct 19 16:55:14 2010 (r8320)
+++ trunk/apps/qubit/modules/informationobject/actions/eventComponent.class.php
Tue Oct 19 17:00:01 2010 (r8321)
@@ -31,12 +31,12 @@
public static
$NAMES = array(
'actor',
- 'type',
- 'place',
- 'startDate',
- 'endDate',
'dateDisplay',
- 'description');
+ 'endDate',
+ 'startDate',
+ 'description',
+ 'place',
+ 'type');
protected function addField($name)
{
Modified:
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/actions/eventComponent.class.php
==============================================================================
---
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/actions/eventComponent.class.php
Tue Oct 19 16:55:14 2010 (r8320)
+++
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/actions/eventComponent.class.php
Tue Oct 19 17:00:01 2010 (r8321)
@@ -17,38 +17,16 @@
* along with Qubit Toolkit. If not, see <http://www.gnu.org/licenses/>.
*/
-class sfIsadPluginEventComponent extends EventEditComponent
+class sfIsadPluginEventComponent extends InformationObjectEventComponent
{
// Arrays not allowed in class constants
public static
$NAMES = array(
- 'typeId',
+ 'type',
'startDate',
'endDate',
'dateDisplay');
- protected function addField($name)
- {
- switch ($name)
- {
- case 'typeId':
-
- foreach (sfIsadPlugin::eventTypes() as $item)
- {
- $choices[$item->id] = $item->__toString();
- }
-
- $this->form->setValidator('typeId', new sfValidatorString);
- $this->form->setWidget('typeId', new
sfWidgetFormSelect(array('choices' => $choices)));
-
- break;
-
- default:
-
- return parent::addField($name);
- }
- }
-
/**
* ISAD form only allows entering data for creation dates and creator names,
* as two separate events.
Modified: trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/_event.php
==============================================================================
--- trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/_event.php
Tue Oct 19 16:55:14 2010 (r8320)
+++ trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/_event.php
Tue Oct 19 17:00:01 2010 (r8321)
@@ -27,7 +27,7 @@
<td>
<div class="animateNicely">
<input type="hidden" name="editEvents[<?php echo $i ?>][id]"
value="<?php echo $item->id ?>"/>
- <?php echo $form->getWidgetSchema()->renderField('typeId',
$item->typeId) ?>
+ <?php echo $form->getWidgetSchema()->renderField('type',
$item->type) ?>
</div>
</td><td>
<div class="animateNicely">
@@ -55,7 +55,7 @@
<tr>
<td>
<div class="animateNicely">
- <?php echo $form->typeId ?>
+ <?php echo $form->type ?>
</div>
</td><td>
<?php echo $form->startDate ?>
--
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.