user selection: Make inserting the search term into lang strings in JavaScript more robust.

This commit is contained in:
tjhunt
2008-10-30 03:56:48 +00:00
parent 7b553c8b58
commit 73064df8f7
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -471,8 +471,8 @@ abstract class user_selector_base {
// Initialise the selector.
$output .= print_js_call('new user_selector', array($this->name, $hash,
sesskey(), $this->extrafields, get_string('previouslyselectedusers'),
get_string('nomatchingusers')), true);
sesskey(), $this->extrafields, get_string('previouslyselectedusers', '', '%%SEARCHTERM%%'),
get_string('nomatchingusers', '', '%%SEARCHTERM%%')), true);
return $output;
}
}
+1 -1
View File
@@ -283,7 +283,7 @@ user_selector.prototype.handle_selection_change = function() {
// Methods for refreshing the list of displayed options ========================
user_selector.prototype.insert_search_into_str = function(string, search) {
return string.replace("''", "'" + search + "'");
return string.replace("%%SEARCHTERM%%", search);
}
/**