diff --git a/app/components/form/form-form.hbs b/app/components/form/form-form.hbs
index e71284722..762b398a7 100644
--- a/app/components/form/form-form.hbs
+++ b/app/components/form/form-form.hbs
@@ -1,10 +1,10 @@
@@ -26,9 +26,9 @@
{{#if question.isOpenQuestion}}
-
+
{{else}}
-
+
{{/if}}
@@ -39,14 +39,14 @@
Open vraag toevoegen
Gesloten vraag toevoegen
diff --git a/app/components/form/form-form.js b/app/components/form/form-form.js
index 038070ff0..16789f49b 100644
--- a/app/components/form/form-form.js
+++ b/app/components/form/form-form.js
@@ -1,31 +1,31 @@
import { inject as service } from '@ember/service';
-import Component from '@ember/component';
+import Component from '@glimmer/component';
+import { action } from '@ember/object';
-export const FormFormComponent = Component.extend({
- model: null,
- store: service(),
- actions: {
- createQuestion(modelClass, fieldType) {
- const form = this.model;
- const position = form.get('sortedQuestions.lastObject.position') + 1 || 0;
- this.store.createRecord(modelClass, {
- form,
- fieldType,
- position,
- required: true,
- });
- },
- addOpenQuestion() {
- this.send('createQuestion', 'form/open-question', 'text');
- },
- addClosedQuestion() {
- this.send('createQuestion', 'form/closed-question', 'radio');
- },
- },
-});
+export default class FormFormComponent extends Component {
+ @service store;
+ get model() {
+ return this.args.model;
+ }
-FormFormComponent.reopenClass({
- positionalParams: ['model'],
-});
+ createQuestion(modelClass, fieldType) {
+ const form = this.model;
+ const position = form.get('sortedQuestions.lastObject.position') + 1 || 0;
+ this.store.createRecord(modelClass, {
+ form,
+ fieldType,
+ position,
+ required: true,
+ });
+ }
-export default FormFormComponent;
+ @action
+ addOpenQuestion() {
+ this.createQuestion('form/open-question', 'text');
+ }
+
+ @action
+ addClosedQuestion() {
+ this.createQuestion('form/closed-question', 'radio');
+ }
+}
diff --git a/app/components/form/response/open-question.hbs b/app/components/form/response/open-question.hbs
index 9bdba5e97..5fd684411 100644
--- a/app/components/form/response/open-question.hbs
+++ b/app/components/form/response/open-question.hbs
@@ -1,20 +1,20 @@
-{{#if (eq question.fieldType 'textarea')}}
+{{#if (eq @question.fieldType 'textarea')}}
{{else}}
{{/if}}
\ No newline at end of file
diff --git a/app/components/form/response/open-question.js b/app/components/form/response/open-question.js
index d4f0d8f78..2c7e6d3ae 100644
--- a/app/components/form/response/open-question.js
+++ b/app/components/form/response/open-question.js
@@ -1,14 +1,7 @@
-import Component from '@ember/component';
-import { computed } from '@ember/object';
+import Component from '@glimmer/component';
-const OpenQuestionComponent = Component.extend({
- inputIdentifier: computed('question.id', function () {
- return `question-${this.question.id}`;
- }),
-});
-
-OpenQuestionComponent.reopenClass({
- positionalParams: ['question', 'answer'],
-});
-
-export default OpenQuestionComponent;
+export default class OpenQuestionComponent extends Component {
+ get inputIdentifier() {
+ return `question-${this.args.question.id}`;
+ }
+}
diff --git a/app/components/form/response/response-card.hbs b/app/components/form/response/response-card.hbs
index 84f053c9f..5f35765b5 100644
--- a/app/components/form/response/response-card.hbs
+++ b/app/components/form/response/response-card.hbs
@@ -1,25 +1,27 @@
-