Bonjour,
Le code de votre bouton doit etre comme cela :
PHP Code:
array('customCode'=>'<input title="Export de cibles" class="button" name="exportftp" onclick="this.form.return_module.value=\'ProspectLists\'; this.form.return_action.value=\'index\';this.form.action.value=\'custom_export\';" type="submit" value="Export des cibles">'),
Il vous faut modifier votre script custom_export dans le controller.
Vous avez deux solutions:
- A la fin de votre action vous pouvez ajouter cela :
PHP Code:
$urlSTR = 'index.php?module=' . $_REQUEST['return_module'];
if(!empty($_REQUEST['return_id']))$urlSTR .='&record='.$_REQUEST['return_id'];
if(!empty($_REQUEST['return_action']))$urlSTR .='&action='.$_REQUEST['return_action'];
header("Location: $urlSTR");
- A la fin de votre action vous pouvez ajouter cela :
PHP Code:
$this->action =$_REQUEST['return_action'];
$this->module = $_REQUEST['return_module'];
$this->process();
return false;
Bookmarks