You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
912 B
16 lines
912 B
var getNamedInputValues = function ($scope) { |
|
return filter($scope.inputVal(), function (val, key) { |
|
return key !== 'undefined'; |
|
}); |
|
}; |
|
|
|
var generateNameMappedInputValues = function (group, index, defaultValue, override) { |
|
var defaultObject = {}; |
|
defaultObject['group-' + group + '[' + index + '][text-input]'] = defaultValue; |
|
defaultObject['group-' + group + '[' + index + '][textarea-input]'] = defaultValue; |
|
defaultObject['group-' + group + '[' + index + '][select-input]'] = defaultValue || null; |
|
defaultObject['group-' + group + '[' + index + '][radio-input]'] = defaultValue || null; |
|
defaultObject['group-' + group + '[' + index + '][checkbox-input][]'] = defaultValue ? [defaultValue] : []; |
|
defaultObject['group-' + group + '[' + index + '][multiple-select-input][]'] = defaultValue ? [defaultValue] : []; |
|
return $.extend(defaultObject, override || {}); |
|
};
|
|
|