Settings bugfix; Improved modal mail dialog

Rewritten modal dialog for sending invoices via mail. I think this should be an example for handling similar forms across the whole app (for a few reasons).