Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
erikbrouwer
form-processor
Commits
1f97125e
Commit
1f97125e
authored
Nov 10, 2020
by
jaapjansma
Browse files
Fixed issue with dropdown of retrieval of default data.
parent
99edcbd9
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
1f97125e
Version 1.1
8 (not yet released)
Version 1.1
7.1
============
*
Fixed issue with dropdown of retrieval of default data.
Version 1.17
============
...
...
ang/form_processor/FormProcessorEditCtrl.js
View file @
1f97125e
...
...
@@ -53,7 +53,9 @@
$scope
.
deletedActions
=
[];
$scope
.
deletedDefaultDataInputs
=
[];
$scope
.
deletedDefaultDataActions
=
[];
$scope
.
default_data_fields
=
[];
$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
;
...
...
@@ -94,10 +96,36 @@
$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
.
default_data_fields
=
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
];
}
});
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
)
{
return
(
!
name
)
||
name
.
match
(
/^
[
a-z0-9_
]
+$/
)
?
true
:
false
;
};
...
...
ang/form_processor/FormProcessorEditCtrl/DefaultDataOutputTable.html
View file @
1f97125e
<div
class=
"crm-block"
ng-form=
"defaultDataOutput"
crm-ui-id-scope
>
<h3
class=
"widget-header"
>
{{ts('Set defaults')}}
</h3>
<table>
<thead>
<th>
{{ts('Field')}}
</th>
...
...
@@ -14,12 +13,13 @@
name=
"{{input.name}}"
crm-ui-id=
"defaultData.{{input.name}}"
crm-ui-select=
"{dropdownAutoWidth : true, allowClear: true}"
ng-model=
"
formProcessor.
default_data_output_configuration[input.name]"
ng-model=
"default_data_output_configuration[input.name]"
ng-required=
"false"
ng-options=
"field.name as field.label for field in default_data_fields track by field.name"
>
<option
value=
""
>
{{ts('- Select field to add to the output -')}}
</option>
<option
ng-repeat=
"field in default_data_fields track by field.name"
value=
"{{field.name}}"
>
{{field.label}}
</option>
</select>
</td>
</tr>
</table>
</div>
info.xml
View file @
1f97125e
...
...
@@ -17,7 +17,7 @@
<url
desc=
"Action-Provider Extension"
>
https://lab.civicrm.org/extensions/action-provider
</url>
</urls>
<releaseDate>
2020-11-10
</releaseDate>
<version>
1.1
8-dev
</version>
<version>
1.1
7.1
</version>
<develStage>
stable
</develStage>
<compatibility>
<ver>
4.7
</ver>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment