Commit 354cbe57 authored by Nigel McNie's avatar Nigel McNie
Browse files

Fix for bug #726, another string made translatable. While I was there I...

Fix for bug #726, another string made translatable. While I was there I json_encoded some of those get_string wotsits.
parent a59a1b4a
......@@ -33,8 +33,8 @@ $string['wwwroot'] = 'WWW root';
$string['port'] = 'Port number';
$string['protocol'] = 'Protocol';
$string['changepasswordurl'] = 'Password-change URL';
$string['configureanother'] = 'Please configure another plugin before deleting this one.';
$string['cannotremove'] = "We can't remove this auth plugin, as it's the only \\nplugin that exists for this institution.";
$string['saveinstitutiondetailsfirst'] = 'Please save the institution details before configuring authentication plugins.';
$string['editauthority'] = 'Edit an Authority';
$string['addauthority'] = 'Add an Authority';
......
......@@ -58,8 +58,8 @@ function pieform_element_authlist(Pieform $form, $element) {
}
$smarty->assign('name', $element['name']);
$smarty->assign('configureanother', get_string('configureanother', 'auth'));
$smarty->assign('cannotremove', get_string('cannotremove', 'auth'));
$smarty->assign('cannotremove', json_encode(get_string('cannotremove', 'auth')));
$smarty->assign('saveinstitutiondetailsfirst', json_encode(get_string('saveinstitutiondetailsfirst', 'auth')));
return $smarty->fetch('form/authlist.tpl');
}
......
......@@ -73,7 +73,7 @@
deleteArray = arrayIze('deleteList');
if (instanceArray.length == 1) {
alert("{{$cannotremove}}");
alert({{$cannotremove}});
return false;
}
......@@ -109,7 +109,7 @@
var selectedPlugin = document.getElementById('dummySelect').value;
var institution = '{{$institution}}';
if (institution.length == 0) {
alert('Please save the institution details before configuring authentication plugins.');
alert({{$saveinstitutiondetailsfirst}});
return false;
}
......@@ -191,4 +191,4 @@ section name=mysec loop=$instancelist
</select>
<a href="" onclick="addinstance(); return false;">[+]</a>
<input type="hidden" id="instancePriority" name="instancePriority" value="{{ $instancestring }}" /><br>
<input type="hidden" id="deleteList" name="deleteList" value="" /><br>
\ No newline at end of file
<input type="hidden" id="deleteList" name="deleteList" value="" /><br>
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