Form->create('Attribute', array('enctype' => 'multipart/form-data','onSubmit' => 'document.getElementById("AttributeMalware").removeAttribute("disabled");'));?>
Form->hidden('event_id'); echo $this->Form->input('category', array( 'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeCategoryDiv')), )); if ('true' == Configure::read('CyDefSIG.sync')) { echo $this->Form->input('distribution', array('label' => 'Distribution', 'selected' => $maxDist, 'after' => $this->Html->div('forminfo', '', array('id' => 'AttributeDistributionDiv')), )); //'before' => $this->Html->div('forminfo', isset($attrDescriptions['distribution']['formdesc']) ? $attrDescriptions['distribution']['formdesc'] : $attrDescriptions['distribution']['desc']),)); } ?>
Form->file('value', array( 'error' => array('escape' => false), )); ?>
Form->input('malware', array( 'type' => 'checkbox', 'checked' => false, 'after' => $this->Html->div('forminfo', 'Tick this box to neutralize the sample. Every malware sample will be zipped with the password "infected"', ''), //'after' => '
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('#AttributeType')->event('change', 'showFormInfo("#AttributeType")'); $this->Js->get('#AttributeCategory')->event('change', 'showFormInfo("#AttributeCategory")'); $this->Js->get('#AttributeDistribution')->event('change', 'showFormInfo("#AttributeDistribution")'); ?>
Form->button('Upload', array('class' => 'btn btn-primary')); echo $this->Form->end(); ?>
Js->writeBuffer(); // Write cached scripts