fix for links
This commit is contained in:
parent
9dffa0ed12
commit
dc5f2f5bbf
|
@ -3153,9 +3153,13 @@ class htmlLink extends htmlElement {
|
||||||
* @return array List of input field names and their type (name => type)
|
* @return array List of input field names and their type (name => type)
|
||||||
*/
|
*/
|
||||||
function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
|
function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
|
||||||
|
$text = $this->getContent();
|
||||||
$image = '';
|
$image = '';
|
||||||
if ($this->image != null) {
|
if ($this->image != null) {
|
||||||
$image = '<img class="align-middle" src="' . $this->image . '" alt="' . $this->getAlt() . '"> ';
|
$image = '<img class="align-middle" src="' . $this->image . '" alt="' . $this->getAlt() . '">';
|
||||||
|
if (!empty($text)) {
|
||||||
|
$image .= ' ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$title = '';
|
$title = '';
|
||||||
if ($this->title != null) {
|
if ($this->title != null) {
|
||||||
|
@ -3178,7 +3182,7 @@ class htmlLink extends htmlElement {
|
||||||
if (sizeof($this->cssClasses) > 0) {
|
if (sizeof($this->cssClasses) > 0) {
|
||||||
$classAttr = ' class="' . implode(' ', $this->cssClasses) . '"';
|
$classAttr = ' class="' . implode(' ', $this->cssClasses) . '"';
|
||||||
}
|
}
|
||||||
echo '<a href="' . $this->target . '"' . $idAttr . $classAttr . $title . $targetWindow . $onClick . '>' . $image . $this->getContent() . '</a>';
|
echo '<a href="' . $this->target . '"' . $idAttr . $classAttr . $title . $targetWindow . $onClick . '>' . $image . $text . '</a>';
|
||||||
if ($this->showAsButton) {
|
if ($this->showAsButton) {
|
||||||
echo '<script type="text/javascript">';
|
echo '<script type="text/javascript">';
|
||||||
echo ' jQuery(document).ready(function() {';
|
echo ' jQuery(document).ready(function() {';
|
||||||
|
|
Loading…
Reference in New Issue