mirror of https://github.com/MISP/MISP
fix: [event add view] Avoided setting the action variable
- That is available from the view side within $this->request->paramspull/5470/head
parent
28a2be67fc
commit
47540c206a
|
@ -2082,7 +2082,6 @@ class EventsController extends AppController
|
|||
if (isset($this->params['named']['extends'])) {
|
||||
$this->set('extends_uuid', $this->params['named']['extends']);
|
||||
}
|
||||
$this->set('action', 'add');
|
||||
}
|
||||
|
||||
public function addIOC($id)
|
||||
|
@ -2424,7 +2423,6 @@ class EventsController extends AppController
|
|||
$this->set('fieldDesc', $fieldDesc);
|
||||
$this->set('eventDescriptions', $this->Event->fieldDescriptions);
|
||||
$this->set('event', $this->Event->data);
|
||||
$this->set('action', 'edit');
|
||||
$this->render('add');
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
$modelForForm = 'Event';
|
||||
$action = $this->request->params['action'];
|
||||
echo $this->element('genericElements/Form/genericForm', array(
|
||||
'form' => $this->Form,
|
||||
'data' => array(
|
||||
|
@ -64,7 +65,7 @@
|
|||
)
|
||||
)
|
||||
));
|
||||
echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'event-collection', 'menuItem' => $this->action === 'add' ? 'add' : 'editEvent'));
|
||||
echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'event-collection', 'menuItem' => $action === 'add' ? 'add' : 'editEvent'));
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
Loading…
Reference in New Issue