mirror of https://github.com/MISP/MISP
chg: [boolean] field added to the single view fields
parent
d6c4e693ce
commit
a8addc3378
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
$value = Hash::extract($data, $field['path']);
|
||||
echo sprintf(
|
||||
'<i class="fas fa-%s"></i>',
|
||||
empty($value[0]) ? 'times' : 'check'
|
||||
);
|
||||
$value = Hash::extract($data, $field['path'])[0];
|
||||
$mapping = !empty($field['mapping']) ? $field['mapping'] : [
|
||||
false => '<i class="fas fa-times"></i>',
|
||||
true => '<i class="fas fa-check"></i>'
|
||||
];
|
||||
echo $mapping[(bool)$value];
|
||||
|
|
Loading…
Reference in New Issue