Skip to content

Commit 7997fad

Browse files
committed
Merge branch 'release/3.3.2'
2 parents afb9f3b + 003ea95 commit 7997fad

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to the Form Render Skip Logic module will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [3.3.2] - 2018-08-14
6+
### Changed
7+
- Fix wrong behavior of "Control mode" field on config form. (Tiago Bember Simeao)
8+
9+
510
## [3.3.1] - 2018-08-13
611
### Changed
712
- Refactor 2.x - 3.x migration in order to use External Modules API functions. (Tiago Bember Simeao)

js/config.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,13 @@ $(document).ready(function() {
7979
});
8080

8181
$modal.find('tr[field="control_mode"]').each(function() {
82-
var defaultValue = 'default';
83-
$(this).find('.external-modules-input-element').each(function() {
84-
// Not using ":checked" selector to get the selected radio
85-
// due to a possible bug on EM that unchecks radios within
86-
// repeatable elements.
87-
if (typeof this.attributes.checked !== 'undefined') {
88-
defaultValue = $(this).val();
89-
return false;
90-
}
91-
});
82+
var $checked = $(this).find('.external-modules-input-element:checked');
83+
84+
if ($checked.length === 0) {
85+
$checked = $(this).find('.external-modules-input-element[value="default"]');
86+
}
9287

93-
branchingLogicRadios($(this).find('.external-modules-input-element[value="' + defaultValue + '"]'));
88+
branchingLogicRadios($checked);
9489
});
9590

9691
$modal.find('tr[field="control_mode"] .external-modules-input-element').change(function() {

0 commit comments

Comments
 (0)