Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

define(['app', 'angular'], function (app) {

app.directive('inputSelect', function () {
return {
restrict: 'E',
require: 'ngModel',
scope: {
'label': '@',
'hideLabel': '=',
'name': '@',
'ngId': '@',
'nullLabel': '@',
'hideNullOption': '=',
'options': '=',
'ngDisabled': '=',
'ngRequired': '=',
'ngModel': '=',
'itemChangeCallback' : '&',
'labelIcon': '=',
'defaultValue': '@'
},
link: function (scope, element, attrs, ngModelCtrl) {
scope.defaultValue = attrs.defaultValue || 'Select';
var label = scope.label.lastIndexOf(":") === scope.label.length - 1 ? scope.label.substr(0, scope.label.length - 1) : scope.label;
scope.errorHandling = {
'required' : {
message : label + ' field is required.',
priority : 1
}
};

},
templateUrl: function (elem, attr) {
return attr.useObjectOptions ? 'modules/ui-components/form/controls/simple/input-select/input-select-object_template.html' : 'modules/ui-components/form/controls/simple/input-select/input-select_template.html';
}
};
});
});