diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 785ada1429c..31c33de889b 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -1,7 +1,7 @@
* Copyright (C) 2010-2012 Regis Houssin
- * Copyright (C) 2010 Juanjo Menent
+ * Copyright (C) 2010-2018 Juanjo Menent
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -187,10 +187,12 @@ class FormActions
$urlbacktopage=$_SERVER['PHP_SELF'].'?id='.$object->id.($moreparambacktopage?'&'.$moreparambacktopage:'');
- $buttontoaddnewevent = '';
- $buttontoaddnewevent.= $langs->trans("AddEvent");
- $buttontoaddnewevent.= '';
- print load_fiche_titre($title, $buttontoaddnewevent, '');
+ if ($conf->agenda->enabled) {
+ $buttontoaddnewevent = '';
+ $buttontoaddnewevent.= $langs->trans("AddEvent");
+ $buttontoaddnewevent.= '';
+ }
+ print load_fiche_titre($title, $buttontoaddnewevent, '');
$page=0; $param=''; $sortfield='a.datep';