File tree 4 files changed +23
-10
lines changed
4 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 116
116
"select_category" : " Select a flow" ,
117
117
"logout_failed" : " Something went wrong during logout" ,
118
118
"duplicate_labels_not_allowed" : " Duplicate labels are not allowed" ,
119
- "duplicate_block_error" : " Something went wrong while duplicating block"
119
+ "duplicate_block_error" : " Something went wrong while duplicating block" ,
120
+ "missing_fields_error" : " Please make sure that all required fields are filled"
120
121
},
121
122
"menu" : {
122
123
"terms" : " Terms of Use" ,
Original file line number Diff line number Diff line change 116
116
"select_category" : " Sélectionner une catégorie" ,
117
117
"logout_failed" : " Une erreur s'est produite lors de la déconnexion" ,
118
118
"duplicate_labels_not_allowed" : " Les étiquettes en double ne sont pas autorisées" ,
119
- "duplicate_block_error" : " Une erreur est survenue lors de la duplication du bloc"
119
+ "duplicate_block_error" : " Une erreur est survenue lors de la duplication du bloc" ,
120
+ "missing_fields_error" : " Veuillez vous assurer que tous les champs sont remplis correctement"
120
121
},
121
122
"menu" : {
122
123
"terms" : " Conditions d'utilisation" ,
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright © 2024 Hexastack. All rights reserved.
2
+ * Copyright © 2025 Hexastack. All rights reserved.
3
3
*
4
4
* Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms:
5
5
* 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission.
@@ -24,16 +24,21 @@ export function TabPanel(props: TabPanelProps & GridProps) {
24
24
item
25
25
xs
26
26
role = "tabpanel"
27
- hidden = { value !== index }
28
27
id = { `vertical-tabpanel-${ index } ` }
29
28
aria-labelledby = { `vertical-tab-${ index } ` }
29
+ sx = { {
30
+ display : "block" ,
31
+ visibility : value === index ? "visible" : "hidden" ,
32
+ height : value === index ? "auto" : 0 ,
33
+ overflow : "hidden" ,
34
+ position : value === index ? "relative" : "absolute" ,
35
+ ...sx ,
36
+ } }
30
37
{ ...other }
31
38
>
32
- { value === index ? (
33
- < Grid container sx = { { flexDirection : "column" , ...sx } } >
34
- { children }
35
- </ Grid >
36
- ) : null }
39
+ < Grid container sx = { { flexDirection : "column" } } >
40
+ { children }
41
+ </ Grid >
37
42
</ Grid >
38
43
) ;
39
44
}
Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ export const BlockEditForm: FC<ComponentFormProps<IBlock>> = ({
100
100
updateBlock ( { id : block . id , params } ) ;
101
101
}
102
102
} ;
103
+ const onSubmitError = ( ) => {
104
+ toast . error ( t ( "message.missing_fields_error" ) ) ;
105
+ } ;
103
106
104
107
useEffect ( ( ) => {
105
108
if ( block ) {
@@ -110,7 +113,10 @@ export const BlockEditForm: FC<ComponentFormProps<IBlock>> = ({
110
113
} , [ block , reset ] ) ;
111
114
112
115
return (
113
- < Wrapper onSubmit = { handleSubmit ( onSubmitForm ) } { ...WrapperProps } >
116
+ < Wrapper
117
+ onSubmit = { handleSubmit ( onSubmitForm , onSubmitError ) }
118
+ { ...WrapperProps }
119
+ >
114
120
< BlockFormProvider methods = { methods } block = { block || undefined } >
115
121
< ContentContainer >
116
122
< ContentItem display = "flex" gap = { 5 } >
You can’t perform that action at this time.
0 commit comments