libs/web: fix placeholder attribute for DynList
This commit is contained in:
parent
161218a576
commit
48838ea0f7
@ -501,6 +501,7 @@ function cbi_dynlist_init(name, respath, datatype, optional, choices)
|
||||
var input0 = document.getElementsByName(name)[0];
|
||||
var prefix = input0.name;
|
||||
var parent = input0.parentNode;
|
||||
var holder = input0.placeholder;
|
||||
|
||||
var values;
|
||||
|
||||
@ -545,6 +546,11 @@ function cbi_dynlist_init(name, respath, datatype, optional, choices)
|
||||
t.index = i;
|
||||
t.className = 'cbi-input-text';
|
||||
|
||||
if (i == 0 && holder)
|
||||
{
|
||||
t.placeholder = holder;
|
||||
}
|
||||
|
||||
var b = document.createElement('img');
|
||||
b.src = respath + ((i+1) < values.length ? '/cbi/remove.gif' : '/cbi/add.gif');
|
||||
b.className = 'cbi-image-button';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user