From 64c05f2280b2d9eeffe1e566e4f3f5fcf4cadcdd Mon Sep 17 00:00:00 2001 From: Hypolite Petovan <hypolite@mrpetovan.com> Date: Sat, 18 Jan 2020 14:12:43 -0500 Subject: [PATCH] Add custom fields help text --- src/Module/Settings/Profile/Index.php | 13 ++++++++++--- view/templates/settings/profile/index.tpl | 2 +- .../theme/frio/templates/settings/profile/index.tpl | 1 + .../theme/vier/templates/settings/profile/index.tpl | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Module/Settings/Profile/Index.php b/src/Module/Settings/Profile/Index.php index d719afeacf..ea3df3ca22 100644 --- a/src/Module/Settings/Profile/Index.php +++ b/src/Module/Settings/Profile/Index.php @@ -177,8 +177,8 @@ class Index extends BaseSettingsModule 'id' => $profileField->id, 'legend' => $profileField->label, 'fields' => [ - 'label' => ['profile_field[' . $profileField->id . '][label]', DI::l10n()->t('Label:'), $profileField->label, DI::l10n()->t('Empty the label to delete this profile field')], - 'value' => ['profile_field[' . $profileField->id . '][value]', DI::l10n()->t('Value:'), $profileField->value, DI::l10n()->t('BBCodes allowed')], + 'label' => ['profile_field[' . $profileField->id . '][label]', DI::l10n()->t('Label:'), $profileField->label], + 'value' => ['profile_field[' . $profileField->id . '][value]', DI::l10n()->t('Value:'), $profileField->value], 'acl' => ACL::getFullSelectorHTML( DI::page(), $a->user, @@ -198,7 +198,7 @@ class Index extends BaseSettingsModule 'legend' => DI::l10n()->t('Add a new profile field'), 'fields' => [ 'label' => ['profile_field[new][label]', DI::l10n()->t('Label:')], - 'value' => ['profile_field[new][value]', DI::l10n()->t('Value:'), '', DI::l10n()->t('BBCodes allowed')], + 'value' => ['profile_field[new][value]', DI::l10n()->t('Value:')], 'acl' => ACL::getFullSelectorHTML( DI::page(), $a->user, @@ -272,6 +272,13 @@ class Index extends BaseSettingsModule '$homepage' => ['homepage', DI::l10n()->t('Homepage URL:'), $profile['homepage']], '$pub_keywords' => ['pub_keywords', DI::l10n()->t('Public Keywords:'), $profile['pub_keywords'], DI::l10n()->t('(Used for suggesting potential friends, can be seen by others)')], '$prv_keywords' => ['prv_keywords', DI::l10n()->t('Private Keywords:'), $profile['prv_keywords'], DI::l10n()->t('(Used for searching profiles, never shown to others)')], + '$custom_fields_description' => DI::l10n()->t("<p>Custom fields appear on <a href=\"%s\">your profile page</a>.</p> + <p>You can use BBCodes in the field values.</p> + <p>Reorder by dragging the field title.</p> + <p>Empty the label field to remove a custom field.</p> + <p>Non-public fields can only be seen by the selected Friendica contacts or the Friendica contacts in the selected groups.</p>", + 'profile/' . $a->user['nickname'] + ), '$custom_fields' => $custom_fields, ]); diff --git a/view/templates/settings/profile/index.tpl b/view/templates/settings/profile/index.tpl index 70db8a3d4b..bf98bb1587 100644 --- a/view/templates/settings/profile/index.tpl +++ b/view/templates/settings/profile/index.tpl @@ -98,7 +98,7 @@ <div class="profile-edit-submit-end"></div> <h3>{{$lbl_custom_fields_section}}</h3> - + {{$custom_fields_description nofilter}} <div id="profile-custom-fields"> {{foreach $custom_fields as $custom_field}} {{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}} diff --git a/view/theme/frio/templates/settings/profile/index.tpl b/view/theme/frio/templates/settings/profile/index.tpl index 7afe11996e..4d7cf8d70e 100644 --- a/view/theme/frio/templates/settings/profile/index.tpl +++ b/view/theme/frio/templates/settings/profile/index.tpl @@ -157,6 +157,7 @@ </div> <div id="custom-fields-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="custom-fields"> <div class="section-content-tools-wrapper"> + {{$custom_fields_description nofilter}} <div id="profile-custom-fields"> {{foreach $custom_fields as $custom_field}} {{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}} diff --git a/view/theme/vier/templates/settings/profile/index.tpl b/view/theme/vier/templates/settings/profile/index.tpl index 8ca6e0f885..eab7c2c4a4 100644 --- a/view/theme/vier/templates/settings/profile/index.tpl +++ b/view/theme/vier/templates/settings/profile/index.tpl @@ -150,6 +150,7 @@ <div class="toggle-section js-toggle-section"> <a class="section-caption js-section-toggler" href="javascript:;">{{$lbl_custom_fields_section}} »</a> <div class="js-section toggle-section-content hidden"> + {{$custom_fields_description nofilter}} <div id="profile-custom-fields"> {{foreach $custom_fields as $custom_field}} {{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}} -- 2.39.5