Commit 3c5ac809 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1683202: Country column to display correctly in user search



When adding it via the Extensions -> Internal fields config form

So that it displays 'Australia' instead of 'au'

behatnotneeded

Change-Id: Ic83c20bbf555de38c4d3a657116fc31d577dfc64
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 4078c8d5
......@@ -926,6 +926,18 @@ class ArtefactTypeCountry extends ArtefactTypeProfileField {
$countries = getoptions_country();
return (isset($countries[$entry_content['title']]) ? $countries[$entry_content['title']] : '');
}
/**
* Format value for display
*/
function format_result($raw) {
return get_string("country.{$raw}");
}
/**
* Use custom template for display on User -> Search page
*/
function usersearch_column_structure() {
return array('name' => 'country', 'sort' => true, 'template' => 'admin/users/searchcountrycolumn.tpl');
}
}
class ArtefactTypeHomenumber extends ArtefactTypeProfileField {}
class ArtefactTypeBusinessnumber extends ArtefactTypeProfileField {}
......
{if $r.country}
{get_string("country.$r.country")}
{/if}
{if $r.country}
{get_string("country.$r.country")}
{/if}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment