@@ -156,94 +156,92 @@ export const OrganizationForm = ({
156156 const isDisplayingEmailNameError = emailErrorMessage && organizationForm . touched . email
157157
158158 return (
159- < LoadingAndErrorComponent
160- isLoading = { ! organizationForm }
161- loadingProps = { { classname : 'border-2 rounded-xl min-h-73' } }
162- minimumLoadingDuration = { 200 } // prevents errors flickering
163- >
164- < div className = { clsx ( 'col gap-y-0' , className ) } >
165- < ColumnTitle title = { translation ( 'general' ) } type = "subtitle" />
166- < div className = "col gap-y-2" >
167- < div className = "col gap-y-1" >
168- < Input
169- id = "shortName"
170- value = { organizationForm . organization . shortName }
171- label = { { name : translation ( 'shortName' ) } }
172- onBlur = { ( ) => triggerOnChange ( { ...organizationForm . organization } , false , {
173- ...organizationForm . touched ,
174- shortName : true
175- } ) }
176- onChangeText = { text => triggerOnChange ( {
177- ...organizationForm . organization ,
178- shortName : text
179- } , false , { ...organizationForm . touched } ) }
180- onEditCompleted = { text => triggerOnChange ( {
181- ...organizationForm . organization ,
182- shortName : text
183- } , true , { ...organizationForm . touched , shortName : true } ) }
184- maxLength = { maxShortNameLength }
185- className = { clsx ( inputClasses , { [ inputErrorClasses ] : isDisplayingShortNameError } ) }
186- />
187- { isDisplayingShortNameError && < span className = "textstyle-form-error" > { shortNameErrorMessage } </ span > }
188- < span className = "textstyle-form-description" > { translation ( 'shortNameDescription' ) } </ span >
189- </ div >
190- < div className = "col gap-y-1" >
191- < Input
192- id = "longName"
193- value = { organizationForm . organization . longName }
194- label = { { name : translation ( 'longName' ) } }
195- onBlur = { ( ) => triggerOnChange ( { ...organizationForm . organization } , false , {
196- ...organizationForm . touched ,
197- longName : true
198- } ) }
199- onChangeText = { text => triggerOnChange ( {
200- ...organizationForm . organization ,
201- longName : text
202- } , false , { ...organizationForm . touched } ) }
203- onEditCompleted = { text => triggerOnChange ( {
204- ...organizationForm . organization ,
205- longName : text
206- } , true , { ...organizationForm . touched , longName : true } ) }
207- maxLength = { maxLongNameLength }
208- className = { clsx ( inputClasses , { [ inputErrorClasses ] : isDisplayingLongNameError } ) }
209- />
210- { isDisplayingLongNameError && < span className = "textstyle-form-error" > { longNameErrorMessage } </ span > }
211- < span className = "textstyle-form-description" > { translation ( 'longNameDescription' ) } </ span >
212- </ div >
213- < div className = "col gap-y-1" >
214- < div className = "row items-end" >
215- < div className = "flex-1 mr-2" >
216- < Input
217- id = "email"
218- value = { organizationForm . organization . email }
219- label = { { name : translation ( 'contactEmail' ) } }
220- type = "email"
221- onBlur = { ( ) => triggerOnChange ( { ...organizationForm . organization } , false , {
222- ...organizationForm . touched ,
223- email : true
224- } ) }
225- onChangeText = { text => triggerOnChange ( {
226- ...organizationForm . organization ,
227- email : text
228- } , false , { ...organizationForm . touched } ) }
229- onEditCompleted = { text => triggerOnChange ( {
230- ...organizationForm . organization ,
231- email : text
232- } , true , { ...organizationForm . touched , email : true } ) }
233- maxLength = { maxMailLength }
234- className = { clsx ( inputClasses , { [ inputErrorClasses ] : isDisplayingEmailNameError } ) }
235- />
236- </ div >
237- {
238- ! organizationForm . organization . isVerified &&
239- < span className = "text-negative mb-3" > { translation ( 'notVerified' ) } </ span >
240- }
159+ < div className = { clsx ( 'col gap-y-0' , className ) } >
160+ < ColumnTitle title = { translation ( 'general' ) } type = "subtitle" />
161+ < LoadingAndErrorComponent
162+ isLoading = { ! organizationForm }
163+ className = "min-h-69"
164+ minimumLoadingDuration = { 200 } // prevents errors flickering
165+ >
166+ < div className = "col gap-y-1" >
167+ < Input
168+ id = "shortName"
169+ value = { organizationForm . organization . shortName }
170+ label = { { name : translation ( 'shortName' ) } }
171+ onBlur = { ( ) => triggerOnChange ( { ...organizationForm . organization } , false , {
172+ ...organizationForm . touched ,
173+ shortName : true
174+ } ) }
175+ onChangeText = { text => triggerOnChange ( {
176+ ...organizationForm . organization ,
177+ shortName : text
178+ } , false , { ...organizationForm . touched } ) }
179+ onEditCompleted = { text => triggerOnChange ( {
180+ ...organizationForm . organization ,
181+ shortName : text
182+ } , true , { ...organizationForm . touched , shortName : true } ) }
183+ maxLength = { maxShortNameLength }
184+ className = { clsx ( inputClasses , { [ inputErrorClasses ] : isDisplayingShortNameError } ) }
185+ />
186+ { isDisplayingShortNameError && < span className = "textstyle-form-error" > { shortNameErrorMessage } </ span > }
187+ < span className = "textstyle-form-description" > { translation ( 'shortNameDescription' ) } </ span >
188+ </ div >
189+ < div className = "col gap-y-1" >
190+ < Input
191+ id = "longName"
192+ value = { organizationForm . organization . longName }
193+ label = { { name : translation ( 'longName' ) } }
194+ onBlur = { ( ) => triggerOnChange ( { ...organizationForm . organization } , false , {
195+ ...organizationForm . touched ,
196+ longName : true
197+ } ) }
198+ onChangeText = { text => triggerOnChange ( {
199+ ...organizationForm . organization ,
200+ longName : text
201+ } , false , { ...organizationForm . touched } ) }
202+ onEditCompleted = { text => triggerOnChange ( {
203+ ...organizationForm . organization ,
204+ longName : text
205+ } , true , { ...organizationForm . touched , longName : true } ) }
206+ maxLength = { maxLongNameLength }
207+ className = { clsx ( inputClasses , { [ inputErrorClasses ] : isDisplayingLongNameError } ) }
208+ />
209+ { isDisplayingLongNameError && < span className = "textstyle-form-error" > { longNameErrorMessage } </ span > }
210+ < span className = "textstyle-form-description" > { translation ( 'longNameDescription' ) } </ span >
211+ </ div >
212+ < div className = "col gap-y-1" >
213+ < div className = "row items-end" >
214+ < div className = "flex-1 mr-2" >
215+ < Input
216+ id = "email"
217+ value = { organizationForm . organization . email }
218+ label = { { name : translation ( 'contactEmail' ) } }
219+ type = "email"
220+ onBlur = { ( ) => triggerOnChange ( { ...organizationForm . organization } , false , {
221+ ...organizationForm . touched ,
222+ email : true
223+ } ) }
224+ onChangeText = { text => triggerOnChange ( {
225+ ...organizationForm . organization ,
226+ email : text
227+ } , false , { ...organizationForm . touched } ) }
228+ onEditCompleted = { text => triggerOnChange ( {
229+ ...organizationForm . organization ,
230+ email : text
231+ } , true , { ...organizationForm . touched , email : true } ) }
232+ maxLength = { maxMailLength }
233+ className = { clsx ( inputClasses , { [ inputErrorClasses ] : isDisplayingEmailNameError } ) }
234+ />
241235 </ div >
242- { isDisplayingEmailNameError && < span className = "textstyle-form-error" > { emailErrorMessage } </ span > }
243- < span className = "textstyle-form-description" > { translation ( 'contactEmailDescription' ) } </ span >
236+ {
237+ ! organizationForm . organization . isVerified &&
238+ < span className = "text-negative mb-3" > { translation ( 'notVerified' ) } </ span >
239+ }
244240 </ div >
241+ { isDisplayingEmailNameError && < span className = "textstyle-form-error" > { emailErrorMessage } </ span > }
242+ < span className = "textstyle-form-description" > { translation ( 'contactEmailDescription' ) } </ span >
245243 </ div >
246- </ div >
247- </ LoadingAndErrorComponent >
244+ </ LoadingAndErrorComponent >
245+ </ div >
248246 )
249247}
0 commit comments