From: Stéphane Jacob Date: Tue, 5 May 2009 20:20:40 +0000 (+0200) Subject: Adds email_warning reminder. X-Git-Tag: xorg/0.10.1~98 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=a6ffd686a5bfa03b54ce6bb7ae573f65a8d542a1;p=platal.git Adds email_warning reminder. --- 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)}