@@ -22,6 +22,8 @@ export class Thesis extends Component {
22
22
icon,
23
23
label,
24
24
} = this . props ;
25
+ // For backwards compability added conditional rendering for fields; it is based on their definition in the props in THESIS_CUSTOM_FIELDS_UI
26
+ const uniWidth = department && type ? 6 : 16 ;
25
27
return (
26
28
< >
27
29
{ label && (
@@ -31,36 +33,44 @@ export class Thesis extends Component {
31
33
</ >
32
34
) }
33
35
< Grid padded >
34
- < Grid . Column width = "6" >
35
- < Input
36
- fieldPath = { `${ fieldPath } .university` }
37
- label = { university . label }
38
- placeholder = { university . placeholder }
39
- />
40
- { university . description && (
41
- < label className = "helptext mb-0" > { university . description } </ label >
42
- ) }
43
- </ Grid . Column >
44
- < Grid . Column width = "6" >
45
- < Input
46
- fieldPath = { `${ fieldPath } .department` }
47
- label = { department . label }
48
- placeholder = { department . placeholder }
49
- />
50
- { department . description && (
51
- < label className = "helptext mb-0" > { department . description } </ label >
52
- ) }
53
- </ Grid . Column >
54
- < Grid . Column width = "4" >
55
- < Input
56
- fieldPath = { `${ fieldPath } .type` }
57
- label = { type . label }
58
- placeholder = { type . placeholder }
59
- />
60
- { type . description && (
61
- < label className = "helptext mb-0" > { type . description } </ label >
62
- ) }
63
- </ Grid . Column >
36
+ { university && (
37
+ < Grid . Column width = { uniWidth } >
38
+ < Input
39
+ fieldPath = { `${ fieldPath } .university` }
40
+ label = { university . label }
41
+ placeholder = { university . placeholder }
42
+ />
43
+ { university . description && (
44
+ < label className = "helptext mb-0" > { university . description } </ label >
45
+ ) }
46
+ </ Grid . Column >
47
+ ) }
48
+
49
+ { department && (
50
+ < Grid . Column width = { 6 } >
51
+ < Input
52
+ fieldPath = { `${ fieldPath } .department` }
53
+ label = { department . label }
54
+ placeholder = { department . placeholder }
55
+ />
56
+ { department . description && (
57
+ < label className = "helptext mb-0" > { department . description } </ label >
58
+ ) }
59
+ </ Grid . Column >
60
+ ) }
61
+
62
+ { type && (
63
+ < Grid . Column width = { 4 } >
64
+ < Input
65
+ fieldPath = { `${ fieldPath } .type` }
66
+ label = { type . label }
67
+ placeholder = { type . placeholder }
68
+ />
69
+ { type . description && (
70
+ < label className = "helptext mb-0" > { type . description } </ label >
71
+ ) }
72
+ </ Grid . Column >
73
+ ) }
64
74
</ Grid >
65
75
</ >
66
76
) ;
0 commit comments