mirror of https://github.com/MISP/MISP
More UI changes
parent
2d507fb62d
commit
3549e0c49d
|
@ -1,3 +1,7 @@
|
|||
<?php
|
||||
$mayModify = (($isAclModify && $this->request->data['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $this->request->data['Event']['orgc'] == $me['org']));
|
||||
$mayPublish = ($isAclPublish && $this->request->data['Event']['orgc'] == $me['org']);
|
||||
?>
|
||||
<div class="events form">
|
||||
<?php echo $this->Form->create('Event');?>
|
||||
<fieldset>
|
||||
|
|
|
@ -20,8 +20,6 @@ $mayPublish = ($isAclPublish && $event['Event']['orgc'] == $me['org']);
|
|||
<?php if ( 0 == $event['Event']['published'] && ($isAdmin || $mayPublish)): ?>
|
||||
<li><?php echo $this->Form->postLink('Publish Event', array('action' => 'alert', $event['Event']['id']), null, 'Are you sure this event is complete and everyone should be informed?'); ?></li>
|
||||
<li><?php echo $this->Form->postLink('Publish (no email)', array('action' => 'publish', $event['Event']['id']), null, 'Publish but do NOT send alert email? Only for minor changes!'); ?></li>
|
||||
<?php elseif (0 == $event['Event']['published']): ?>
|
||||
<li>Not published</li>
|
||||
<?php else: ?>
|
||||
<!-- ul><li>Alert already sent</li></ul -->
|
||||
<?php endif; ?>
|
||||
|
@ -94,21 +92,21 @@ endif; ?>
|
|||
<?php echo h($analysisLevels[$event['Event']['analysis']]); ?>
|
||||
|
||||
</dd>
|
||||
<dt>Distribution</dt>
|
||||
<dd>
|
||||
<?php echo h($event['Event']['distribution'] . ', ' . strtolower(substr(($distributionDescriptions[$event['Event']['distribution']]['formdesc']), 0, 1)) . substr($distributionDescriptions[$event['Event']['distribution']]['formdesc'], 1) . '.'); ?>
|
||||
|
||||
</dd>
|
||||
<!-- dt>UUID</dt>
|
||||
<dt>Distribution</dt>
|
||||
<dd>
|
||||
<?php echo h($event['Event']['uuid']); ?>
|
||||
<?php echo h($event['Event']['distribution'] . ', ' . strtolower(substr(($distributionDescriptions[$event['Event']['distribution']]['formdesc']), 0, 1)) . substr($distributionDescriptions[$event['Event']['distribution']]['formdesc'], 1) . '.'); ?>
|
||||
|
||||
</dd -->
|
||||
</dd>
|
||||
<dt>Info</dt>
|
||||
<dd>
|
||||
<?php echo nl2br(h($event['Event']['info'])); ?>
|
||||
|
||||
</dd>
|
||||
<dt>Published</dt>
|
||||
<dd style = "color: red;">
|
||||
<b><?php echo ($event['Event']['published'] == 1 ? 'Yes' : 'No'); ?></b>
|
||||
|
||||
</dd>
|
||||
</dl><br />
|
||||
<?php
|
||||
if (!empty($relatedEvents)):?>
|
||||
|
|
|
@ -3,36 +3,62 @@
|
|||
<?php echo $this->Form->create('ShadowAttribute');?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add ShadowAttribute'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'between' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeCategoryDiv')),
|
||||
'empty' => '(choose one)'
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'after' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeCategoryDiv')),
|
||||
'empty' => '(choose one)',
|
||||
'div' => 'input'
|
||||
));
|
||||
echo $this->Form->input('type', array(
|
||||
'after' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeTypeDiv')),
|
||||
'empty' => '(first choose category)'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'input-xxlarge clear'
|
||||
));
|
||||
echo $this->Form->input('type', array(
|
||||
'between' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeTypeDiv')),
|
||||
'empty' => '(first choose category)'
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('batch_import', array(
|
||||
'type' => 'checkbox',
|
||||
'after' => $this->Html->div('forminfo', 'Create multiple attributes one per line'),
|
||||
));
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'checked' => true,
|
||||
'before' => $this->Html->div('forminfo', isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc']),
|
||||
'label' => 'IDS Signature?'
|
||||
));
|
||||
echo $this->Form->input('batch_import', array(
|
||||
'type' => 'checkbox',
|
||||
'after' => $this->Html->div('forminfo', 'Create multiple attributes one per line'),
|
||||
));
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
));
|
||||
|
||||
// link an onchange event to the form elements
|
||||
$this->Js->get('#ShadowAttributeCategory')->event('change', 'formCategoryChanged("#ShadowAttributeCategory")');
|
||||
$this->Js->get('#ShadowAttributeType')->event('change', 'showFormInfo("#ShadowAttributeType")');
|
||||
?>
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'checked' => true,
|
||||
'after' => $this->Html->div('forminfo', isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc']),
|
||||
'label' => 'IDS Signature?',
|
||||
));
|
||||
// link an onchange event to the form elements
|
||||
$this->Js->get('#ShadowAttributeCategory')->event('change', 'formCategoryChanged("#ShadowAttributeCategory")');
|
||||
$this->Js->get('#ShadowAttributeType')->event('change', 'showFormInfo("#ShadowAttributeType")');
|
||||
?>
|
||||
</fieldset>
|
||||
<?php echo $this->Form->end(__('Submit'));?>
|
||||
<?php
|
||||
echo $this->Form->button('Propose', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('View Event', array('controller' => 'events', 'action' => 'view', $this->request->data['ShadowAttribute']['event_id'])); ?> </li>
|
||||
<li class="active"><?php echo $this->Html->link('Propose Attribute', array('controller' => 'shadow_attributes', 'action' => 'add', $this->request->data['ShadowAttribute']['event_id']));?> </li>
|
||||
<li><?php echo $this->Html->link('Propose Attachment', array('controller' => 'shadow_attributes', 'action' => 'add_attachment', $this->request->data['ShadowAttribute']['event_id']));?> </li>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact reporter', array('controller' => 'events', 'action' => 'contact', $this->request->data['ShadowAttribute']['event_id'])); ?> </li>
|
||||
<li><?php echo $this->Html->link('Download as XML', array('controller' => 'events', 'action' => 'xml', 'download', $this->request->data['ShadowAttribute']['event_id'])); ?></li>
|
||||
<li><?php echo $this->Html->link('Download as IOC', array('controller' => 'events', 'action' => 'downloadOpenIOCEvent', $this->request->data['ShadowAttribute']['event_id'])); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('List Events', array('controller' => 'events', 'action' => 'index')); ?></li>
|
||||
<?php if ($isAclAdd): ?>
|
||||
<li><?php echo $this->Html->link('Add Event', array('controller' => 'events', 'action' => 'add')); ?></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//
|
||||
|
|
|
@ -2,25 +2,59 @@
|
|||
<?php echo $this->Form->create('ShadowAttribute', array('enctype' => 'multipart/form-data','onSubmit' => 'document.getElementById("ShadowAttributeMalware").removeAttribute("disabled");'));?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Attachment'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array('between' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeCategoryDiv'))));
|
||||
echo $this->Form->file('value', array(
|
||||
'error' => array('escape' => false),
|
||||
));
|
||||
echo $this->Form->input('malware', array(
|
||||
'type' => 'checkbox',
|
||||
'checked' => false,
|
||||
'after' => '<br>Tick this box to neutralize the sample. Every malware sample will be zipped with the password "infected"',
|
||||
));
|
||||
// link an onchange event to the form elements
|
||||
$this->Js->get('#ShadowAttributeType')->event('change', 'showFormInfo("#ShadowAttributeType")');
|
||||
$this->Js->get('#ShadowAttributeCategory')->event('change', 'showFormInfo("#ShadowAttributeCategory")');
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'after' => $this->Html->div('forminfo', '', array('id' => 'ShadowAttributeCategoryDiv')),
|
||||
'empty' => '(choose one)',
|
||||
'div' => 'input'
|
||||
));
|
||||
?>
|
||||
<div class="input clear">
|
||||
<?php
|
||||
echo $this->Form->file('value', array(
|
||||
'error' => array('escape' => false),
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
<div class="input clear"><br /></div>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('malware', array(
|
||||
'type' => 'checkbox',
|
||||
'checked' => false,
|
||||
));
|
||||
?>
|
||||
<div class="forminfo input clear">
|
||||
Tick this box to neutralize the sample. Every malware sample will be zipped with the password "infected"
|
||||
</div>
|
||||
<?php
|
||||
// link an onchange event to the form elements
|
||||
$this->Js->get('#ShadowAttributeType')->event('change', 'showFormInfo("#ShadowAttributeType")');
|
||||
$this->Js->get('#ShadowAttributeCategory')->event('change', 'showFormInfo("#ShadowAttributeCategory")');
|
||||
?>
|
||||
</fieldset>
|
||||
<?php echo $this->Form->end(__('Upload'));?>
|
||||
<?php
|
||||
echo $this->Form->button('Propose', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<ul class="nav nav-list">
|
||||
<li><?php echo $this->Html->link('View Event', array('controller' => 'events', 'action' => 'view', $this->request->data['ShadowAttribute']['event_id'])); ?> </li>
|
||||
<li><?php echo $this->Html->link('Propose Attribute', array('controller' => 'shadow_attributes', 'action' => 'add', $this->request->data['ShadowAttribute']['event_id']));?> </li>
|
||||
<li class="active"><?php echo $this->Html->link('Propose Attachment', array('controller' => 'shadow_attributes', 'action' => 'add_attachment', $this->request->data['ShadowAttribute']['event_id']));?> </li>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('Contact reporter', array('controller' => 'events', 'action' => 'contact', $this->request->data['ShadowAttribute']['event_id'])); ?> </li>
|
||||
<li><?php echo $this->Html->link('Download as XML', array('controller' => 'events', 'action' => 'xml', 'download', $this->request->data['ShadowAttribute']['event_id'])); ?></li>
|
||||
<li><?php echo $this->Html->link('Download as IOC', array('controller' => 'events', 'action' => 'downloadOpenIOCEvent', $this->request->data['ShadowAttribute']['event_id'])); ?> </li>
|
||||
<li class="divider"></li>
|
||||
<li><?php echo $this->Html->link('List Events', array('controller' => 'events', 'action' => 'index')); ?></li>
|
||||
<?php if ($isAclAdd): ?>
|
||||
<li><?php echo $this->Html->link('Add Event', array('controller' => 'events', 'action' => 'add')); ?></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var formInfoValues = new Array();
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue