diff --git a/anet-dictionary.yml b/anet-dictionary.yml index 98a7ac6c18..35aec39e24 100644 --- a/anet-dictionary.yml +++ b/anet-dictionary.yml @@ -47,7 +47,7 @@ fields: longName: label: Objective / Effort description placeholder: Enter an objective / effort description, example .... - as: textarea + asA: textarea style: height: 400px topLevel: @@ -59,7 +59,7 @@ fields: longName: label: Description of this Objective placeholder: Enter a description for this Objective, example .... - as: textarea + asA: textarea style: height: 400px assessments: @@ -85,7 +85,7 @@ fields: longName: label: Effort description placeholder: Enter an effort description, example .... - as: textarea + asA: textarea style: height: 400px assessments: @@ -211,7 +211,7 @@ fields: label: Questions helpText: JSON that defines the assessment (you need to know what you are doing) placeholder: Fill in valid JSON - as: textarea + asA: textarea style: height: 200px @@ -481,7 +481,7 @@ fields: label: Textarea field placeholder: Placeholder text for textarea field helpText: Help text for textarea field - as: textarea + asA: textarea style: height: 200px visibleWhen: $[?(@ && @.colourOptions === 'GREEN')] @@ -584,7 +584,7 @@ fields: label: Textarea field placeholder: Placeholder text for textarea field helpText: Help text for textarea field - as: textarea + asA: textarea style: height: 200px visibleWhen: $[?(@ && @.colourOptions === 'GREEN')] @@ -665,7 +665,7 @@ fields: label: Textarea field placeholder: Placeholder text for textarea field helpText: Help text for textarea field - as: textarea + asA: textarea style: height: 200px visibleWhen: $[?(@ && @.colourOptions === 'GREEN')] @@ -747,7 +747,7 @@ fields: label: Textarea field placeholder: Placeholder text for textarea field helpText: Help text for textarea field - as: textarea + asA: textarea style: height: 200px visibleWhen: $[?(@ && @.colourOptions === 'GREEN')] diff --git a/client/src/components/CustomDateInput.js b/client/src/components/CustomDateInput.js index e579d9de0f..633eecbc81 100644 --- a/client/src/components/CustomDateInput.js +++ b/client/src/components/CustomDateInput.js @@ -79,7 +79,7 @@ const CustomDateInput = ({ showActionsBar closeOnSelection={!withTime} timePickerProps={timePickerProps} - popoverProps={{ usePortal: true, placement }} + popoverProps={{ usePortal: false, placement }} disabled={disabled} /> ) diff --git a/client/src/components/CustomFields.js b/client/src/components/CustomFields.js index 5fa6ba26f5..6e30b587af 100644 --- a/client/src/components/CustomFields.js +++ b/client/src/components/CustomFields.js @@ -227,7 +227,6 @@ const JsonField = fieldProps => { : fieldValue return (
- +
diff --git a/client/src/components/RichTextEditor.css b/client/src/components/RichTextEditor.css deleted file mode 100644 index 54d616b698..0000000000 --- a/client/src/components/RichTextEditor.css +++ /dev/null @@ -1,11 +0,0 @@ -.Draftail-Editor .DraftEditor-root { - min-height: 10rem; -} - -.Draftail-Editor--focus .Draftail-Toolbar { - top: -15px; -} - -.Draftail-block--unstyled { - margin: 0.75rem 0; -} diff --git a/client/src/components/TriggerableConfirm.js b/client/src/components/TriggerableConfirm.js index 0dd8e13e1f..650e2c5e19 100644 --- a/client/src/components/TriggerableConfirm.js +++ b/client/src/components/TriggerableConfirm.js @@ -81,7 +81,7 @@ const TriggerableConfirm = ({ TriggerableConfirm.propTypes = { onConfirm: PropTypes.func.isRequired, title: PropTypes.string, - body: PropTypes.string, + body: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), confirmText: PropTypes.string, cancelText: PropTypes.string, variant: PropTypes.string, diff --git a/client/src/components/advancedSearch/ReportStateFilter.js b/client/src/components/advancedSearch/ReportStateFilter.js index 300847ce16..0ad5fa2c10 100644 --- a/client/src/components/advancedSearch/ReportStateFilter.js +++ b/client/src/components/advancedSearch/ReportStateFilter.js @@ -61,9 +61,8 @@ const ReportStateFilter = ({ stateDisplay ) : ( - ))} - + {onlyCancelled && (
due to{" "} diff --git a/client/src/components/aggregations/CalendarWidget.js b/client/src/components/aggregations/CalendarWidget.js index acdd46406e..b198b70d9a 100644 --- a/client/src/components/aggregations/CalendarWidget.js +++ b/client/src/components/aggregations/CalendarWidget.js @@ -21,7 +21,7 @@ const CalendarWidget = ({ hasPrevNext }) => { const calendarComponentRef = useRef(null) - const events = GET_CALENDAR_EVENTS_FROM[valueType](values) + const events = GET_CALENDAR_EVENTS_FROM[valueType]?.(values) const history = useHistory() if (_isEmpty(events)) { return whenUnspecified diff --git a/client/src/components/assessments/AssessmentModal.js b/client/src/components/assessments/AssessmentModal.js index 8c50cd8e83..d53e446fe8 100644 --- a/client/src/components/assessments/AssessmentModal.js +++ b/client/src/components/assessments/AssessmentModal.js @@ -1,7 +1,8 @@ import API from "api" import { CustomFieldsContainer, - customFieldsJSONString + customFieldsJSONString, + SPECIAL_WIDGET_TYPES } from "components/CustomFields" import Messages from "components/Messages" import Model, { @@ -30,6 +31,9 @@ const AssessmentModal = ({ onCancel }) => { const [assessmentError, setAssessmentError] = useState(null) + const hasRichTextEditor = Object.values(assessmentConfig).find( + question => question.widget === SPECIAL_WIDGET_TYPES.RICH_TEXT_EDITOR + ) const edit = !!note.uuid const initialValues = useMemo( () => @@ -44,7 +48,8 @@ const AssessmentModal = ({ centered show={showModal} onHide={closeModal} - style={{ zIndex: "1220" }} + dialogClassName={hasRichTextEditor && "rich-text-modal"} + style={{ zIndex: "1250" }} > { centered show={showModal} aria-labelledby="Link chooser" + className="editor-link-chooser" onHide={() => setShowModal(false)} > diff --git a/client/src/components/editor/RichTextEditor.css b/client/src/components/editor/RichTextEditor.css index b41bf08ab2..d370fb90da 100644 --- a/client/src/components/editor/RichTextEditor.css +++ b/client/src/components/editor/RichTextEditor.css @@ -41,3 +41,7 @@ .editor-toggle-button.active{ background-color: #ccc; } + +.editor-link-chooser { + z-index: 1300; +} diff --git a/client/src/index.css b/client/src/index.css index d8af2c5414..7afebe2fe5 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -73,6 +73,10 @@ h4.legend { margin-top: -2rem; } +.legend small .btn.btn-outline-danger.float-end { + margin-top: -1.5rem; +} + .legend small :not(.btn-group) .btn + .btn { margin-left: 1rem; } @@ -1127,7 +1131,8 @@ header.searchPagination { } .rich-text-modal { - min-width: 650px; + width: 650px; + max-width: 100%; } @page { diff --git a/client/src/pages/tasks/Form.js b/client/src/pages/tasks/Form.js index 65b19ef8ac..07c5451f51 100644 --- a/client/src/pages/tasks/Form.js +++ b/client/src/pages/tasks/Form.js @@ -188,7 +188,6 @@ const TaskForm = ({ edit, title, initialValues, notesComponent }) => { dictProps={fieldSettings.longName} name="longName" component={FieldHelper.InputField} - asA="textarea" /> {disabled ? ( diff --git a/src/main/resources/anet-schema.yml b/src/main/resources/anet-schema.yml index 29ac1b607d..bcdef61830 100644 --- a/src/main/resources/anet-schema.yml +++ b/src/main/resources/anet-schema.yml @@ -41,7 +41,7 @@ $defs: type: string title: The placeholder for this field description: Used in the UI where a placeholder for the field is shown (example input). - as: + asA: type: string title: The bootstrap component class description: Used to determine how the user interface of this particular field looks. @@ -92,7 +92,7 @@ $defs: type: object placeholder: type: string - as: + asA: type: string filters: type: array