Commit 19770236 authored by jaapjansma's avatar jaapjansma
Browse files

Fixed issue with dropdown of retrieval of default data.

parent d2811ab0
Version 1.18 (not yet released)
Version 1.17.2
============
* Fixed issue with dropdown of retrieval of default data.
Version 1.17.1
============
......
......@@ -54,8 +54,6 @@
$scope.deletedDefaultDataInputs = [];
$scope.deletedDefaultDataActions = [];
$scope.default_data_fields = {};
$scope.doNotChangeDefaultDataOutputConfiguration = false;
$scope.default_data_output_configuration = $scope.formProcessor.default_data_output_configuration;
$scope.permissions = CRM.form_processor.permissions;
$scope.actionTitles = CRM.form_processor.actionTitles;
$scope.defaultDataActionTitles = CRM.form_processor.defaultDataActionTitles;
......@@ -96,34 +94,10 @@
$scope.$watchCollection('formProcessor.default_data_actions', function (newActions, oldActions) {
formProcessorFactory.getFieldList([], $scope.formProcessor.default_data_actions, false, "form_processor_default_data")
.then(function(fields) {
$scope.doNotChangeDefaultDataOutputConfiguration = true;
angular.forEach(fields, function(field, key) {
if (!$scope.default_data_fields.hasOwnProperty(field.name)) {
$scope.default_data_fields[field.name] = field;
}
});
angular.forEach($scope.default_data_fields, function(fieldLabel, fieldName) {
var found = false;
angular.forEach(fields, function(field, key) {
if (field.name == fieldName) {
found = true;
}
});
if (!found) {
delete $scope.default_data_fields[fieldName];
}
var originalDefaultDataOutputConfiguration = $scope.formProcessor.default_data_output_configuration;
$scope.default_data_fields = fields;
$scope.formProcessor.default_data_output_configuration = originalDefaultDataOutputConfiguration;
});
angular.forEach($scope.formProcessor.default_data_output_configuration, function(mapping, field) {
$scope.default_data_output_configuration[field] = mapping;
});
$scope.doNotChangeDefaultDataOutputConfiguration = false;
});
});
$scope.$watchCollection('default_data_output_configuration', function(newDefaultDataOutputConfiguration, oldDefaultDataOutputConfiguration) {
if (!$scope.doNotChangeDefaultDataOutputConfiguration) {
$scope.formProcessor.default_data_output_configuration = newDefaultDataOutputConfiguration;
}
});
$scope.isValidName = function(name) {
......
......@@ -13,7 +13,7 @@
name="{{input.name}}"
crm-ui-id="defaultData.{{input.name}}"
crm-ui-select="{dropdownAutoWidth : true, allowClear: true}"
ng-model="default_data_output_configuration[input.name]"
ng-model="formProcessor.default_data_output_configuration[input.name]"
ng-required="false"
>
<option value="">{{ts('- Select field to add to the output -')}}</option>
......
......@@ -16,8 +16,8 @@
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
<url desc="Action-Provider Extension">https://lab.civicrm.org/extensions/action-provider</url>
</urls>
<releaseDate>2020-11-10</releaseDate>
<version>1.18-dev</version>
<releaseDate>2020-11-11</releaseDate>
<version>1.17.2</version>
<develStage>stable</develStage>
<compatibility>
<ver>4.7</ver>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment