If a user clicks on the 'favourite' icon when they already have the max number (50) of template favourites, inform them that they cannot favourite anymore templates until they remove one.
We can do this on the frontend. Data validation on the backend is handled by T377729: Use SaveUserOptions hook to validate template favourites