Enotice fixes, consolidation on Import datasource forms #25141
Merged
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
Enotice fixes, consolidation on Import datasource forms
Before
E-notices on dataSource form in some cases, inconsistent across the 2 templates
After
Standardised
Technical Details
The goal is to consolidate the 2 forms of
DataSource.tpl
such that thelogic to select csv or sql is in shared code used by Contact import (as is currently the case) and all the other imports (including csvimporter)
This PR simply wraps all fields that might not be in one or both tpls with
{if array_key_exists('contactType', $form)}
so we can more easily merge them into one.Note that in addition to the tpl layer stuff the php layer requires these lines that are only in the Contact import at the moment to be accessed by all imports
Comments
@mattwire once this is done we won't need to add to csvimporter per your PR. However, I hit a couple of gotchas consolidating the tpl - the first 2 I expect just take more fiddling around
onDuplicate
fieldbuildDataSourceFormBlock();
to work & hence I backed out for now, scaling this down to consolidation so the tpls can be more easily mergedcontactType
doesn't quite work for contacts if we use what is in the shared tplPerhaps
would get us past it?
Maybe we could even drop it?