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
  results
pull/4969/head
chrisr3d 2019-08-08 15:50:09 +02:00
parent 2d55cd24a3
commit b532907cfb
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
3 changed files with 8 additions and 2 deletions

View File

@ -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'];

View File

@ -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

View File

@ -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';