[IMP] Prefill for multiple choice questions

bzr revid: rim@openerp.com-20131218071910-lzpvvu7rzeuj30qe
This commit is contained in:
Richard Mathot (OpenERP) 2013-12-18 08:19:10 +01:00
parent 96a86525a4
commit 5bf9954eb5
1 changed files with 2 additions and 0 deletions

View File

@ -64,8 +64,10 @@ $(document).ready(function () {
function prefill(){
var prefill_def = $.ajax(prefill_controller, {dataType: "json"})
.done(function(json_data){
console.log(json_data);
_.each(json_data, function(value, key){
the_form.find(".form-control[name=" + key + "]").val(value);
the_form.find("input[type='radio'][name=" + key + "]").val([value]);
});
})
.fail(function(){