Implements the edit rule dialog and adds some additional error handling