Skip to content

Commit

Permalink
Editor / Validation / INSPIRE validation is only available for ISO191…
Browse files Browse the repository at this point in the history
…39 records.
  • Loading branch information
fxprunayre committed Dec 21, 2018
1 parent 2976cd3 commit 1cf680c
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,21 @@

module.directive(
'gnMdValidationTools', ['gnConfig', '$http', '$interval',
'gnAlertService', '$translate', 'gnPopup',
'gnAlertService', '$translate', 'gnPopup', 'gnCurrentEdit',
function(gnConfig, $http, $interval,
gnAlertService, $translate, gnPopup) {
gnAlertService, $translate, gnPopup, gnCurrentEdit) {
return {
restrict: 'AEC',
replace: true,
templateUrl:
'../../catalog/components/validationtools/partials/mdValidationTools.html',
link: function postLink(scope, element, attrs) {

// INSPIRE validator only support ISO19139 records.
// TODO: For other schema support we may need to convert the record
// to ISO19139 first. eg. ISO19115-3
scope.isInspireValidationEnabled =
gnConfig[gnConfig.key.isInspireEnabled];
gnConfig[gnConfig.key.isInspireEnabled]
&& gnCurrentEdit.schema == 'iso19139';
scope.isDownloadingRecord = false;
scope.isDownloadedRecord = false;
scope.isEnabled = false;
Expand Down

0 comments on commit 1cf680c

Please sign in to comment.