|
1 | 1 | /** |
2 | 2 | * @module FieldControls |
3 | 3 | */ |
4 | | -import { TextField, Typography } from '@material-ui/core' |
| 4 | +import { FormHelperText, TextField, Typography } from '@material-ui/core' |
5 | 5 | import { deepMerge } from '@sensenet/client-utils' |
6 | 6 | import { LongTextFieldSetting } from '@sensenet/default-content-types' |
7 | 7 | import React, { useState } from 'react' |
@@ -29,23 +29,26 @@ export const Textarea: React.FC<ReactClientFieldSetting<LongTextFieldSetting>> = |
29 | 29 | case 'edit': |
30 | 30 | case 'new': |
31 | 31 | return ( |
32 | | - <TextField |
33 | | - variant="outlined" |
34 | | - rows={3} |
35 | | - autoFocus={props.autoFocus} |
36 | | - onChange={handleChange} |
37 | | - name={props.settings.Name} |
38 | | - id={props.settings.Name} |
39 | | - label={props.settings.DisplayName} |
40 | | - placeholder={props.settings.DisplayName} |
41 | | - value={value} |
42 | | - required={props.settings.Compulsory} |
43 | | - disabled={props.settings.ReadOnly} |
44 | | - multiline={true} |
45 | | - fullWidth={true} |
46 | | - helperText={props.hideDescription ? undefined : props.settings.Description} |
47 | | - InputLabelProps={{ shrink: true }} |
48 | | - /> |
| 32 | + <> |
| 33 | + <label htmlFor={props.settings.Name} style={{ fontSize: '15px' }}> |
| 34 | + {`${props.settings.DisplayName} (${props.settings.Name})`} |
| 35 | + </label> |
| 36 | + <TextField |
| 37 | + variant="outlined" |
| 38 | + autoFocus={props.autoFocus} |
| 39 | + onChange={handleChange} |
| 40 | + name={props.settings.Name} |
| 41 | + id={props.settings.Name} |
| 42 | + placeholder={props.settings.DisplayName} |
| 43 | + value={value} |
| 44 | + required={props.settings.Compulsory} |
| 45 | + disabled={props.settings.ReadOnly} |
| 46 | + multiline={true} |
| 47 | + fullWidth={true} |
| 48 | + helperText={props.hideDescription ? undefined : props.settings.Description} |
| 49 | + /> |
| 50 | + {!props.hideDescription && <FormHelperText>{props.settings.Description}</FormHelperText>} |
| 51 | + </> |
49 | 52 | ) |
50 | 53 | case 'browse': |
51 | 54 | default: |
|
0 commit comments