-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit test cover + nl2br for location in event emails #26296
Conversation
(Standard links)
|
4f50ce3
to
7fdbce6
Compare
I think it would be great for the API to give formatted output, but keep in mind that everything in a v4 That said, there is still a per-field formatting callback available, and it does work, as long as all the necessary data was retrieved from the sql query (you can't just assume that the api call had included city, state, country, etc. in the SELECT clause). So to sum up, yes it can be done, but it should be done the APIv4-way utilizing event callbacks for building the sql and for the post-formatting. |
@colemanw ok - makes sense - how would is look in terms of the contract if we add it? FWIW we COULD do the whole dang thing with crazy complex sql - probably |
Note the formats are
|
BUT - I first want to question - is it a good thing to put vcard html in emails - I can't decide if it is a) by design for good reasons |
@agileware-justin do you have any thoughts on the format here? |
Just noting that the vcard in emails discussion is not blocking on merging this - perhaps I should move to gitlab & we can merge this? |
Thanks for the ping @seamuslee001 - I am intrigued by the vcard discussion and think that's a discussion to be had on gitlab - maybe it will evolve into a PR, maybe not. I'm not really across what this PR is supposed to do exactly but vcard doesn't look like the primary objective. |
Right this PR has the much more modest goal of replacing |
@eileenmcnaughton we could add an APIv4 pseudo-field called something like Except... hang on, that wouldn't work in pure sql because pseudoconstants have to be replaced. Technically that setting also supports custom fields... that might be a real pain to get working because you'd have to fudge the lookup as a subquery or something. |
This has merge conflicts. |
7fdbce6
to
670526e
Compare
@demeritcowboy I fixed the merged conflicts & it has passed tests |
I'm going to merge but noting it means that if you replace the current |
Overview
Add unit test cover + nl2br for location in event emails
Before
In looking to swap the notice-y
{$location.address.1.display}
for the tokenevent.location
I realised that the line breaks were not being converted to page breaksAfter
The html version of the token now converts line breaks to page breaks & is tested.
Technical Details
This highlights that in fact what is being rendered is
I want to confirm this is desirable & if so tokens should support it. I found this library https://github.com/jeroendesloovere/vcard
There is a question as to how it would 'look' - we really should support address display at the api-v4 level -
Comments