Commit 4039f4c4 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Change to string name and debug messages

parent b1c2ed05
......@@ -86,17 +86,17 @@ var originalcontent = '';
function requestPageText() {
// Allow the user to abort change if changes have been made in the editor.
if (getEditorContent() != originalcontent) {
var answer = confirm(get_string('discardchanges'));
var answer = confirm(get_string('discardpageedits'));
if (!answer) {
$('pagename').value = oldpagename;
return;
}
}
displayMessage({'message':get_string('loadingpagecontent', $('pagename').value),'type':'info'});
logDebug(get_string('loadingpagecontent', $('pagename').value));
var d = loadJSONDoc('editchangepage.json.php',{'pagename':$('pagename').value});
d.addCallback(function(data) {
if (data.success) {
displayMessage({'message':get_string('loadedsuccessfully', $('pagename').value),'type':'info'});
logDebug(get_string('loadedsuccessfully', $('pagename').value));
setEditorContent(data.content);
originalcontent = getEditorContent();
oldpagename = $('pagename').value;
......@@ -134,7 +134,7 @@ function onLoad() {
addLoadEvent(onLoad);
EOJS;
$jsstrings = array('discardchanges');
$jsstrings = array('discardpageedits');
$smarty = smarty($js,array(),$jsstrings);
$smarty->assign('pageeditform', $form);
......
......@@ -50,7 +50,7 @@ $string['usernamedesc'] = 'Your username';
$string['usernamehelp'] = 'The username you have been given to access this system.';
// Admin site page editor
$string['discardchanges'] = 'Discard your changes to this page?';
$string['discardpageedits'] = 'Discard your changes to this page?';
$string['pagecontents'] = 'Text to appear on the page';
$string['pagename'] = 'Page name';
$string['pagetext'] = 'Page text';
......
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