update: add type(int) to InputDialogFragment, getTitle() according to
type of the dialog.

some refactors in InputDialogFragment