Commit 7db08184 authored by Saskia Schreiber's avatar Saskia Schreiber

[FEATURE] Add needed textChecker fields from previous project

parent 1742f39e
......@@ -26,6 +26,7 @@ Ext.define('ARSnova.view.speaker.form.FreeTextQuestion', {
],
config: {
scrollable: null,
pressed: 'free',
cls: 'centerFormTitle'
},
......@@ -88,11 +89,118 @@ Ext.define('ARSnova.view.speaker.form.FreeTextQuestion', {
style: 'margin-top:45px;',
items: [this.imgUploadBtn]
});
this.textCheckerStricktOptionsFormPart = Ext.create('ARSnova.view.speaker.form.textCheckerStricktOptionsForm', {
id: 'textCheckerStricktOptionsFormPart'
});
this.add([answerFieldset, this.textAnswerFieldSet, this.textCheckerStricktOptionsFormPart]);
var freeButton = Ext.create('Ext.Button', {
text: Messages.FREETEXT_BUTTON_FREE,
handler: function () {
mainFormPanel.hide();
selectField.hide();
ratingField.hide();
me.textCheckerStricktOptionsFormPart.hide();
},
pressed: this.getPressed() === 'free'
});
var fixButton = Ext.create('Ext.Button', {
text: Messages.FREETEXT_BUTTON_FIX,
handler: function () {
mainFormPanel.show();
selectField.show();
ratingField.show();
},
pressed: this.getPressed() === 'fix'
});
var ffSegmentedButton = Ext.create('Ext.SegmentedButton', {
style: 'margin: auto;',
defaults: {
ui: 'action',
style: 'width: 50%'
},
items:[freeButton, fixButton]
});
var freefixField = Ext.create('Ext.form.FieldSet', {
xtype: 'fieldset',
title: Messages.FREETEXT_QUESTION_TYPE,
items: [ffSegmentedButton]
});
var easyButton = Ext.create('Ext.Button', {
text: Messages.FREETEXT_BUTTON_EASY,
handler: function () {
me.textCheckerStricktOptionsFormPart.hide();
},
pressed: true
});
var strictButton = Ext.create('Ext.Button', {
text: Messages.FREETEXT_BUTTON_STRICT,
handler: function () {
me.textCheckerStricktOptionsFormPart.show();
},
pressed: this.getPressed() === 'strict'
});
var esSegmentedButton = Ext.create('Ext.SegmentedButton', {
style: 'margin: auto;',
defaults: {
ui: 'action',
style: 'width: 50%'
},
items:[easyButton, strictButton]
});
var selectField = Ext.create('Ext.form.FieldSet', {
xtype: 'fieldset',
title: Messages.FREETEXT_CHECK,
items: [esSegmentedButton],
hidden: true
});
var rating = Ext.create("ARSnova.view.CustomSliderField", {
minValue: 0,
maxValue: 10,
value: 0,
increment: 1
});
var ratingField = Ext.create('Ext.form.FieldSet', {
xtype: 'fieldset',
title: Messages.ANSWER_POINTS,
items: [rating],
hidden: true
});
// Eingabefeld
var textarea = Ext.create('Ext.plugins.ResizableTextArea', {
name: 'text',
placeHolder: Messages.FORMAT_PLACEHOLDER
});
var sizearea = Ext.create('Ext.field.Text', {
name: 'size',
placeHolder: Messages.FREETEXT_SIZE
});
var mainFormPanel = Ext.create('Ext.form.FormPanel', {
cls: 'newTest',
scrollable: null,
items: [{
xtype: 'fieldset',
title: Messages.CORRECT_PLACEHOLDER,
items: [textarea, sizearea]
}],
hidden: true
});
this.add([answerFieldset,
this.textAnswerFieldSet,
freefixField,
mainFormPanel,
selectField,
this.textCheckerStricktOptionsFormPart,
ratingField]);
},
getQuestionValues: function () {
......
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