forked from civicrm/civicrm-core
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable & do single field metadata conversion for defaultContactCountry
This builds on civicrm#19629 Our intention is that we should be building functionality into this form that is actually used in core. It's a bit tricky to swap out all fields at once but this makes them individually swap-outable. Only defaultContactCountry is swapped out. I looked a little at the help_text issue - the text actually does work if you add it since it's already in the hlp file but I decided this broke consistency less (using description) as other fields on the form do that and look similar. Also, when the text is really just a bit of text (not a long help text) it makes sense. (Otherwise I'd need to trawl through resolving the bigger issue and I didn't want to bring that into scope)
- Loading branch information
1 parent
0843757
commit 8ad2d06
Showing
3 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{* Display setting field from metadata - todo consolidate with CRM_Core_Form_Field.tpl *} | ||
<tr class="crm-setting-form-block-{$setting_name}"> | ||
<td class="label">{$form.$setting_name.label}</td> | ||
<td> | ||
{if !empty($fieldSpec.wrapper_element)} | ||
{$fieldSpec.wrapper_element.0}{$form.$setting_name.html}{$fieldSpec.wrapper_element.1} | ||
{else} | ||
{$form.$setting_name.html} | ||
{/if} | ||
<div class="description"> | ||
{$fieldSpec.description} | ||
</div> | ||
{if $fieldSpec.help_text} | ||
{* @todo the appended -id here appears to be inconsistent in the hlp files *} | ||
{assign var='tplhelp_id' value = $setting_name|cat:'-id'|replace:'_':'-'}{help id="$tplhelp_id"} | ||
{/if} | ||
</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters