Meld Address custom field display template with main custom field template #11844
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Currently there is a custom field tpl for addresses that suffers from copy & paste from the main one. It differs slightly on how it handles view only fields, post help text & file attachment ui. I believe the main one is the preferred behaviour.
Before
View only field
File attachment original UI on address edit (note help text is in full)
After
View only field shows
File attachment UI on address edit (note help text is in help popup)
Technical Details
My goal here is to reconcile to one template that is generic enough to use for both use cases plus some new entities now that we support custom fields on 'any' entity. I have retained the former tpl as a wrapper (not the Address one - that seems too obscure) so any external extensions do not experience change (it's not a supported use per se but seems moderately possible they might)
Hoping @mattwire or @jitendrapurohit might test
Comments
TBH I think the difference between the 2 views is neither here nor there - no-one seems to have noticed. I'm only trying for consistency at this stage
I tested a variety of field types in both inline edit & main contact edit, checking they saved & that the view only field was unchanged