mirror of https://github.com/MISP/MISP
fix: [event:view] Correctly display `Edit Event` when Editing instead of
`Add Event`pull/5445/head
parent
3d1b8e9c9a
commit
adb83afe73
|
@ -2082,6 +2082,7 @@ 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)
|
||||
|
@ -2423,6 +2424,7 @@ 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');
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
echo $this->element('genericElements/Form/genericForm', array(
|
||||
'form' => $this->Form,
|
||||
'data' => array(
|
||||
'title' => __('Add Event'),
|
||||
'title' => $action === 'add' ? __('Add Event') : __('Edit Event'),
|
||||
'model' => $modelForForm,
|
||||
'fields' => array(
|
||||
array(
|
||||
|
|
Loading…
Reference in New Issue