Commit 5044c25d authored by Liam's avatar Liam Committed by Robert Lyon

Bug #1744191: Changing date inputs to datepicker on group, user, and institution settings

behatnotneeded

Change-Id: I76365ac480d5d74d974c7776f738788710bc7cca
parent 8d796e7c
......@@ -113,13 +113,16 @@ $elements['lastlogin'] = array(
'value' => format_date($user->lastlogin),
);
$elements['expiry'] = array(
'type' => 'date',
'class' => 'form-condensed',
'type' => 'calendar',
'class' => '',
'title' => get_string('accountexpiry', 'admin'),
'description' => get_string('accountexpirydescription', 'admin'),
'minyear' => $currentdate['year'] - 2,
'maxyear' => $currentdate['year'] + 20,
'defaultvalue' => $user->expiry
'defaultvalue' => $user->expiry,
'caloptions' => array(
'showsTime' => false
)
);
$quotaused = get_string('quotaused', 'admin') . ': ' . display_size($user->quotaused);
if ($USER->get('admin') || get_config_plugin('artefact', 'file', 'institutionaloverride')) {
......@@ -755,13 +758,16 @@ foreach ($institutions as $i) {
'collapsed' => true,
'elements' => array(
$i->institution.'_expiry' => array(
'type' => 'date',
'type' => 'calendar',
'title' => get_string('membershipexpiry', 'admin'),
'description' => get_string('membershipexpirydescription', 'admin'),
'class' => 'form-condensed',
'class' => '',
'minyear' => $currentdate['year'],
'maxyear' => $currentdate['year'] + 20,
'defaultvalue' => $i->membership_expiry
'defaultvalue' => $i->membership_expiry,
'caloptions' => array(
'showsTime' => false
)
),
$i->institution.'_studentid' => array(
'type' => 'text',
......
......@@ -326,13 +326,16 @@ if ($institution || $add) {
}
if ($USER->get('admin') && $institution != 'mahara') {
$elements['expiry'] = array(
'type' => 'date',
'type' => 'calendar',
'title' => get_string('institutionexpiry', 'admin'),
'description' => get_string('institutionexpirydescription', 'admin', hsc($sitename)),
'defaultvalue' => is_null($data->expiry) ? null : strtotime($data->expiry),
'help' => true,
'minyear' => date('Y') - 2,
'maxyear' => date('Y') + 10,
'caloptions' => array(
'showsTime' => false,
),
);
}
if ($USER->get('admin')) {
......
......@@ -339,19 +339,19 @@ $elements['editability'] = array(
$currentdate = getdate();
$elements['editwindowstart'] = array (
'type' => 'date',
'class' => 'five-across hide-label',
'type' => 'calendar',
'class' => '',
'title' => get_string('windowstart', 'group'),
'defaultvalue' => $group_data->editwindowstart,
'description' => get_string('windowstartdesc', 'group'),
'minyear' => $currentdate['year'],
'maxyear' => $currentdate['year'] + 20,
'time' => true
'time' => true,
);
$elements['editwindowend'] = array (
'type' => 'date',
'class' => 'five-across hide-label',
'type' => 'calendar',
'class' => '',
'title' => get_string('windowend', 'group'),
'defaultvalue' => $group_data->editwindowend,
'description' => get_string('windowenddesc', 'group'),
......
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