From a6ffd686a5bfa03b54ce6bb7ae573f65a8d542a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 5 May 2009 22:20:40 +0200 Subject: [PATCH] Adds email_warning reminder. --- include/reminder/email_warning.inc.php | 24 ++++++++++++++++++++ templates/events/index.tpl | 15 ------------- templates/reminder/email_warning.tpl | 41 ++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 15 deletions(-) create mode 100644 templates/reminder/email_warning.tpl diff --git a/include/reminder/email_warning.inc.php b/include/reminder/email_warning.inc.php index 886ada8..4e6689f 100644 --- a/include/reminder/email_warning.inc.php +++ b/include/reminder/email_warning.inc.php @@ -19,5 +19,29 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ +class ReminderEmailWarning extends Reminder +{ + public function HandleAction($action) + { + if ($action == 'dismiss') { + $this->UpdateOnDismiss(); + } + } + + protected function GetDisplayText() {} + + public function Display(&$page) + { + header('Content-Type: text/html; charset=utf-8'); + $page->changeTpl('reminder/email_warning.tpl', NO_SKIN); + $page->assign('baseurl', $this->GetBaseUrl()); + } + + public static function IsCandidate(User &$user) + { + return count(S::v('mx_failures', array())) > 0; + } +} + // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?> diff --git a/templates/events/index.tpl b/templates/events/index.tpl index 03f96dd..8c0914a 100644 --- a/templates/events/index.tpl +++ b/templates/events/index.tpl @@ -57,21 +57,6 @@ Bienvenue {$smarty.session.prenom}{if $birthday} {/if} -{if $smarty.session.mx_failures|@count} -
- {icon name=error} Des problèmes sont actuellement recontrés sur tes redirections suivantes : - -
Gérer mes adresses de redirection
-
-{/if} - {if $fiche_incitation || $photo_incitation || ($geoloc_incitation > 0)}