Add custom fields help text

This commit is contained in:
Hypolite Petovan 2020-01-18 14:12:43 -05:00
parent cc007f715d
commit 64c05f2280
4 changed files with 13 additions and 4 deletions

View File

@ -177,8 +177,8 @@ class Index extends BaseSettingsModule
'id' => $profileField->id, 'id' => $profileField->id,
'legend' => $profileField->label, 'legend' => $profileField->label,
'fields' => [ 'fields' => [
'label' => ['profile_field[' . $profileField->id . '][label]', DI::l10n()->t('Label:'), $profileField->label, DI::l10n()->t('Empty the label to delete this profile field')], 'label' => ['profile_field[' . $profileField->id . '][label]', DI::l10n()->t('Label:'), $profileField->label],
'value' => ['profile_field[' . $profileField->id . '][value]', DI::l10n()->t('Value:'), $profileField->value, DI::l10n()->t('BBCodes allowed')], 'value' => ['profile_field[' . $profileField->id . '][value]', DI::l10n()->t('Value:'), $profileField->value],
'acl' => ACL::getFullSelectorHTML( 'acl' => ACL::getFullSelectorHTML(
DI::page(), DI::page(),
$a->user, $a->user,
@ -198,7 +198,7 @@ class Index extends BaseSettingsModule
'legend' => DI::l10n()->t('Add a new profile field'), 'legend' => DI::l10n()->t('Add a new profile field'),
'fields' => [ 'fields' => [
'label' => ['profile_field[new][label]', DI::l10n()->t('Label:')], '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( 'acl' => ACL::getFullSelectorHTML(
DI::page(), DI::page(),
$a->user, $a->user,
@ -272,6 +272,13 @@ class Index extends BaseSettingsModule
'$homepage' => ['homepage', DI::l10n()->t('Homepage URL:'), $profile['homepage']], '$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)')], '$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)')], '$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, '$custom_fields' => $custom_fields,
]); ]);

View File

@ -98,7 +98,7 @@
<div class="profile-edit-submit-end"></div> <div class="profile-edit-submit-end"></div>
<h3>{{$lbl_custom_fields_section}}</h3> <h3>{{$lbl_custom_fields_section}}</h3>
{{$custom_fields_description nofilter}}
<div id="profile-custom-fields"> <div id="profile-custom-fields">
{{foreach $custom_fields as $custom_field}} {{foreach $custom_fields as $custom_field}}
{{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}} {{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}}

View File

@ -157,6 +157,7 @@
</div> </div>
<div id="custom-fields-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="custom-fields"> <div id="custom-fields-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="custom-fields">
<div class="section-content-tools-wrapper"> <div class="section-content-tools-wrapper">
{{$custom_fields_description nofilter}}
<div id="profile-custom-fields"> <div id="profile-custom-fields">
{{foreach $custom_fields as $custom_field}} {{foreach $custom_fields as $custom_field}}
{{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}} {{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}}

View File

@ -150,6 +150,7 @@
<div class="toggle-section js-toggle-section"> <div class="toggle-section js-toggle-section">
<a class="section-caption js-section-toggler" href="javascript:;">{{$lbl_custom_fields_section}} &raquo;</a> <a class="section-caption js-section-toggler" href="javascript:;">{{$lbl_custom_fields_section}} &raquo;</a>
<div class="js-section toggle-section-content hidden"> <div class="js-section toggle-section-content hidden">
{{$custom_fields_description nofilter}}
<div id="profile-custom-fields"> <div id="profile-custom-fields">
{{foreach $custom_fields as $custom_field}} {{foreach $custom_fields as $custom_field}}
{{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}} {{include file="settings/profile/field/edit.tpl" profile_field=$custom_field}}