From dc5f2f5bbf318f7a782feb0495e93dd90217ed98 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 19 Oct 2018 21:31:13 +0200 Subject: [PATCH] fix for links --- lam/lib/html.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lam/lib/html.inc b/lam/lib/html.inc index 095aea8a..3fd87278 100644 --- a/lam/lib/html.inc +++ b/lam/lib/html.inc @@ -3153,9 +3153,13 @@ class htmlLink extends htmlElement { * @return array List of input field names and their type (name => type) */ function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) { + $text = $this->getContent(); $image = ''; if ($this->image != null) { - $image = '' . $this->getAlt() . ' '; + $image = '' . $this->getAlt() . ''; + if (!empty($text)) { + $image .= ' '; + } } $title = ''; if ($this->title != null) { @@ -3178,7 +3182,7 @@ class htmlLink extends htmlElement { if (sizeof($this->cssClasses) > 0) { $classAttr = ' class="' . implode(' ', $this->cssClasses) . '"'; } - echo '' . $image . $this->getContent() . ''; + echo '' . $image . $text . ''; if ($this->showAsButton) { echo '