Render the dialog only after clicking the trigger

Rendering the dialog should only happen after clicking it
for the first time to avoid loading unnecessary modules
and DOM manipulation.

Change-Id: I7ab119a18d8c0433e5c3b21edfcc9c90c953d14f
Merge "Render the dialog only after clicking the trigger"