<commit_before>(function(angular) {
	'use strict';

	angular.module('xpsui:controllers')
	.controller('xpsui:RegistryCustomTemplateCtrl', ['$scope', '$routeParams', '$http', 
		'xpsui:SchemaUtil', 'xpsui:NotificationFactory', '$location', 'xpsui:NavigationService',
		function($scope, $routeParams, $http, schemaUtilFactory, notificationFactory, $location, navigationService) {
			$scope.model = {};
			$scope.currentSchemaUri = schemaUtilFactory.decodeUri($routeParams.schema);

			if ($routeParams.template == 'playerLicenseCard.html' || $routeParams.template == 'playerHostingCard.html' || $routeParams.template == 'officerCard.html') {
				$scope.model = {};
				$scope.currentSchemaUri = schemaUtilFactory.decodeUri($routeParams.schema);

				$http({ method : 'GET',url: '/udao/getBySchema/'+$routeParams.schema+'/'+ $routeParams.id})
				.success(function(data, status, headers, config){
					$scope.model = data;
				}).error(function(err) {
					notificationFactory.error(err);
				});
				return;
			};


			if ($routeParams.template == 'createMember.html') {
				$http({ method : 'GET',
					url: '/udao/getBySchema/uri~3A~2F~2Fregistries~2Frequisitions~23views~2FpeopleRegistrationApplicant~2Fview'
						+ '/' + $routeParams.id})
				.success(function(data, status, headers, config) {
					var copyFields = [
					                  { 'path': 'model.obj', 'value': data }
					];
					var uri = '/registry/new/uri~3A~2F~2Fregistries~2Fpeople~23views~2Ffullperson';
					navigationService.navigateToPath(uri, copyFields);
					$location.path(uri);
				}).error(function(err) {
					notificationFactory.error(err);
				});
				return;
			}

			if ($routeParams.template == 'createTransfer.html') {
				$http({ method : 'GET',
					url: '/udao/getBySchema/uri~3A~2F~2Fregistries~2Frequisitions~23views~2FtransferApplicant~2Fview'
						+ '/' + $routeParams.id})
				.success(function(data, status, headers, config) {
					var copyFields = [
					                  { 'path': 'model.obj.baseData', 'value': data.transferData }<commit_msg>Fix: New member created by action link could not be saved.<commit_after>(function(angular) {
	'use strict';

	angular.module('xpsui:controllers')
	.controller('xpsui:RegistryCustomTemplateCtrl', ['$scope', '$routeParams', '$http', 
		'xpsui:SchemaUtil', 'xpsui:NotificationFactory', '$location', 'xpsui:NavigationService',
		function($scope, $routeParams, $http, schemaUtilFactory, notificationFactory, $location, navigationService) {
			$scope.model = {};
			$scope.currentSchemaUri = schemaUtilFactory.decodeUri($routeParams.schema);

			if ($routeParams.template == 'playerLicenseCard.html' || $routeParams.template == 'playerHostingCard.html' || $routeParams.template == 'officerCard.html') {
				$scope.model = {};
				$scope.currentSchemaUri = schemaUtilFactory.decodeUri($routeParams.schema);

				$http({ method : 'GET',url: '/udao/getBySchema/'+$routeParams.schema+'/'+ $routeParams.id})
				.success(function(data, status, headers, config){
					$scope.model = data;
				}).error(function(err) {
					notificationFactory.error(err);
				});
				return;
			};


			if ($routeParams.template == 'createMember.html') {
				$http({ method : 'GET',
					url: '/udao/getBySchema/uri~3A~2F~2Fregistries~2Frequisitions~23views~2FpeopleRegistrationApplicant~2Fview'
						+ '/' + $routeParams.id})
				.success(function(data, status, headers, config) {
					delete data.id;
					var copyFields = [
					                  { 'path': 'model.obj', 'value': data }
					];
					var uri = '/registry/new/uri~3A~2F~2Fregistries~2Fpeople~23views~2Ffullperson';
					navigationService.navigateToPath(uri, copyFields);
					$location.path(uri);
				}).error(function(err) {
					notificationFactory.error(err);
				});
				return;
			}

			if ($routeParams.template == 'createTransfer.html') {
				$http({ method : 'GET',
					url: '/udao/getBySchema/uri~3A~2F~2Fregistries~2Frequisitions~23views~2FtransferApplicant~2Fview'
						+ '/' + $routeParams.id})
				.success(function(data, status, headers, config) {
					var copyFields = [
					                  { 'path': 'model.obj.baseData', 'value': data.transferData }
{'fraction_non_alphanumeric': 0.16514203177660086, 'fraction_numerical': 0.011073663938372653, 'mean_word_length': 4.12962962962963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '373974', 'n_tokens_mistral': 1591, 'n_tokens_neox': 1318, 'n_words': 198}