added js and template code for enclosure