forked from extern/egroupware
* Api: fix radiobox not return current selected value but the first value
This commit is contained in:
parent
771a7b71bb
commit
cb887eab90
@ -132,15 +132,17 @@ var et2_radiobox = (function(){ "use strict"; return et2_inputWidget.extend(
|
|||||||
getValue: function()
|
getValue: function()
|
||||||
{
|
{
|
||||||
var val = this.options.value; // initial value, when form is loaded
|
var val = this.options.value; // initial value, when form is loaded
|
||||||
|
var values = [];
|
||||||
this.getRoot().iterateOver(function(radio)
|
this.getRoot().iterateOver(function(radio)
|
||||||
{
|
{
|
||||||
|
values.push(radio.options.set_value);
|
||||||
if (radio.id == this.id && radio.input && radio.input.prop('checked'))
|
if (radio.id == this.id && radio.input && radio.input.prop('checked'))
|
||||||
{
|
{
|
||||||
val = radio.options.set_value;
|
val = radio.options.set_value;
|
||||||
}
|
}
|
||||||
}, this, et2_radiobox);
|
}, this, et2_radiobox);
|
||||||
|
|
||||||
return val == this.options.set_value ? this.options.set_value : null;
|
return val.indexOf(values) ? val : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user