adding media selector pattern

New media selector pattern and javascript module for forms