From d46c76311c9c869219351c1dc941ac40a3ce78d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?=
 <marcosgdf@gmail.com>
Date: Fri, 20 Feb 2015 10:23:17 +0100
Subject: [PATCH] Correction

---
 htdocs/core/class/html.formmail.class.php | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 45e0aec2f65..7ffd535f0ec 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -255,6 +255,7 @@ class FormMail
         	if ($this->withform == 1)
         	{
         		$out.= '<form method="POST" name="mailform" enctype="multipart/form-data" action="'.$this->param["returnurl"].'">'."\n";
+				$out.= '<input style="display:none" type="submit" id="sendmail" name="sendmail">';
         		$out.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
         	}
         	foreach ($this->param as $key=>$value)
@@ -501,10 +502,6 @@ class FormMail
         		$out.= "</td></tr>\n";
         	}
 
-	        if ($this->withform == 1 || $this->withform == -1) {
-		        $out .= '<input style="display:none" type="submit" id="sendmail" name="sendmail">';
-	        }
-
         	// Attached files
         	if (! empty($this->withfile))
         	{
-- 
GitLab