Move all machine add dialog code to the same view/template