Author: sevein
Date: Wed Aug 17 15:51:55 2011
New Revision: 9527
Log:
Fix editRightComponent delete action when multiple dialogs in the same form
Modified:
trunk/apps/qubit/modules/right/actions/editComponent.class.php
trunk/apps/qubit/modules/right/templates/_edit.php
Modified: trunk/apps/qubit/modules/right/actions/editComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/right/actions/editComponent.class.php Wed Aug
17 15:50:41 2011 (r9526)
+++ trunk/apps/qubit/modules/right/actions/editComponent.class.php Wed Aug
17 15:51:55 2011 (r9527)
@@ -227,9 +227,19 @@
return;
}
- if (isset($this->request->deleteRights))
+ if (isset($this->nameFormat))
+ {
+ preg_match('/\d+/', $this->nameFormat, $usageId);
+ $deleteRights = $this->request['deleteRights_'.$usageId[0]];
+ }
+ else
+ {
+ $deleteRights = $this->request->deleteRights;
+ }
+
+ if (isset($deleteRights))
{
- foreach ($this->request->deleteRights as $item)
+ foreach ($deleteRights as $item)
{
$params = $this->context->routing->parse(Qubit::pathInfo($item));
$params['_sf_route']->resource->delete();
Modified: trunk/apps/qubit/modules/right/templates/_edit.php
==============================================================================
--- trunk/apps/qubit/modules/right/templates/_edit.php Wed Aug 17 15:50:41
2011 (r9526)
+++ trunk/apps/qubit/modules/right/templates/_edit.php Wed Aug 17 15:51:55
2011 (r9527)
@@ -39,7 +39,7 @@
</td><td>
<?php echo $item->object->endDate ?>
</td><td style="text-align: center">
- <input class="multiDelete" name="deleteRights[]" type="checkbox"
value="<?php echo url_for(array($item->object, 'module' => 'right')) ?>"/>
+ <input class="multiDelete" name="deleteRights<?php echo $suffix
?>[]" type="checkbox" value="<?php echo url_for(array($item->object, 'module'
=> 'right')) ?>"/>
</td>
</tr>
<?php endforeach; ?>
--
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.