Skip to content

Commit

Permalink
more sinopia fixes (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkhess authored Mar 27, 2019
1 parent d62fe24 commit 9fbb94d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion source/assets/js/modules/profile/services/formHandler.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ angular.module('locApp.modules.profile.services')
});
};

var removeSchemaUrls = function(profile) {
if (profile.schema) delete profile.schema;
angular.forEach(profile.resourceTemplates, function(resource){
if (resource.schema) delete resource.schema;
})
}

/**
* @ngdoc function
* @name getFormData
Expand All @@ -36,7 +43,8 @@ angular.module('locApp.modules.profile.services')
handler.getFormData = function(profile, removeDefault) {
// TODO: add things here
if(removeDefault) removeDefaults(profile);

removeSchemaUrls(profile);

obj = {};
obj.Profile = profile;
return obj;
Expand All @@ -45,3 +53,4 @@ angular.module('locApp.modules.profile.services')
return handler;
});


Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ angular.module('locApp.modules.profile.services')

handler.errors = [];

var profAttributes = ["id","title","description","date","author","contact","remark","adherence","resourceTemplates", "source"];
var resAttributes = ["id","resourceURI","resourceURL","resourceLabel","propertyTemplates","author","contact","remark"];
var profAttributes = ["id","title","description","date","author","contact","remark","adherence","schema", "resourceTemplates", "source"];
var resAttributes = ["id","resourceURI","resourceURL","resourceLabel","propertyTemplates","author", "date","contact","remark", "schema", "adherence","source"];
var propAttributes = ["propertyURI","propertyLabel","mandatory","repeatable","type","valueConstraint","remark", "resourceTemplates"];
var consAttributes = ["valueLanguage","languageURI","languageLabel","valueDataType","valueTemplateRefs","useValuesFrom","editable","remark", "repeatable", "defaultURI", "defaultLiteral", "defaults", "validatePattern"];
var dataAttributes = ["dataTypeURI","dataTypeLabel","dataTypeLabelHint","remark"];
Expand Down

0 comments on commit 9fbb94d

Please sign in to comment.