GUAC-1176: Ensure blank values are interpreted consistently (no multiple blank options in select fields).

This commit is contained in:
Michael Jumper
2015-06-08 13:18:59 -07:00
parent 9ac64441cd
commit 4eb5989c18

View File

@@ -30,6 +30,12 @@ angular.module('form').controller('selectFieldController', ['$scope', '$injector
// Required services
var translationStringService = $injector.get('translationStringService');
// Interpret undefined/null as empty string
$scope.$watch('model', function setModel(model) {
if (!model && model !== '')
$scope.model = '';
});
/**
* Produces the translation string for the given field option
* value. The translation string will be of the form: