From 327b336c0cf27bd2e126b1d9e150aa01b4ec61c6 Mon Sep 17 00:00:00 2001 From: iglocska Date: Wed, 6 Nov 2013 10:02:39 +0100 Subject: [PATCH] Fix to an issue that prevented attachments being uploaded with invalid category choices when the malware checkbox was ticked - re-introduced the removed check for valid category / type combinations based on the checkbox and the chosen category --- app/View/Attributes/add_attachment.ctp | 27 ++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/app/View/Attributes/add_attachment.ctp b/app/View/Attributes/add_attachment.ctp index 2564dd5ba..cca27aba3 100755 --- a/app/View/Attributes/add_attachment.ctp +++ b/app/View/Attributes/add_attachment.ctp @@ -41,9 +41,7 @@ //'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")'); + $this->Js->get('#AttributeCategory')->event('change', 'malwareCheckboxSetter("#AttributeCategory")'); ?> Js->writeBuffer(); // Write cached scripts \ No newline at end of file