Move PDF export messages to be in the modal dialog
move error message formatting to the view
configurable layout publishing url
added cors headers for https posts