gestadieu / sfAdminThemejRollerPlugin

Symfony admin generator with jQuery UI Theme Roller integration
MIT License
24 stars 9 forks source link

batch delete not working #4

Open gestadieu opened 14 years ago

gestadieu commented 14 years ago

is it due to sf1.4 migration?

thibault commented 14 years ago

Hi ! I met this bug too. Here's a patch to solve the problem :

--- a/plugins/sfAdminThemejRollerPlugin/data/generator/sfDoctrineModule/jroller/template/templates/_list_batch_actions.php
+++ b/plugins/sfAdminThemejRollerPlugin/data/generator/sfDoctrineModule/jroller/template/templates/_list_batch_actions.php
@@ -6,7 +6,7 @@
       <?php echo $this->addCredentialCondition('<option value="'.$action.'">[?php echo __(\''.$params['label'].'\', array(), \'sf_admin\') ?]</option>', $params) ?
     <?php endforeach; ?>
   </select>
-  [?php $form = new sfForm(); if ($form->isCSRFProtected()): ?]
+  [?php $form = new BaseForm(); if ($form->isCSRFProtected()): ?]
     <input type="hidden" name="[?php echo $form->getCSRFFieldName() ?]" value="[?php echo $form->getCSRFToken() ?]" />
   [?php endif; ?
bkuberek commented 13 years ago

same here. Same fix.

bkuberek commented 13 years ago

in addition to the above:

--- a/data/generator/sfDoctrineModule/jroller/parts/batchAction.php
+++ b/data/generator/sfDoctrineModule/jroller/parts/batchAction.php
@@ -26,7 +26,7 @@
       $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_a
     }

-    $validator = new sfValidatorDoctrineChoice(array('model' => '<?php echo $this-
+    $validator = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' =
     try
     {
       // validate ids