|
1 | 1 | // SPDX-FileCopyrightText: 2022 Christian Meeßen (GFZ) <[email protected]> |
2 | | -// SPDX-FileCopyrightText: 2022 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences |
3 | 2 | // SPDX-FileCopyrightText: 2022 Dusan Mijatovic (dv4all) |
| 3 | +// SPDX-FileCopyrightText: 2022 Ewan Cahen (Netherlands eScience Center) <[email protected]> |
| 4 | +// SPDX-FileCopyrightText: 2022 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences |
| 5 | +// SPDX-FileCopyrightText: 2022 Netherlands eScience Center |
4 | 6 | // SPDX-FileCopyrightText: 2022 dv4all |
5 | 7 | // |
6 | 8 | // SPDX-License-Identifier: Apache-2.0 |
@@ -213,22 +215,37 @@ export default function EditMentionModal({open, onCancel, onSubmit, item, pos, t |
213 | 215 | }} |
214 | 216 | rules={config.url.validation} |
215 | 217 | /> |
216 | | - <div className="py-2"></div> |
217 | 218 | {formData.mention_type === 'highlight' ? |
218 | | - <ControlledTextField |
219 | | - control={control} |
220 | | - options={{ |
221 | | - name: 'image_url', |
222 | | - label: config.image_url.label, |
223 | | - useNull: true, |
224 | | - defaultValue: formData?.image_url, |
225 | | - helperTextMessage: config.image_url.help, |
226 | | - helperTextCnt: `${formData?.image_url?.length || 0}/${config.image_url.validation.maxLength.value}` |
227 | | - }} |
228 | | - rules={config.image_url.validation} |
229 | | - /> |
| 219 | + <> |
| 220 | + <div className="py-2"></div> |
| 221 | + <ControlledTextField |
| 222 | + control={control} |
| 223 | + options={{ |
| 224 | + name: 'image_url', |
| 225 | + label: config.image_url.label, |
| 226 | + useNull: true, |
| 227 | + defaultValue: formData?.image_url, |
| 228 | + helperTextMessage: config.image_url.help, |
| 229 | + helperTextCnt: `${formData?.image_url?.length || 0}/${config.image_url.validation.maxLength.value}` |
| 230 | + }} |
| 231 | + rules={config.image_url.validation} |
| 232 | + /> |
| 233 | + </> |
230 | 234 | :null |
231 | 235 | } |
| 236 | + <div className="py-2"></div> |
| 237 | + <ControlledTextField |
| 238 | + control={control} |
| 239 | + options={{ |
| 240 | + name: 'note', |
| 241 | + label: config.note.label, |
| 242 | + useNull: true, |
| 243 | + defaultValue: formData?.note, |
| 244 | + helperTextMessage: config.note.help, |
| 245 | + helperTextCnt: `${formData?.note?.length || 0}/${config.note.validation.maxLength.value}`, |
| 246 | + }} |
| 247 | + rules={config.note.validation} |
| 248 | + /> |
232 | 249 | <Alert severity="warning" sx={{marginTop: '1.5rem'}}> |
233 | 250 | {/* <AlertTitle sx={{fontWeight: 500}}>Validate entered information</AlertTitle> */} |
234 | 251 | Please double check the data because this entry <strong>cannot be edited after it has been created</strong>. |
|
0 commit comments