LPS-50452 Migrate Portal Settings portlet aui-base javascript

There are a couple of possible issues with using map in this case, but the main one is that you're doing a return inside of an if statement.
The problem with this is that map will still return an array of the same length, which in this case doesn't exhibit any issues because we're joining it with ''.
But, if we were to change it to anything else, it would leave some trailing characters (for instance, let's say someone comes in and decides to replace it with '\n' or whatever).
The perfect replacement for this is instead `reduce`. The rule for remembering when to use reduce is that whenever you want to map/transform values AND filter them, reduce is your friend.
So it would look something like:

```
	return AUI._.reduce(
		fields,
		function(prev, item, index) {
			var mappingValue = form.fm(fieldValues[index]).val();

			if (mappingValue) {
				prev += mappingValue;
			}

			return prev;
		},
		''
	);
```

The third argument is the initial value. I chose a string, but it could have easily been anything, and the operation on it inside would be whatever was the correct way for manipulating that item.

Let me know if you have any questions though.