// If custom field then pick name from database.
$fieldshortname = str_replace('profile_field_', '', $fieldname);
$fieldname = $customfieldname[$fieldshortname]->name;
- } elseif (preg_match('/^(.+?)(\d+)$/', $fieldname, $matches)) {
- $fieldname = get_string($matches[1]) . ' ' . $matches[2];
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} else {
new lang_string('showuseridentity_desc', 'admin'), array('email' => 1), array(
'idnumber' => new lang_string('idnumber'),
'email' => new lang_string('email'),
- 'phone1' => new lang_string('phone'),
+ 'phone1' => new lang_string('phone1'),
'phone2' => new lang_string('phone2'),
'department' => new lang_string('department'),
'institution' => new lang_string('institution'),
$mform->setType('department', PARAM_TEXT);
$mform->setDefault('department', $templateuser->department);
- $mform->addElement('text', 'phone1', get_string('phone'), 'maxlength="20" size="25"');
+ $mform->addElement('text', 'phone1', get_string('phone1'), 'maxlength="20" size="25"');
$mform->setType('phone1', PARAM_NOTAGS);
$mform->setAdvanced('phone1');
if(!empty($this->config->display_phone1) && !empty($USER->phone1)) {
$this->content->text .= '<div class="myprofileitem phone1">';
- $this->content->text .= get_string('phone').': ' . s($USER->phone1);
+ $this->content->text .= get_string('phone1').': ' . s($USER->phone1);
$this->content->text .= '</div>';
}
if(!empty($this->config->display_phone2) && !empty($USER->phone2)) {
$this->content->text .= '<div class="myprofileitem phone2">';
- $this->content->text .= get_string('phone').': ' . s($USER->phone2);
+ $this->content->text .= get_string('phone2').': ' . s($USER->phone2);
$this->content->text .= '</div>';
}
$string['display_yahoo'] = 'Display Yahoo';
$string['display_aim'] = 'Display AIM';
$string['display_msn'] = 'Display MSN';
-$string['display_phone1'] = 'Display phone number 1';
-$string['display_phone2'] = 'Display phone number 2';
+$string['display_phone1'] = 'Display phone';
+$string['display_phone2'] = 'Display mobile phone';
$string['display_institution'] = 'Display institution';
$string['display_address'] = 'Display address';
$string['display_firstaccess'] = 'Display first access';
$string['personal'] = 'Personal';
$string['personalprofile'] = 'Personal profile';
$string['phone'] = 'Phone';
+$string['phone1'] = 'Phone';
$string['phone2'] = 'Mobile phone';
$string['phpinfo'] = 'PHP info';
$string['pictureof'] = 'Picture of {$a}';
function get_user_field_name($field) {
// Some fields have language strings which are not the same as field name.
switch ($field) {
- case 'phone1' : {
- return get_string('phone');
- }
case 'url' : {
return get_string('webpage');
}
}
if (isset($identityfields['phone1']) && $user->phone1) {
- $node = new core_user\output\myprofile\node('contact', 'phone1', get_string('phone'), null, null, $user->phone1);
+ $node = new core_user\output\myprofile\node('contact', 'phone1', get_string('phone1'), null, null, $user->phone1);
$tree->add_node($node);
}
'userfullname' => get_string('fullnameuser'),
'useremail' => get_string('email'),
'usericq' => get_string('icqnumber'),
- 'userphone1' => get_string('phone').' 1',
- 'userphone2' => get_string('phone2').' 2',
+ 'userphone1' => get_string('phone1'),
+ 'userphone2' => get_string('phone2'),
'userinstitution' => get_string('institution'),
'userdepartment' => get_string('department'),
'useraddress' => get_string('address'),
$mform->addElement('text', 'department', get_string('department'), 'maxlength="255" size="25"');
$mform->setType('department', PARAM_TEXT);
- $mform->addElement('text', 'phone1', get_string('phone'), 'maxlength="20" size="25"');
+ $mform->addElement('text', 'phone1', get_string('phone1'), 'maxlength="20" size="25"');
$mform->setType('phone1', PARAM_NOTAGS);
$mform->addElement('text', 'phone2', get_string('phone2'), 'maxlength="20" size="25"');