CMS-3353 Autogeneration of HTML element id fails on some components

- also fixed the p margin for modal dialogs introduced in CMS-3340 Modal window for image uploader - fix padding between text and dropzone