Skip to content

Commit f011c42

Browse files
committed
Merge branch 'feature/silverstripe-5'
2 parents 8135f7b + 44c5c1b commit f011c42

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This module provides an easy way to build such tree and to add it to a page as a
1111

1212
## Requirements
1313

14-
* SilverStripe 4.x
14+
* SilverStripe 5.x
1515
* (dnadesign/silvertsripe-elemental)[https://github.com/dnadesign/silverstripe-elemental]
1616

1717
## Screenshots

composer.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@
1717
"minimum-stability": "dev",
1818
"prefer-stable": true,
1919
"require": {
20-
"dnadesign/silverstripe-elemental": ">=3",
20+
"dnadesign/silverstripe-elemental": "^5",
2121
"silvershop/silverstripe-hasonefield": "^3",
22-
"unclecheese/display-logic": "^2.0"
22+
"unclecheese/display-logic": "^3"
23+
},
24+
"config": {
25+
"allow-plugins": {
26+
"composer/installers": true,
27+
"silverstripe/vendor-plugin": true
28+
}
2329
}
2430
}

src/Model/DecisionTreeAnswer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getCMSFields()
4040
// Update Parent Question
4141
$question = $fields->dataFieldByName('QuestionID');
4242
$question->setTitle('Answer for');
43-
$fields->insertBefore($question, 'Title');
43+
$fields->insertBefore('Title', $question);
4444

4545
if ($this->IsInDB()) {
4646
// Set up Step Selector

src/Model/DecisionTreeStep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getCMSFields()
6464
// Allow to hide the title only on Result
6565
$hideTitle = CheckboxField::create('HideTitle', 'Hide title');
6666
$hideTitle->displayIf('Type')->isEqualTo('Result')->end();
67-
$fields->insertAfter($hideTitle, 'Type');
67+
$fields->insertAfter('Type', $hideTitle);
6868

6969
if ($this->IsInDB()) {
7070
// Display Parent Answer

0 commit comments

Comments
 (0)