Commit 6878d936 authored by Jos Schellevis's avatar Jos Schellevis

bugfix new form select/set

parent 21c5b9e8
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
function getFormData(parent) { function getFormData(parent) {
data = {}; data = {};
$( "#"+parent+" input,select" ).each(function( index ) { $( "#"+parent+" input,#"+parent+" select" ).each(function( index ) {
node = data ; node = data ;
keyparts = $(this).attr('id').split('.'); keyparts = $(this).attr('id').split('.');
for (var i in keyparts) { for (var i in keyparts) {
...@@ -58,9 +58,7 @@ function getFormData(parent) { ...@@ -58,9 +58,7 @@ function getFormData(parent) {
* @param data named array structure * @param data named array structure
*/ */
function setFormData(parent,data) { function setFormData(parent,data) {
//alert( JSON.stringify(data['general']['interfaces']) ); $( "#"+parent+" input,#"+parent+" select" ).each(function( index ) {
$( "#"+parent+" input,select" ).each(function( index ) {
node = data ; node = data ;
keyparts = $(this).attr('id').split('.'); keyparts = $(this).attr('id').split('.');
for (var i in keyparts) { for (var i in keyparts) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment