[IMP] Prefill for multiple choice questions
bzr revid: rim@openerp.com-20131218071910-lzpvvu7rzeuj30qe
This commit is contained in:
parent
96a86525a4
commit
5bf9954eb5
|
@ -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(){
|
||||
|
|
Loading…
Reference in New Issue