Update dialog.js

buttons section to be optional