Skip to content
Snippets Groups Projects
Commit c90757a6 authored by Sebastien ANDRE's avatar Sebastien ANDRE
Browse files

hotline : #192556 : missing param delete

parent edb8bb0b
Branches
Tags
1 merge request!4940hotline : #192556 : missing param delete
Pipeline #31084 passed with stage
in 44 minutes and 29 seconds
- correctif #192556 : Abonné : La suppression d'une notice d'un panier est maintenant effective.
\ No newline at end of file
......@@ -25,12 +25,13 @@ class Intonation_Library_View_Wrapper_RecordInSelection
protected $_selection;
public function setSelection($selection) {
$this->_selection = $selection;
return $this;
}
public function getActions() : array {
if ( ! $this->_selection)
return [];
......@@ -39,7 +40,8 @@ class Intonation_Library_View_Wrapper_RecordInSelection
->setUrl($this->_view->url(['controller' => 'abonne',
'action' => 'supprimer-de-la-selection',
'selection_id' => $this->_selection->getId(),
'record_id' => $this->_model->getId()]))
'record_id' => $this->_model->getId(),
'delete' => true]))
->setImage($this->getIco('delete', 'utils'))
->setText($this->_('Supprimer'))
->setTitle($this->_('Supprimer le document %s de la sélection %s',
......
......@@ -331,6 +331,16 @@ class TemplatesAbonneSelectionsAjouterLeDocumentALaSelectionTest
$this->dispatch('/opac/abonne/ajouter-le-document-a-la-selection/selection_label/Déjà lu/id_profil/72/record_id/89/render/popup');
$this->assertXPathContentContains('//script', 'location.reload();');
}
/**
* @test
* @see : https://forge.afi-sa.net/issues/192556
*/
public function removeRecordFromCardShouldExistsWithParamDelete() {
$this->dispatch('/opac/abonne/selection/id_profil/72/selection_id/2');
$this->assertXPath('//div[contains(@class, "card_action")]/a[contains(@href, "abonne/supprimer-de-la-selection/id_profil/72/selection_id/2/record_id/456/delete/1")]');
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment