Added InputDialog, made it functional when IndexButton is clicked