Refactor modal heading logic to support garden edit views