-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
[NFC] Convert some fields on admin display preferences to use metdata #12906
Conversation
(Standard links)
|
0693ca8
to
f9487b5
Compare
Reviewed and tested Admin Settings /civicrm/admin/setting/preferences/display?reset=1 |
</tr> | ||
<tr class="crm-preferences-display-form-block-description"> | ||
<td> </td> | ||
<td class="description">{ts}When enabled, any filter settings a user selects on the contact's Activity tab will be remembered as they visit other contacts.{/ts} | ||
<td class="description">{$settings_fields.preserve_activity_tab_filter.description} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the close td should be on the line above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
if (isset($props['pseudoconstant'])) { | ||
$options = civicrm_api3('Setting', 'getoptions', [ | ||
'field' => $setting, | ||
]); | ||
])['values']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the preference for using $options instead of $options['values'] below, but functioncall()['arrayindex'] is messy. $options = $options['values'] would be preferable in my view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a big fan of that syntax though :-(
@@ -155,11 +155,11 @@ | |||
|
|||
<tr class="crm-preferences-display-form-block-preserve_activity_tab_filter"> | |||
<td class="label"></td> | |||
<td>{$form.preserve_activity_tab_filter.html} {$form.preserve_activity_tab_filter.label}</td> | |||
<td>{$form.preserve_activity_tab_filter.html} </td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space before close td
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
settings/Core.setting.php
Outdated
'is_domain' => 1, | ||
'is_contact' => 0, | ||
'description' => 'When enabled, any filter settings a user selects on the contact\'s Activity tab will be remembered as they visit other contacts', | ||
'help_text' => NULL, | ||
'description' => ts('When enabled, any filter settings a user selects on the contact\'s Activity tab will be remembered as they visit other contacts'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can we have a full stop at the end of the description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
'default' => '0', | ||
'add' => '4.7', | ||
'title' => 'Preserve activity filters as a user preference', | ||
'title' => ts('Preserve activity filters as a user preference'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Title markup entries should probably end with a full stop like most of the description entries do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed - leaving full stops off the titles
…tadata. This has no functional impact - cleanup only
…tadata. This has no functional impact - cleanup only
f9487b5
to
c89a43b
Compare
Re-tested happy to merge :) |
unrelated fails |
Overview
This has no functional impact - cleanup only.
As part of making settings forms more metadata-driven this is a further conversion
Affected field is bottom one in pic
Before
Field is hard-coded
After
Field uses metadata
Technical Details
In general we want settings to be presented based on metadata & to transfer all those information assets into the xml - this is a step on that.
Comments
@mattwire