A man has been charged after a police officer was seriously assaulted in Leeds.