aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/admin/appearance/profile_fields/list.php11
-rw-r--r--views/default/forms/profile/fields/add.php12
2 files changed, 14 insertions, 9 deletions
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')));