Adding toggle for attachments

Adding the JavaScript part for the attachments toggle.