diff --git a/lam/lib/html.inc b/lam/lib/html.inc
index e7aa321d..5fd072b2 100644
--- a/lam/lib/html.inc
+++ b/lam/lib/html.inc
@@ -2312,6 +2312,8 @@ class htmlLink extends htmlElement {
private $targetWindow = null;
/** onClick event */
private $onClick = null;
+ /** show as button */
+ private $showAsButton = false;
/**
* Constructor.
@@ -2319,11 +2321,13 @@ class htmlLink extends htmlElement {
* @param String $text label
* @param String $target target URL
* @param String $image URL of optional image
+ * @param boolean $showAsButton shows this like as a button
*/
- function __construct($text, $target, $image = null) {
+ function __construct($text, $target, $image = null, $showAsButton = false) {
$this->text = htmlspecialchars($text);
$this->target = htmlspecialchars($target);
$this->image = htmlspecialchars($image);
+ $this->showAsButton = $showAsButton;
}
/**
@@ -2354,7 +2358,19 @@ class htmlLink extends htmlElement {
if ($this->onClick != null) {
$onClick = ' onclick="' . $this->onClick . '"';
}
- echo '' . $image . $this->text . '';
+ $idAttr = '';
+ if ($this->showAsButton) {
+ $id = 'a_' . preg_replace('/[^a-zA-Z0-9_]+/', '_', $this->target);
+ $idAttr = ' id="' . $id . '"';
+ }
+ echo '' . $image . $this->text . '';
+ if ($this->showAsButton) {
+ echo '';
+ }
return array();
}
diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php
index bcc2411e..6fdd68c8 100644
--- a/lam/templates/masscreate.php
+++ b/lam/templates/masscreate.php
@@ -245,7 +245,7 @@ function showMainPage($scope, $selectedModules) {
$inputContainer->addElement(new htmlOutputText(_("CSV file")));
$inputContainer->addElement(new htmlInputFileUpload('inputfile'));
$inputContainer->addElement(new htmlSpacer('10px', null));
- $inputContainer->addElement(new htmlLink(_("Download sample CSV file"), 'masscreate.php?getCSV=1'));
+ $inputContainer->addElement(new htmlLink(_("Download sample CSV file"), 'masscreate.php?getCSV=1', '../graphics/save.png', true));
$inputContainer->addElement(new htmlHiddenInput('scope', $scope));
$inputContainer->addElement(new htmlHiddenInput('selectedModules', implode(',', $selectedModules)), true);
// PDF