admin: Able to import Cyberrange teams from interface

This commit is contained in:
nemunaire 2025-03-26 14:44:02 +01:00
parent f1ada8ce99
commit 485e6b0173
4 changed files with 64 additions and 8 deletions

View file

@ -81,6 +81,22 @@ angular.module("FICApp")
});
}
}
}])
.directive('fileModel', ['$parse', function ($parse) {
return {
restrict: 'A',
link: function($scope, element, attrs) {
var model = $parse(attrs.fileModel);
var modelSetter = model.assign;
element.bind('change', function(){
$scope.$apply(function(){
modelSetter($scope, element[0].files[0]);
$scope.uploadFile();
});
});
}
};
}]);
angular.module("FICApp")