From 64c05f2280b2d9eeffe1e566e4f3f5fcf4cadcdd Mon Sep 17 00:00:00 2001 From: Hypolite Petovan 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 d719afeac..ea3df3ca2 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("

Custom fields appear on your profile page.

+

You can use BBCodes in the field values.

+

Reorder by dragging the field title.

+

Empty the label field to remove a custom field.

+

Non-public fields can only be seen by the selected Friendica contacts or the Friendica contacts in the selected groups.

", + '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 70db8a3d4..bf98bb158 100644 --- a/view/templates/settings/profile/index.tpl +++ b/view/templates/settings/profile/index.tpl @@ -98,7 +98,7 @@

{{$lbl_custom_fields_section}}

- + {{$custom_fields_description nofilter}}
{{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 7afe11996..4d7cf8d70 100644 --- a/view/theme/frio/templates/settings/profile/index.tpl +++ b/view/theme/frio/templates/settings/profile/index.tpl @@ -157,6 +157,7 @@
+ {{$custom_fields_description nofilter}}
{{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 8ca6e0f88..eab7c2c4a 100644 --- a/view/theme/vier/templates/settings/profile/index.tpl +++ b/view/theme/vier/templates/settings/profile/index.tpl @@ -150,6 +150,7 @@
{{$lbl_custom_fields_section}} »