diff --git a/app/View/Attributes/add.ctp b/app/View/Attributes/add.ctp index a7c28f5c3..ff10e3f44 100755 --- a/app/View/Attributes/add.ctp +++ b/app/View/Attributes/add.ctp @@ -1,124 +1,124 @@ - -
-Form->create('Attribute');?> -
- -Form->hidden('event_id'); -echo $this->Form->input('category', array( - 'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')), - 'empty' => '(choose one)' - )); -echo $this->Form->input('type', array( - 'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeTypeDiv')), - 'empty' => '(first choose category)' - )); -if ('true' == Configure::read('CyDefSIG.sync')) { - if ('true' == Configure::read('CyDefSIG.private')) { - echo $this->Form->input('distribution', array('label' => 'Distribution', 'selected' => $maxDist, - 'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv')) - )); - } else { - echo $this->Form->input('private', array( - 'before' => $this->Html->div('forminfo', isset($attrDescriptions['private']['formdesc']) ? $attrDescriptions['private']['formdesc'] : $attrDescriptions['private']['desc']), - )); - } -} -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('value', array( - 'type' => 'textarea', - 'error' => array('escape' => false), -)); -echo $this->Form->input('batch_import', array( - 'type' => 'checkbox', - 'after' => $this->Html->div('forminfo', 'Create multiple attributes one per line'), -)); - -// link an onchange event to the form elements -$this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")'); -$this->Js->get('#AttributeType')->event('change', 'showFormInfo("#AttributeType")'); -$this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")'); -?> -
-Form->end(__('Submit'));?> -
-
- -
- + +
+Form->create('Attribute');?> +
+ +Form->hidden('event_id'); +echo $this->Form->input('category', array( + 'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')), + 'empty' => '(choose one)' + )); +echo $this->Form->input('type', array( + 'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeTypeDiv')), + 'empty' => '(first choose category)' + )); +if ('true' == Configure::read('CyDefSIG.sync')) { + if ('true' == Configure::read('CyDefSIG.private')) { + echo $this->Form->input('distribution', array('label' => 'Distribution', 'selected' => $maxDist, + 'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv')) + )); + } else { + echo $this->Form->input('private', array( + 'before' => $this->Html->div('forminfo', isset($attrDescriptions['private']['formdesc']) ? $attrDescriptions['private']['formdesc'] : $attrDescriptions['private']['desc']), + )); + } +} +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('value', array( + 'type' => 'textarea', + 'error' => array('escape' => false), +)); +echo $this->Form->input('batch_import', array( + 'type' => 'checkbox', + 'after' => $this->Html->div('forminfo', 'Create multiple attributes one per line'), +)); + +// link an onchange event to the form elements +$this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")'); +$this->Js->get('#AttributeType')->event('change', 'showFormInfo("#AttributeType")'); +$this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")'); +?> +
+Form->end(__('Submit'));?> +
+
+ +
+ Js->writeBuffer(); // Write cached scripts \ No newline at end of file diff --git a/app/View/Attributes/add_attachment.ctp b/app/View/Attributes/add_attachment.ctp index 35f918132..d0c99049e 100755 --- a/app/View/Attributes/add_attachment.ctp +++ b/app/View/Attributes/add_attachment.ctp @@ -1,143 +1,143 @@ -
-Form->create('Attribute', array('enctype' => 'multipart/form-data','onSubmit' => 'document.getElementById("AttributeMalware").removeAttribute("disabled");'));?> -
- -Form->hidden('event_id'); -echo $this->Form->input('category', array('between' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')))); -echo $this->Form->file('value', array( - 'error' => array('escape' => false), -)); -echo $this->Form->input('malware', array( - 'type' => 'checkbox', - 'checked' => false, - 'after' => '
Tick this box to neutralize the sample. Every malware sample will be zipped with the password "infected"', -)); -if ('true' == Configure::read('CyDefSIG.sync')) { - if ('true' == Configure::read('CyDefSIG.private')) { - echo $this->Form->input('distribution', array('label' => 'Distribution', 'selected' => $maxDist, - 'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv')) - )); - //'before' => $this->Html->div('forminfo', isset($attrDescriptions['distribution']['formdesc']) ? $attrDescriptions['distribution']['formdesc'] : $attrDescriptions['distribution']['desc']),)); - } else { - echo $this->Form->input('private', array( - 'before' => $this->Html->div('forminfo', isset($attrDescriptions['private']['formdesc']) ? $attrDescriptions['private']['formdesc'] : $attrDescriptions['private']['desc']),)); - } -} -// link an onchange event to the form elements -$this->Js->get('#AttributeType')->event('change', 'showFormInfo("#AttributeType")'); -$this->Js->get('#AttributeCategory')->event('change', 'showFormInfo("#AttributeCategory")'); -$this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")'); -?> -
-Form->end(__('Upload'));?> -
-
- -
- - +
+Form->create('Attribute', array('enctype' => 'multipart/form-data','onSubmit' => 'document.getElementById("AttributeMalware").removeAttribute("disabled");'));?> +
+ +Form->hidden('event_id'); +echo $this->Form->input('category', array('between' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')))); +echo $this->Form->file('value', array( + 'error' => array('escape' => false), +)); +echo $this->Form->input('malware', array( + 'type' => 'checkbox', + 'checked' => false, + 'after' => '
Tick this box to neutralize the sample. Every malware sample will be zipped with the password "infected"', +)); +if ('true' == Configure::read('CyDefSIG.sync')) { + if ('true' == Configure::read('CyDefSIG.private')) { + echo $this->Form->input('distribution', array('label' => 'Distribution', 'selected' => $maxDist, + 'between' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv')) + )); + //'before' => $this->Html->div('forminfo', isset($attrDescriptions['distribution']['formdesc']) ? $attrDescriptions['distribution']['formdesc'] : $attrDescriptions['distribution']['desc']),)); + } else { + echo $this->Form->input('private', array( + 'before' => $this->Html->div('forminfo', isset($attrDescriptions['private']['formdesc']) ? $attrDescriptions['private']['formdesc'] : $attrDescriptions['private']['desc']),)); + } +} +// link an onchange event to the form elements +$this->Js->get('#AttributeType')->event('change', 'showFormInfo("#AttributeType")'); +$this->Js->get('#AttributeCategory')->event('change', 'showFormInfo("#AttributeCategory")'); +$this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")'); +?> +
+Form->end(__('Upload'));?> +
+
+ +
+ + Js->writeBuffer(); // Write cached scripts \ No newline at end of file