mirror of https://github.com/MISP/MISP
fix: [enrichment] Handling correctly comments at objects level
- Objects level comments were displayed but not handled at the end, they are now displayed, users can modify them as comments at attributes level, and they are handled then with the saved resultspull/4969/head
parent
2d55cd24a3
commit
b532907cfb
|
@ -6244,6 +6244,9 @@ class Event extends AppModel
|
|||
$object['meta-category'] = $object['meta_category'];
|
||||
unset($object['meta_category']);
|
||||
}
|
||||
if (empty($object['comment'])) {
|
||||
$object['comment'] = $default_comment;
|
||||
}
|
||||
$object['event_id'] = $id;
|
||||
if (isset($object['id']) && $object['id'] == $initial_object_id) {
|
||||
$initial_object = $resolved_data['initialObject'];
|
||||
|
|
|
@ -167,7 +167,9 @@
|
|||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="ObjectComment shortish"><?php echo (!empty($object['comment']) ? h($object['comment']) : ''); ?></td>
|
||||
<td class="short">
|
||||
<input type="text" class="ObjectComment" style="padding:0px;height:20px;margin-bottom:0px;" placeholder="<?php echo h($importComment); ?>" <?php if (!empty($object['comment'])) echo 'value="' . h($object['comment']) . '"';?>/>
|
||||
</td>
|
||||
<td style="width:60px;text-align:center;">
|
||||
<select class="ObjectDistribution" style="padding:0px;height:20px;margin-bottom:0px;">
|
||||
<?php
|
||||
|
|
|
@ -2493,7 +2493,8 @@ function moduleResultsSubmit(id) {
|
|||
name: $(this).find('.ObjectName').text(),
|
||||
meta_category: $(this).find('.ObjectMetaCategory').text(),
|
||||
distribution: $(this).find('.ObjectDistribution').val(),
|
||||
sharing_group_id: $(this).find('.ObjectSharingGroup').val()
|
||||
sharing_group_id: $(this).find('.ObjectSharingGroup').val(),
|
||||
comment: $(this).find('.ObjectComment').val()
|
||||
}
|
||||
if (temp['distribution'] != '4') {
|
||||
temp['sharing_group_id'] = '0';
|
||||
|
|
Loading…
Reference in New Issue