Add function to generate the HTML form from an object already loaded
Remove hardcoded urls and don't be strict on the dialog we want to use.