Merge branch 'hotfix/4.0.4'

This commit is contained in:
yuri
2016-03-23 16:57:33 +02:00
4 changed files with 21 additions and 5 deletions
@@ -75,17 +75,26 @@ class Invitations
$key = '{'.$field.'}';
switch ($d['type']) {
case 'datetime':
$contents = str_replace($key, $this->dateTime->convertSystemDateTime($entity->get($field)), $contents);
$value = $entity->get($field);
if ($value) {
$contents = str_replace($key, $this->dateTime->convertSystemDateTime($value), $contents);
}
break;
case 'date':
$contents = str_replace($key, $this->dateTime->convertSystemDate($entity->get($field)), $contents);
$value = $entity->get($field);
if ($value) {
$contents = str_replace($key, $this->dateTime->convertSystemDate($value), $contents);
}
break;
case 'jsonArray':
break;
case 'jsonObject':
break;
default:
$contents = str_replace($key, $entity->get($field), $contents);
$value = $entity->get($field);
if (is_string($value) || $value === null || is_scalar($value) || is_callable([$value, '__toString'])) {
$contents = str_replace($key, $value, $contents);
}
}
}
+3 -1
View File
@@ -192,7 +192,9 @@ class EmailTemplate extends Record
$value = $this->getDateTime()->convertSystemDateTime($value);
}
}
$text = str_replace('{' . $type . '.' . $field . '}', $value, $text);
if (is_string($value) || $value === null || is_scalar($value) || is_callable([$value, '__toString'])) {
$text = str_replace('{' . $type . '.' . $field . '}', $value, $text);
}
}
return $text;
}
+1 -1
View File
@@ -1,3 +1,3 @@
{{#if value}}
<a href="{{url}}" target="_blank">{{value}}</a>
<a href="{{url}}" target="_blank" title="{{value}}">{{value}}</a>
{{/if}}
+5
View File
@@ -275,6 +275,11 @@ ul.dropdown-menu > li.checkbox:last-child {
margin: 0 20px;
}
.cell > .field {
overflow-wrap: break-word;
word-wrap: break-word;
}
.field .row {
margin-left: -5px !important;
margin-right: -5px !important;