Commit 3f083a12 authored by Andrew Robert Nicols's avatar Andrew Robert Nicols Committed by Richard Mansfield
Browse files

Admin configurable default country


Signed-off-by: default avatarAndrew Robert Nicols <andrew.nicols@luns.net.uk>
parent 9e62537c
......@@ -68,6 +68,14 @@ $siteoptionform = array(
'options' => $langoptions,
'help' => true,
),
'country' => array(
'type' => 'select',
'title' => get_string('country', 'admin'),
'description' => get_string('sitecountrydescription', 'admin'),
'defaultvalue' => 'nz',
'options' => getoptions_country(),
'help' => true,
),
'theme' => array(
'type' => 'select',
'title' => get_string('theme', 'admin'),
......
......@@ -106,8 +106,7 @@ foreach ( $element_list as $element => $type ) {
}
if ($element == 'country') {
$items[$element]['options'] = getoptions_country();
// @todo configure default country somehow...
$items[$element]['defaultvalue'] = 'nz';
$items[$element]['defaultvalue'] = get_config('country') ? get_config('country') : 'nz';
}
if (get_helpfile_location('artefact', 'internal', 'profileform', $element)) {
......@@ -131,6 +130,7 @@ if ($items['firstname']) {
$items['firstname']['autofocus'] = true;
}
// build form elements
$elements = array(
'topsubmit' => array(
......
......@@ -809,7 +809,7 @@ function auth_check_required_fields() {
}
if ($field == 'country') {
$elements[$field]['options'] = getoptions_country();
$elements[$field]['defaultvalue'] = 'nz';
$elements[$field]['defaultvalue'] = get_config('country') ? get_config('country') : 'nz';
}
if ($field == 'email') {
......
......@@ -164,6 +164,7 @@ $string['institutionautosuspenddescription'] = 'If checked, expired institutions
$string['institutionexpirynotification'] = 'Warning time for institution expiry';
$string['institutionexpirynotificationdescription'] = 'A notification message will be sent to site and institutional admins the long before a site expires';
$string['language'] = 'Language';
$string['country'] = 'Country';
$string['pathtoclam'] = 'Path to clam';
$string['pathtoclamdescription'] = 'The filesystem path to clamscan or clamdscan';
$string['searchplugin'] = 'Search plugin';
......@@ -177,6 +178,7 @@ $string['showtagssideblock'] = 'Enable Tag Cloud';
$string['showtagssideblockdescription'] = 'If enabled, users will see a side block in the My Portfolio section of the site with a list of their most frequently used tags';
$string['sitedefault'] = 'Site Default';
$string['sitelanguagedescription'] = 'The default language for the site';
$string['sitecountrydescription'] = 'The default country for the site';
$string['sitename'] = 'Site name';
$string['sitenamedescription'] = 'The site name appears in certain places around the site and in e-mails sent from the site';
$string['siteoptionspagedescription'] = 'Here you can set some global options that will apply by default throughout the entire site.';
......
<h3>Country</h3>
<p>The country selected will be the default for country selections throughout your Mahara installation.</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