Fixing toggle on title click when using add or edit dialog form

When toggle title in dialog form was clicked, it toggles the main grid, not the form. This commit fixed that.