If you look at where the hinges are you should see a little chain in the middle of the door holding it to the door frame.
Undo the four screws that hold that chain's bracket to the frame (but do not undo the screws holding it to the door itself). When doing this, be careful as the spring within is VERY strong and will pop the bracket off the frame as soon as you have undone the screws ! Be prepared for that - perhaps put a vice-clamp or have someone hold pliers on the chain itself.
After that, you can leave the gubbins in the door, it'll work fine.