2
0
forked from Wavyzz/dolibarr

Fix: clear old data before update

This commit is contained in:
Regis Houssin
2012-08-29 18:01:00 +02:00
parent 327e51ccd9
commit 13d46da3fe
2 changed files with 8 additions and 3 deletions

View File

@@ -139,6 +139,11 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
}
// Update an input
if (ui.item.update) {
// clear old data before update
$.each(ui.item.update, function(key, value) {
$("#" + key).val("");
});
// update fields
$.each(ui.item.update, function(key, value) {
$("#" + key).val(value).trigger("change");
});