Fix hidden dialog when called from Bootstrap modal.

Dialog would appear underneath Bootstrap modals if they were being used as a form.
![screen shot 2014-03-14 at 8 35 48 pm](https://f.cloud.github.com/assets/4166438/2427367/3183dde0-abe2-11e3-8a0a-149febcecb2a.png)
![screen shot 2014-03-14 at 8 34 10 pm](https://f.cloud.github.com/assets/4166438/2427368/3189388a-abe2-11e3-91f4-65bd39ade535.png)


@rgrwatson85 Is there a better way to determine if this .modal is coming from Bootstrap? This has the potential to conflict with other peoples code if .modal means something else to them (and indeed it does in our app).