Commit 09accd4f authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Move some admin language strings to the admin section

parent 8ac614e0
......@@ -44,62 +44,62 @@ $siteoptionform = form(array(
'elements' => array(
'sitename' => array(
'type' => 'text',
'title' => get_string('sitename'),
'description' => get_string('sitenamedescription'),
'title' => get_string('sitename','admin'),
'description' => get_string('sitenamedescription','admin'),
'defaultvalue' => get_config('sitename'),
),
'language' => array(
'type' => 'select',
'title' => get_string('language'),
'description' => get_string('sitelanguagedescription'),
'title' => get_string('language','admin'),
'description' => get_string('sitelanguagedescription','admin'),
'defaultvalue' => get_config('language'),
'collapseifoneoption' => true,
'options' => $langoptions,
),
'theme' => array(
'type' => 'select',
'title' => get_string('theme'),
'description' => get_string('sitethemedescription'),
'title' => get_string('theme','admin'),
'description' => get_string('sitethemedescription','admin'),
'defaultvalue' => get_config('theme'),
'collapseifoneoption' => true,
'options' => $themeoptions,
),
'viruschecking' => array(
'type' => 'checkbox',
'title' => get_string('viruschecking'),
'description' => get_string('viruscheckingdescription'),
'title' => get_string('viruschecking','admin'),
'description' => get_string('viruscheckingdescription','admin'),
'defaultvalue' => get_config('viruschecking'),
),
'pathtoclam' => array(
'type' => 'text',
'title' => get_string('pathtoclam'),
'description' => get_string('pathtoclamdescription'),
'title' => get_string('pathtoclam','admin'),
'description' => get_string('pathtoclamdescription','admin'),
'defaultvalue' => get_config('pathtoclam'),
),
'sessionlifetime' => array(
'type' => 'text',
'size' => 4,
'title' => get_string('sessionlifetime'),
'description' => get_string('sessionlifetimedescription'),
'title' => get_string('sessionlifetime','admin'),
'description' => get_string('sessionlifetimedescription','admin'),
'defaultvalue' => get_config('session_timeout') / 60,
),
'allowpublicviews' => array(
'type' => 'select',
'title' => get_string('allowpublicviews'),
'description' => get_string('allowpublicviewsdescription'),
'title' => get_string('allowpublicviews','admin'),
'description' => get_string('allowpublicviewsdescription','admin'),
'defaultvalue' => get_config('allowpublicviews'),
'options' => $yesno,
),
'artefactviewinactivitytime' => array(
'type' => 'expiry',
'title' => get_string('artefactviewinactivitytime'),
'description' => get_string('artefactviewinactivitytimedescription'),
'title' => get_string('artefactviewinactivitytime','admin'),
'description' => get_string('artefactviewinactivitytimedescription','admin'),
'defaultvalue' => get_config('artefactviewinactivitytime'),
),
'contactaddress' => array(
'type' => 'text',
'title' => get_string('contactaddress'),
'description' => get_string('contactaddressdescription'),
'title' => get_string('contactaddress','admin'),
'description' => get_string('contactaddressdescription','admin'),
'defaultvalue' => get_config('contactaddress'),
'rules' => array(
'email' => true
......@@ -107,13 +107,13 @@ $siteoptionform = form(array(
),
'submit' => array(
'type' => 'submit',
'value' => get_string('updatesiteoptions')
'value' => get_string('updatesiteoptions','admin')
),
)
));
function siteoptions_fail($field) {
json_reply('local', get_string('setsiteoptionsfailed', get_string($field)));
json_reply('local', get_string('setsiteoptionsfailed','admin', get_string($field)));
}
function siteoptions_submit($values) {
......@@ -133,7 +133,7 @@ function siteoptions_submit($values) {
if (!set_config('viruschecking', (int) ($values['viruschecking'] == 'on'))) {
siteoptions_fail('viruschecking');
}
json_reply(false, get_string('siteoptionsset'));
json_reply(false, get_string('siteoptionsset','admin'));
}
$smarty = smarty(array(),array(),array('siteoptionsset','setsiteoptionsfailed'));
......
......@@ -51,6 +51,30 @@ $string['menueditor'] = 'Site menu';
$string['files'] = 'Files';
$string['adminhome'] = 'Admin home';
// Site options
$string['allowpublicviews'] = 'Allow public views';
$string['allowpublicviewsdescription'] = 'If set to yes, views are accessable by the public. If set to no, only logged in users will be able to look at views';
$string['artefactviewinactivitytime'] = 'Artefact view inactivity time';
$string['artefactviewinactivitytimedescription'] = 'The time after which an inactive view or artefact will be moved to the InactiveContent area';
$string['contactaddress'] = 'Contact address';
$string['contactaddressdescription'] = 'The email address to which messages from the Contact Us form will be sent';
$string['language'] = 'Language';
$string['pathtoclam'] = 'Path to clam';
$string['pathtoclamdescription'] = 'The filesystem path to clamscan or clamdscan';
$string['sessionlifetime'] = 'Session lifetime';
$string['sessionlifetimedescription'] = 'Time in minutes after which an inactive logged in user will be automatically logged out';
$string['setsiteoptionsfailed'] = 'Failed setting the %s option';
$string['sitelanguagedescription'] = 'The default language for the site';
$string['sitename'] = 'Site name';
$string['sitenamedescription'] = 'The overall name of the site';
$string['siteoptions'] = 'Site options';
$string['siteoptionsset'] = 'Site options have been updated';
$string['sitethemedescription'] = 'The theme for the site';
$string['theme'] = 'Theme';
$string['updatesiteoptions'] = 'Update site options';
$string['viruschecking'] = 'Virus checking';
$string['viruscheckingdescription'] = 'If checked, virus checking will be enabled for all uploaded files using ClamAV';
// Upload CSV stuff
$string['csvfile'] = 'CSV File';
$string['csvfiledescription'] = 'The file containing users to add';
......@@ -61,4 +85,6 @@ $string['uploadcsverrorincorrectfieldcount'] = 'Line %s of the file does not hav
$string['uploadcsvfile'] = 'Upload CSV File';
$string['uploadcsvfiledescription'] = 'You may use this facility to upload new users via a <acronym title="Comma Separated Values">CSV</acronym> file. Each record in the file must have a username, e-mail address and password.';
?>
......@@ -122,28 +122,6 @@ $string['forgotpassemailmessagehtml'] = '<p>Dear %s,</p>
<p><a href="' . get_config('wwwroot') . 'forgotpass.php?key=%s">' . get_config('wwwroot') . 'forgotpass.php?key=%s</a></p>';
// Site options
$string['allowpublicviews'] = 'Allow public views';
$string['allowpublicviewsdescription'] = 'If set to yes, views are accessable by the public. If set to no, only logged in users will be able to look at views';
$string['artefactviewinactivitytime'] = 'Artefact view inactivity time';
$string['artefactviewinactivitytimedescription'] = 'The time after which an inactive view or artefact will be moved to the InactiveContent area';
$string['contactaddress'] = 'Contact address';
$string['contactaddressdescription'] = 'The email address to which messages from the Contact Us form will be sent';
$string['language'] = 'Language';
$string['pathtoclam'] = 'Path to clam';
$string['pathtoclamdescription'] = 'The filesystem path to clamscan or clamdscan';
$string['sessionlifetime'] = 'Session lifetime';
$string['sessionlifetimedescription'] = 'Time in minutes after which an inactive logged in user will be automatically logged out';
$string['setsiteoptionsfailed'] = 'Failed setting the %s option';
$string['sitelanguagedescription'] = 'The default language for the site';
$string['sitename'] = 'Site name';
$string['sitenamedescription'] = 'The overall name of the site';
$string['siteoptionsset'] = 'Site options have been updated';
$string['sitethemedescription'] = 'The theme for the site';
$string['theme'] = 'Theme';
$string['updatesiteoptions'] = 'Update site options';
$string['viruschecking'] = 'Virus checking';
$string['viruscheckingdescription'] = 'If checked, virus checking will be enabled for all uploaded files using ClamAV';
// Expiry times
$string['noenddate'] = 'No end date';
$string['days'] = 'days';
......@@ -165,6 +143,7 @@ $string['linkedto'] = 'Linked to';
$string['add'] = 'Add';
$string['delete'] = 'Delete';
$string['edit'] = 'Edit';
$string['editmenus'] = 'Edit menus';
$string['loggedinmenu'] = 'Logged in menu';
$string['loggedoutmenu'] = 'Logged out menu';
$string['menuitemsaved'] = 'Menu item saved';
......@@ -173,6 +152,7 @@ $string['savingmenuitem'] = 'Saving menu item';
// Site content
$string['about'] = 'About';
$string['discardpageedits'] = 'Discard your changes to this page?';
$string['editsitecontent'] = 'Edit site content';
$string['home'] = 'Home';
$string['loggedouthome'] = 'Logged out Home';
$string['privacy'] = 'Privacy statement';
......
{include file="header.tpl"}
<p>Admin menu editor</p>
<h2>{str tag=editmenus}</h2>
<div>
{$EDIT}
......
{include file="header.tpl"}
<p>Admin site page editor</p>
<h2>{str tag=editsitecontent}</h2>
{$pageeditform}
......
{include file="header.tpl"}
<h2>AdminSiteOptions</h2>
<h2>{str section=admin tag=siteoptions}</h2>
{$SITEOPTIONFORM}
......
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