From d75f880dc8f8b1dac6178478559e9942edaa0f0b Mon Sep 17 00:00:00 2001 From: Elorfin Date: Wed, 28 Feb 2024 11:22:35 +0100 Subject: [PATCH] [Dropzone] fixes correction criteria --- .../correction/components/correction-form.jsx | 13 ++++++++----- .../components/modal/correction-modal.jsx | 15 +++++++++------ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/plugin/drop-zone/Resources/modules/resources/dropzone/correction/components/correction-form.jsx b/src/plugin/drop-zone/Resources/modules/resources/dropzone/correction/components/correction-form.jsx index 867036197b3..06b96ea49ea 100644 --- a/src/plugin/drop-zone/Resources/modules/resources/dropzone/correction/components/correction-form.jsx +++ b/src/plugin/drop-zone/Resources/modules/resources/dropzone/correction/components/correction-form.jsx @@ -34,11 +34,14 @@ const CriteriaForm = props => id={`criterion-form-${c.id}-radio`} type="choice" label={trans('criterion_form_radio')} - choices={[...Array(props.dropzone.parameters.criteriaTotal).keys()].reduce((acc, current) => { - acc[current] = `${current}` + options={{ + inline: true, + choices: [...Array(props.dropzone.parameters.criteriaTotal).keys()].reduce((acc, current) => { + acc[current] = `${current}` - return acc - }, {})} + return acc + }, {}) + }} hideLabel={true} value={props.grades.find(g => g.criterion === c.id).value} onChange={value => props.handleUpdate(c.id, parseInt(value))} @@ -138,7 +141,7 @@ export class CorrectionForm extends Component { label={trans('comment', {}, 'platform')} value={this.state.correction.comment || ''} onChange={value => this.updateCorrection('comment', value)} - minRows={3} + options={{minRows: 3}} error={get(this.state.errors, 'comment')} /> } diff --git a/src/plugin/drop-zone/Resources/modules/resources/dropzone/correction/components/modal/correction-modal.jsx b/src/plugin/drop-zone/Resources/modules/resources/dropzone/correction/components/modal/correction-modal.jsx index 2e031ecf1e3..c879d5e60f2 100644 --- a/src/plugin/drop-zone/Resources/modules/resources/dropzone/correction/components/modal/correction-modal.jsx +++ b/src/plugin/drop-zone/Resources/modules/resources/dropzone/correction/components/modal/correction-modal.jsx @@ -75,7 +75,7 @@ class DenialBox extends Component { label={trans('denial_reason', {}, 'dropzone')} value={this.state.correction.correctionDeniedComment || ''} onChange={value => this.updateCorrectionDeniedComment(value)} - minRows={3} + options={{minRows: 3}} error={this.state.error} />
@@ -142,11 +142,14 @@ class CorrectionModal extends Component { id={`criterion-form-${c.id}-radio`} label="correction_criterion_radio" type="choice" - choices={[...Array(this.props.dropzone.parameters.criteriaTotal).keys()].reduce((acc, current) => { - acc[current] = `${current}` - - return acc - }, {})} + options={{ + inline: true, + choices: [...Array(this.props.dropzone.parameters.criteriaTotal).keys()].reduce((acc, current) => { + acc[current] = `${current}` + + return acc + }, {}) + }} disabled={true} hideLabel={true} value={this.props.correction.grades.find(g => g.criterion === c.id) ?