From 1c1f2c024210b5752a431b30a479a4fb9764ed88 Mon Sep 17 00:00:00 2001 From: efalcy <efalcy@afi-sa.fr> Date: Tue, 25 Oct 2016 11:26:00 +0200 Subject: [PATCH] hotline #49590 : fix send link --- application/modules/admin/controllers/NewsletterController.php | 2 +- application/modules/admin/views/scripts/newsletter/index.phtml | 2 +- .../modules/admin/controllers/NewsletterControllerTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/modules/admin/controllers/NewsletterController.php b/application/modules/admin/controllers/NewsletterController.php index ebe10fa3a55..08c7e239fb2 100644 --- a/application/modules/admin/controllers/NewsletterController.php +++ b/application/modules/admin/controllers/NewsletterController.php @@ -44,7 +44,7 @@ class Admin_NewsletterController extends ZendAfi_Controller_Action { return $this->view->tag('span', $this->view->boutonIco("picto=users", "bulle=" . $this->_('Inscrits')) . $model->getNumberOfUsers(), ['style' => 'white-space:nowrap']); }], ['action' => 'sendtest', 'content' => $this->view->boutonIco('type=test')], - ['action' => 'sendnewsletter', 'content' => $this->view->boutonIco('type=mail')], + ['action' => 'send', 'content' => $this->view->boutonIco('type=mail')], ['action' => 'duplicate', 'content' => $this->view->boutonIco('type=duplicate')], ['action' => 'delete', 'content' => $this->view->boutonIco('type=del')], ], diff --git a/application/modules/admin/views/scripts/newsletter/index.phtml b/application/modules/admin/views/scripts/newsletter/index.phtml index 48a8e4c198a..328a468aec8 100644 --- a/application/modules/admin/views/scripts/newsletter/index.phtml +++ b/application/modules/admin/views/scripts/newsletter/index.phtml @@ -27,6 +27,6 @@ function sendNewsletterClick(event) { } $(document).ready(function() { - $("a[rel='sendnewsletter']").click(sendNewsletterClick); + $("a[rel='send']").click(sendNewsletterClick); }); </script> diff --git a/tests/application/modules/admin/controllers/NewsletterControllerTest.php b/tests/application/modules/admin/controllers/NewsletterControllerTest.php index b0d4e91b162..15cf4e26f4a 100644 --- a/tests/application/modules/admin/controllers/NewsletterControllerTest.php +++ b/tests/application/modules/admin/controllers/NewsletterControllerTest.php @@ -160,7 +160,7 @@ class Admin_NewsletterControllerIndexActionTest extends Admin_NewsletterControll public function testSendNouveautesClassiqueLink() { - $this->assertXPath("//a[@href='/admin/newsletter/send/id/1']"); + $this->assertXPath("//a[@href='/admin/newsletter/send/id/1'][@rel='sendnewsletter']", $this->_response->getBody()); } -- GitLab