aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--languages/en.php8
-rw-r--r--views/default/admin/appearance/profile_fields/list.php11
-rw-r--r--views/default/forms/profile/fields/add.php12
3 files changed, 22 insertions, 9 deletions
diff --git a/languages/en.php b/languages/en.php
index c739d554e..da4e6a901 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -379,6 +379,14 @@ $english = array(
'profile:twitter' => "Twitter username",
'profile:saved' => "Your profile was successfully saved.",
+ 'profile:field:text' => 'Short text',
+ 'profile:field:longtext' => 'Large text area',
+ 'profile:field:tags' => 'Tags',
+ 'profile:field:url' => 'Web address',
+ 'profile:field:email' => 'Email address',
+ 'profile:field:location' => 'Location',
+ 'profile:field:date' => 'Date',
+
'admin:appearance:profile_fields' => 'Edit Profile Fields',
'profile:edit:default' => 'Edit profile fields',
'profile:label' => "Profile label",
diff --git a/views/default/admin/appearance/profile_fields/list.php b/views/default/admin/appearance/profile_fields/list.php
index 542ab1b6f..6e79838ea 100644
--- a/views/default/admin/appearance/profile_fields/list.php
+++ b/views/default/admin/appearance/profile_fields/list.php
@@ -9,15 +9,18 @@
$n = 0;
$loaded_defaults = array();
$items = array();
-if ($fieldlist = elgg_get_config('profile_custom_fields')) {
+$fieldlist = elgg_get_config('profile_custom_fields');
+if ($fieldlist) {
$fieldlistarray = explode(',', $fieldlist);
foreach ($fieldlistarray as $listitem) {
- if ($translation = elgg_get_config("admin_defined_profile_{$listitem}")) {
+ $translation = elgg_get_config("admin_defined_profile_$listitem");
+ $type = elgg_get_config("admin_defined_profile_type_$listitem");
+ if ($translation && $type) {
$item = new stdClass;
$item->translation = $translation;
$item->shortname = $listitem;
- $item->name = "admin_defined_profile_{$listitem}";
- $item->type = elgg_get_config("admin_defined_profile_type_{$listitem}");
+ $item->name = "admin_defined_profile_$listitem";
+ $item->type = elgg_echo("profile:field:$type");
$items[] = $item;
}
}
diff --git a/views/default/forms/profile/fields/add.php b/views/default/forms/profile/fields/add.php
index c1d07d2ce..bd58ae381 100644
--- a/views/default/forms/profile/fields/add.php
+++ b/views/default/forms/profile/fields/add.php
@@ -8,11 +8,13 @@ $type_text = elgg_echo('profile:type');
$label_control = elgg_view('input/text', array('name' => 'label'));
$type_control = elgg_view('input/dropdown', array('name' => 'type', 'options_values' => array(
- 'text' => elgg_echo('text'),
- 'longtext' => elgg_echo('longtext'),
- 'tags' => elgg_echo('tags'),
- 'url' => elgg_echo('url'),
- 'email' => elgg_echo('email')
+ 'text' => elgg_echo('profile:field:text'),
+ 'longtext' => elgg_echo('profile:field:longtext'),
+ 'tags' => elgg_echo('profile:field:tags'),
+ 'url' => elgg_echo('profile:field:url'),
+ 'email' => elgg_echo('profile:field:email'),
+ 'location' => elgg_echo('profile:field:location'),
+ 'date' => elgg_echo('profile:field:date'),
)));
$submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add')));