Add helper to create media selection form element and add all relevant media gallery popover functionality