From 029c405b7d2501194e58d43e2cb70d6cb4994d4b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 6 Nov 2011 00:14:08 +0100 Subject: [PATCH] Fix: hide edit in place icon if MAIN_EDIT_ALSO_INLINE is not defined --- htdocs/core/class/html.form.class.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4658c615b7d..b75f21603f8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -85,10 +85,17 @@ class Form if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) { - $tmp=explode(':',$typeofdata); - $ret.= "\n".'
'; - $ret.= $langs->trans($text); - $ret.= '
'."\n"; + if ($perm) + { + $tmp=explode(':',$typeofdata); + $ret.= '
'; + $ret.= $langs->trans($text); + $ret.= '
'."\n"; + } + else + { + $ret.= $langs->trans($text); + } } else { @@ -230,7 +237,7 @@ class Form } } - $out.= "\n".'
'; + $out.= '
'; $out.= $value; $out.= '
'."\n"; }