Commit c1cd1097 authored by Nigel McNie's avatar Nigel McNie
Browse files

Added some helpful text (I think!) to the profile page. Made its title 'edit...

Added some helpful text (I think!) to the profile page. Made its title 'edit profile' to match its menu item (usability related).
parent b587720f
......@@ -31,7 +31,7 @@ define('SECTION_PLUGINNAME', 'internal');
define('SECTION_PAGE', 'index');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('profile','artefact.internal'));
define('TITLE', get_string('editprofile','artefact.internal'));
require_once('pieforms/pieform.php');
safe_require('artefact', 'internal');
......@@ -124,21 +124,21 @@ $elements = array(
'legend' => get_string('aboutme', 'artefact.internal'),
'collapsible' => true,
'collapsed' => $fieldset != 'aboutme',
'elements' => get_desired_fields(&$items, array('firstname', 'lastname', 'studentid', 'preferredname', 'introduction')),
'elements' => get_desired_fields(&$items, array('firstname', 'lastname', 'studentid', 'preferredname', 'introduction'), 'about'),
),
'contact' => array(
'type' => 'fieldset',
'legend' => get_string('contact', 'artefact.internal'),
'collapsible' => true,
'collapsed' => $fieldset != 'contact',
'elements' => get_desired_fields(&$items, array('email', 'officialwebsite', 'personalwebsite', 'blogaddress', 'address', 'town', 'city', 'country', 'homenumber', 'businessnumber', 'mobilenumber', 'faxnumber')),
'elements' => get_desired_fields(&$items, array('email', 'officialwebsite', 'personalwebsite', 'blogaddress', 'address', 'town', 'city', 'country', 'homenumber', 'businessnumber', 'mobilenumber', 'faxnumber'), 'contact'),
),
'messaging' => array(
'type' => 'fieldset',
'legend' => get_string('messaging', 'artefact.internal'),
'collapsible' => true,
'collapsed' => $fieldset != 'messaging',
'elements' => get_desired_fields(&$items, array('icqnumber', 'msnnumber', 'aimscreenname', 'yahoochat', 'skypeusername', 'jabberusername')),
'elements' => get_desired_fields(&$items, array('icqnumber', 'msnnumber', 'aimscreenname', 'yahoochat', 'skypeusername', 'jabberusername'), 'messaging'),
),
'general' => array(
'type' => 'fieldset',
......@@ -163,8 +163,13 @@ $profileform = pieform(array(
'autofocus' => false,
));
function get_desired_fields($allfields, $desiredfields) {
$return = array();
function get_desired_fields($allfields, $desiredfields, $section) {
$return = array(
"{$section}description" => array(
'type' => 'html',
'value' => get_string("{$section}description", 'artefact.internal')
)
);
foreach ($desiredfields as $field) {
if (isset($allfields[$field])) {
$return[$field] = $allfields[$field];
......@@ -380,7 +385,7 @@ $smarty = smarty(array(), array(), array(
$smarty->assign('profileform', $profileform);
$smarty->assign('heading', get_string('profile', 'artefact.internal'));
$smarty->assign('heading', get_string('editprofile', 'artefact.internal'));
$smarty->display('artefact:internal:index.tpl');
......
......@@ -35,6 +35,11 @@ $string['mandatory'] = 'Mandatory';
$string['public'] = 'Public';
$string['profileiconsize'] = 'Icon size';
$string['aboutdescription'] = 'Enter your real first and last name here. If you want to show a different name to people in the system, put that name in as your preferred name.';
$string['contactdescription'] = 'All of this information is private, unless you choose to put it in a view.';
$string['messagingdescription'] = 'Like your contact information, this information is private.';
$string['viewmyprofile'] = 'View my profile';
// profile categories
$string['aboutme'] = 'About me';
$string['contact'] = 'Contact information';
......
<h3>Introduction</h3>
<p>Your optional brief introduction might include information such as your area of study, professional expertise, interests; or how and why you are using Mahara.</p>
<p>Tell everyone about yourself! This will be on your profile page and other people will see this introduction when you appear in their search results, so make it good!</p>
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