webui: fix display issue for boolean values
This commit is contained in:
parent
9d6a56a0d3
commit
c3bf2577da
1 changed files with 7 additions and 4 deletions
|
@ -267,6 +267,9 @@ tvheadend.idnode_editor_field = function(f, create)
|
|||
{
|
||||
var d = f.rdonly || false;
|
||||
if (f.wronly && !create) d = false;
|
||||
var value = f.value;
|
||||
if (value == null)
|
||||
value = f.default;
|
||||
|
||||
/* Enumerated (combobox) type */
|
||||
if (f.enum) {
|
||||
|
@ -276,7 +279,7 @@ tvheadend.idnode_editor_field = function(f, create)
|
|||
return new cons({
|
||||
fieldLabel : f.caption,
|
||||
name : f.id,
|
||||
value : f.value || f.default,
|
||||
value : value,
|
||||
disabled : d,
|
||||
width : 300,
|
||||
mode : 'local',
|
||||
|
@ -308,7 +311,7 @@ tvheadend.idnode_editor_field = function(f, create)
|
|||
return new Ext.form.TextField({
|
||||
fieldLabel : f.caption,
|
||||
name : f.id,
|
||||
value : f.value || f.default,
|
||||
value : value,
|
||||
disabled : d,
|
||||
width : 300
|
||||
});
|
||||
|
@ -318,7 +321,7 @@ tvheadend.idnode_editor_field = function(f, create)
|
|||
return new Ext.form.Checkbox({
|
||||
fieldLabel : f.caption,
|
||||
name : f.id,
|
||||
checked : f.value || f.default,
|
||||
checked : value,
|
||||
disabled : d
|
||||
});
|
||||
break;
|
||||
|
@ -330,7 +333,7 @@ tvheadend.idnode_editor_field = function(f, create)
|
|||
return new Ext.form.NumberField({
|
||||
fieldLabel : f.caption,
|
||||
name : f.id,
|
||||
value : f.value || f.default,
|
||||
value : value,
|
||||
disabled : d,
|
||||
width : 300
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue