element('genericElements/Form/genericForm', array( 'form' => $this->Form, 'data' => array( 'title' => $action === 'add' ? __('Add Attribute') : __('Edit Attribute'), 'model' => $modelForForm, 'fields' => array( array( 'field' => 'event_id', 'class' => 'org-id-picker-hidden-field', 'type' => 'text', 'hidden' => true ), array( 'field' => 'category', 'class' => 'input', 'empty' => __('(choose one)'), 'options' => $categories, 'stayInLine' => 1 ), array( 'field' => 'type', 'class' => 'input', 'empty' => __('(choose category first)'), 'options' => $types ), array( 'field' => 'distribution', 'class' => 'input', 'options' => $distributionLevels, 'default' => isset($attribute['Attribute']['distribution']) ? $attribute['Attribute']['distribution'] : $initialDistribution, 'stayInLine' => 1 ), array( 'field' => 'sharing_group_id', 'class' => 'input', 'options' => $sharingGroups, 'label' => __("Sharing Group") ), array( 'field'=> 'value', 'type' => 'textarea', 'class' => 'input span6', 'div' => 'input clear' ), array( 'field' => 'comment', 'type' => 'text', 'class' => 'input span6', 'div' => 'input clear', 'label' => __("Contextual Comment") ), array( 'field' => 'to_ids', 'type' => 'checkbox', 'label' => __("for Intrusion Detection System"), //'stayInLine' => 1 ), array( 'field' => 'batch_import', 'type' => 'checkbox' ), array( 'field' => 'disable_correlation', 'type' => 'checkbox' ), array( 'field' => 'first_seen', 'type' => 'text', 'hidden' => true ), array( 'field' => 'last_seen', 'type' => 'text', 'hidden' => true ), '
' ), 'submit' => array( 'action' => $action, 'ajaxSubmit' => sprintf( 'submitPopoverForm(%s, %s, 0, 1)', "'" . ($action == 'add' ? h($event_id) : h($attribute['Attribute']['id'])) . "'", "'" . h($action) . "'" ) ), 'metaFields' => array( '
' ) ) )); if (!$ajax) { echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'event-collection', 'menuItem' => $this->action === 'add' ? 'add' : 'editEvent')); } ?> element('form_seen_input'); ?> Js->writeBuffer(); // Write cached scripts