new: [metafields] added view representation of info/warning/danger keys
parent
d43e7c6c22
commit
c44e1a8418
|
@ -27,4 +27,9 @@ if (!empty($field['url'])) {
|
|||
} else if (empty($field['raw'])) {
|
||||
$string = h($string);
|
||||
}
|
||||
foreach (['info', 'warning', 'danger'] as $message_type) {
|
||||
if (!empty($field[$message_type])) {
|
||||
$string .= sprintf(' (<span class="text-%s">%s</span>)', $message_type, $field[$message_type]);
|
||||
}
|
||||
}
|
||||
echo $string;
|
||||
|
|
|
@ -17,7 +17,10 @@ foreach($data['MetaTemplates'] as $metaTemplate) {
|
|||
foreach ($metaTemplateField->metaFields as $metaField) {
|
||||
$fields[] = [
|
||||
'key' => !$labelPrintedOnce ? $metaField->field : '',
|
||||
'raw' => $metaField->value
|
||||
'raw' => $metaField->value,
|
||||
'warning' => $metaField->warning ?? null,
|
||||
'info' => $metaField->info ?? null,
|
||||
'danger' => $metaField->danger ?? null
|
||||
];
|
||||
$labelPrintedOnce = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue