Commit 95d0dc0b authored by Evan Goldenberg's avatar Evan Goldenberg Committed by Francois Marier
Browse files

usability: add guidance for calendar fields format



- Date of birth field in "My Resume"
- View access start/stop date
Signed-off-by: default avatarEvan Goldenberg <evang@catalyst.net.nz>
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent accd93f0
...@@ -162,6 +162,7 @@ $personalinformationform = pieform(array( ...@@ -162,6 +162,7 @@ $personalinformationform = pieform(array(
'defaultvalue' => ((!empty($personalinformation)) 'defaultvalue' => ((!empty($personalinformation))
? $personalinformation->get_composite('dateofbirth') : null), ? $personalinformation->get_composite('dateofbirth') : null),
'title' => get_string('dateofbirth', 'artefact.resume'), 'title' => get_string('dateofbirth', 'artefact.resume'),
'description' => get_string('dateformatguide'),
'help' => true, 'help' => true,
), ),
'placeofbirth' => array( 'placeofbirth' => array(
......
...@@ -96,6 +96,8 @@ $string['sortalpha'] = 'Sort tags alphabetically'; ...@@ -96,6 +96,8 @@ $string['sortalpha'] = 'Sort tags alphabetically';
$string['sortfreq'] = 'Sort tags by frequency'; $string['sortfreq'] = 'Sort tags by frequency';
$string['sortresultsby'] = 'Sort results by:'; $string['sortresultsby'] = 'Sort results by:';
$string['date'] = 'Date'; $string['date'] = 'Date';
$string['dateformatguide'] = 'Use the format YYYY/MM/DD';
$string['datetimeformatguide'] = 'Use the format YYYY/MM/DD HH:MM';
$string['filterresultsby'] = 'Filter results by:'; $string['filterresultsby'] = 'Filter results by:';
$string['tagfilter_all'] = 'All'; $string['tagfilter_all'] = 'All';
$string['tagfilter_file'] = 'Files'; $string['tagfilter_file'] = 'Files';
......
...@@ -67,6 +67,10 @@ function renderAccessListItem(item) { ...@@ -67,6 +67,10 @@ function renderAccessListItem(item) {
TR(null, TR(null,
TH(null, get_string('To') + ':'), TH(null, get_string('To') + ':'),
TD(null, makeCalendarInput(item, 'stop'), makeCalendarLink(item, 'stop')) TD(null, makeCalendarInput(item, 'stop'), makeCalendarLink(item, 'stop'))
),
TR(null,
TH(null, null),
TD(null, get_string('datetimeformatguide'))
) )
) )
); );
......
...@@ -187,6 +187,7 @@ $form['elements']['overrides'] = array( ...@@ -187,6 +187,7 @@ $form['elements']['overrides'] = array(
'startdate' => array( 'startdate' => array(
'type' => 'calendar', 'type' => 'calendar',
'title' => get_string('startdate','view'), 'title' => get_string('startdate','view'),
'description' => get_string('datetimeformatguide'),
'defaultvalue' => isset($view) ? strtotime($view->get('startdate')) : null, 'defaultvalue' => isset($view) ? strtotime($view->get('startdate')) : null,
'caloptions' => array( 'caloptions' => array(
'showsTime' => true, 'showsTime' => true,
...@@ -197,6 +198,7 @@ $form['elements']['overrides'] = array( ...@@ -197,6 +198,7 @@ $form['elements']['overrides'] = array(
'stopdate' => array( 'stopdate' => array(
'type' => 'calendar', 'type' => 'calendar',
'title' => get_string('stopdate','view'), 'title' => get_string('stopdate','view'),
'description' => get_string('datetimeformatguide'),
'defaultvalue' => isset($view) ? strtotime($view->get('stopdate')) : null, 'defaultvalue' => isset($view) ? strtotime($view->get('stopdate')) : null,
'caloptions' => array( 'caloptions' => array(
'showsTime' => true, 'showsTime' => true,
...@@ -404,7 +406,7 @@ function editaccess_submit(Pieform $form, $values) { ...@@ -404,7 +406,7 @@ function editaccess_submit(Pieform $form, $values) {
$form = pieform($form); $form = pieform($form);
$smarty = smarty(array('tablerenderer'), array(), array('mahara' => array('From', 'To')), array('sidebars' => false)); $smarty = smarty(array('tablerenderer'), array(), array('mahara' => array('From', 'To', 'datetimeformatguide')), array('sidebars' => false));
$smarty->assign('INLINEJAVASCRIPT', $js); $smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('PAGEHEADING', hsc(TITLE)); $smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->assign('form', $form); $smarty->assign('form', $form);
......
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