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.
17 lines
912 B
17 lines
912 B
1 year ago
|
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 || {});
|
||
|
};
|