Commit faf56247 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Moved edit site page strings to admin section

parent 013e0ddb
......@@ -33,7 +33,7 @@ require_once('form.php');
$sitepages = get_records('site_content');
$pageoptions = array();
foreach ($sitepages as $page) {
$pageoptions[$page->name] = get_string($page->name);
$pageoptions[$page->name] = get_string($page->name,'admin');
}
asort($pageoptions);
......@@ -46,7 +46,7 @@ $f = array(
'elements' => array(
'pagename' => array(
'type' => 'select',
'title' => get_string('pagename'),
'title' => get_string('pagename','admin'),
'defaultvalue' => 'home',
'options' => $pageoptions
),
......@@ -55,15 +55,15 @@ $f = array(
'type' => 'wysiwyg',
'rows' => 20,
'cols' => 80,
'title' => get_string('pagetext'),
'description' => get_string('pagecontents'),
'title' => get_string('pagetext','admin'),
'description' => get_string('pagecontents','admin'),
'rules' => array(
'required' => true
)
),
'submit' => array(
'type' => 'submit',
'value' => get_string('savechanges')
'value' => get_string('savechanges','admin')
),
)
);
......@@ -81,9 +81,9 @@ function editsitepage_submit($values) {
update_record('site_content', $data, 'name');
}
catch (SQLException $e) {
json_reply('local', get_string('savefailed'));
json_reply('local', get_string('savefailed','admin'));
}
json_reply(false, get_string('pagesaved'));
json_reply(false, get_string('pagesaved','admin'));
}
if (use_html_editor()) {
......
......@@ -89,6 +89,22 @@ $string['savingmenuitem'] = 'Saving menu item';
$string['loggedinmenu'] = 'Logged in menu';
$string['loggedoutmenu'] = 'Logged out menu';
// 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['pagecontents'] = 'Text to appear on the page';
$string['pagename'] = 'Page name';
$string['pagesaved'] = 'Page saved';
$string['pagetext'] = 'Page text';
$string['privacy'] = 'Privacy statement';
$string['savechanges'] = 'Save changes';
$string['sitecontentnotfound'] = '%s text not available';
$string['termsandconditions'] = 'Terms and conditions';
$string['uploadcopyright'] = 'Upload copyright statement';
// Upload CSV stuff
$string['csvfile'] = 'CSV File';
$string['csvfiledescription'] = 'The file containing users to add';
......
......@@ -136,21 +136,7 @@ $string['add'] = 'Add';
$string['delete'] = 'Delete';
$string['edit'] = 'Edit';
// 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';
$string['pagecontents'] = 'Text to appear on the page';
$string['pagename'] = 'Page name';
$string['pagesaved'] = 'Page saved';
$string['pagetext'] = 'Page text';
$string['savechanges'] = 'Save changes';
$string['sitecontentnotfound'] = '%s text not available';
$string['termsandconditions'] = 'Terms and conditions';
$string['uploadcopyright'] = 'Upload copyright statement';
// Contact us form
$string['name'] = 'Name';
......
{include file="header.tpl"}
<h2>{str tag=editsitecontent}</h2>
<h2>{str section=admin tag=editsitecontent}</h2>
{$pageeditform}
......
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