Implemented add rule dialog.