#4961 modified remote API client edit to include lock and cancel, functions moved from client_edit to functions