diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index ef031f479..135174e1d 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -2094,11 +2094,11 @@ $(document).ready(function() {
*
* @param object $attribute attribute
*/
- protected function printAttributeValue($attribute) { /* {{{ */
- echo self::getAttributeValue($attribute);
+ protected function printAttributeValue($attribute, $noecho=false) { /* {{{ */
+ echo self::getAttributeValue($attribute, $noecho);
} /* }}} */
- function getAttributeValue($attribute) { /* {{{ */
+ function getAttributeValue($attribute, $noecho=false) { /* {{{ */
$dms = $this->params['dms'];
$attrdef = $attribute->getAttributeDefinition();
switch($attrdef->getType()) {
@@ -2108,7 +2108,7 @@ $(document).ready(function() {
foreach($attrs as $attr) {
$tmp[] = ''.htmlspecialchars($attr).'';
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_email:
$attrs = $attribute->getValueAsArray();
@@ -2116,7 +2116,7 @@ $(document).ready(function() {
foreach($attrs as $attr) {
$tmp[] = ''.htmlspecialchars($attr).'';
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_folder:
$attrs = $attribute->getValueAsArray();
@@ -2125,7 +2125,7 @@ $(document).ready(function() {
if ($targetfolder)
$tmp[] = ''.htmlspecialchars($targetfolder->getName()).'';
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_document:
$attrs = $attribute->getValueAsArray();
@@ -2134,7 +2134,7 @@ $(document).ready(function() {
if ($targetdoc)
$tmp[] = ''.htmlspecialchars($targetdoc->getName()).'';
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_user:
$attrs = $attribute->getValueAsArray();
@@ -2143,7 +2143,7 @@ $(document).ready(function() {
if ($curuser)
$tmp[] = htmlspecialchars($curuser->getFullname()." (".$curuser->getLogin().")");
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_group:
$attrs = $attribute->getValueAsArray();
@@ -2152,7 +2152,7 @@ $(document).ready(function() {
if ($curgroup)
$tmp[] = htmlspecialchars($curgroup->getName());
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_date:
$attrs = $attribute->getValueAsArray();
@@ -2160,11 +2160,15 @@ $(document).ready(function() {
foreach($attrs as $attr) {
$tmp[] = getReadableDate($attr);
}
- return implode(', ', $tmp);
+ $content = implode(', ', $tmp);
break;
default:
- return htmlspecialchars(implode(', ', $attribute->getValueAsArray()));
+ $content = htmlspecialchars(implode(', ', $attribute->getValueAsArray()));
}
+ if($noecho)
+ return $content;
+ else
+ echo $content;
} /* }}} */
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='', $alwaysmultiple=false) { /* {{{ */
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 515556846..0b4740506 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -2042,11 +2042,11 @@ $(document).ready(function() {
*
* @param object $attribute attribute
*/
- protected function printAttributeValue($attribute) { /* {{{ */
- echo self::getAttributeValue($attribute);
+ protected function printAttributeValue($attribute, $noecho=false) { /* {{{ */
+ echo self::getAttributeValue($attribute, $noecho);
} /* }}} */
- function getAttributeValue($attribute) { /* {{{ */
+ function getAttributeValue($attribute, $noecho=false) { /* {{{ */
$dms = $this->params['dms'];
$attrdef = $attribute->getAttributeDefinition();
switch($attrdef->getType()) {
@@ -2056,7 +2056,7 @@ $(document).ready(function() {
foreach($attrs as $attr) {
$tmp[] = ''.htmlspecialchars($attr).'';
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_email:
$attrs = $attribute->getValueAsArray();
@@ -2064,7 +2064,7 @@ $(document).ready(function() {
foreach($attrs as $attr) {
$tmp[] = ''.htmlspecialchars($attr).'';
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_folder:
$attrs = $attribute->getValueAsArray();
@@ -2073,7 +2073,7 @@ $(document).ready(function() {
if ($targetfolder)
$tmp[] = ''.htmlspecialchars($targetfolder->getName()).'';
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_document:
$attrs = $attribute->getValueAsArray();
@@ -2082,7 +2082,7 @@ $(document).ready(function() {
if ($targetdoc)
$tmp[] = ''.htmlspecialchars($targetdoc->getName()).'';
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_user:
$attrs = $attribute->getValueAsArray();
@@ -2091,7 +2091,7 @@ $(document).ready(function() {
if ($curuser)
$tmp[] = htmlspecialchars($curuser->getFullname()." (".$curuser->getLogin().")");
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_group:
$attrs = $attribute->getValueAsArray();
@@ -2100,7 +2100,7 @@ $(document).ready(function() {
if ($curgroup)
$tmp[] = htmlspecialchars($curgroup->getName());
}
- return implode('
', $tmp);
+ $content = implode('
', $tmp);
break;
case SeedDMS_Core_AttributeDefinition::type_date:
$attrs = $attribute->getValueAsArray();
@@ -2108,11 +2108,15 @@ $(document).ready(function() {
foreach($attrs as $attr) {
$tmp[] = getReadableDate($attr);
}
- return implode(', ', $tmp);
+ $content = implode(', ', $tmp);
break;
default:
- return htmlspecialchars(implode(', ', $attribute->getValueAsArray()));
+ $content = htmlspecialchars(implode(', ', $attribute->getValueAsArray()));
}
+ if($noecho)
+ return $content;
+ else
+ echo $content;
} /* }}} */
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='', $alwaysmultiple=false) { /* {{{ */