Reset form when close event is triggered by modal