Keep in mind that you'll need to reapply these changes after future upgrades as well!
As for the edit templates, the relevant line seems to be called here...
... but also seems to be calling functions or methods from other files. Meaning it is beyond my non-developer skills to follow. Hopefully you are either fine with just modifying the display template, or you can figure it out yourself - otherwise, I will need to ask a developer for some suggestions on where to look next.
In any case, I hope this points you in the right direction!
Cheers,
@accesstomemory