Skip to content
Snippets Groups Projects
Commit 5d1f8352 authored by Adel LAKHDAR's avatar Adel LAKHDAR
Browse files

Merge branch 'refactor/elecform' into 'dev'

chore(UI): add required prop to electricity login forms

See merge request !1150
parents f9d847e0 b04faf1e
No related branches found
No related tags found
2 merge requests!11623.0 Release,!1150chore(UI): add required prop to electricity login forms
......@@ -24,6 +24,7 @@ const StepAddress = ({ sgeState, onChange }: StepAddressProps) => {
name="address"
value={sgeState.address}
onChange={e => onChange('address', e.target.value)}
required
/>
<TextField
label={t('auth.enedissgegrandlyon.zipCode')}
......@@ -33,6 +34,7 @@ const StepAddress = ({ sgeState, onChange }: StepAddressProps) => {
name="zipCode"
value={sgeState.zipCode ?? undefined}
onChange={e => onChange('zipCode', e.target.value, 5)}
required
/>
<TextField
label={t('auth.enedissgegrandlyon.city')}
......@@ -42,6 +44,7 @@ const StepAddress = ({ sgeState, onChange }: StepAddressProps) => {
name="city"
value={sgeState.city}
onChange={e => onChange('city', e.target.value)}
required
/>
</div>
)
......
......@@ -14,12 +14,19 @@ exports[`StepAddress component should be rendered correctly 1`] = `
class="MuiFormControl-root MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined"
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined Mui-required Mui-required"
data-shrink="false"
for="address"
id="address-label"
>
auth.enedissgegrandlyon.address
<span
aria-hidden="true"
class="MuiFormLabel-asterisk MuiInputLabel-asterisk"
>
*
</span>
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-formControl"
......@@ -29,6 +36,7 @@ exports[`StepAddress component should be rendered correctly 1`] = `
class="MuiInputBase-input MuiOutlinedInput-input"
id="address"
name="address"
required=""
type="text"
value=""
/>
......@@ -41,6 +49,7 @@ exports[`StepAddress component should be rendered correctly 1`] = `
>
<span>
auth.enedissgegrandlyon.address
*
</span>
</legend>
</fieldset>
......@@ -50,12 +59,19 @@ exports[`StepAddress component should be rendered correctly 1`] = `
class="MuiFormControl-root MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined"
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined Mui-required Mui-required"
data-shrink="false"
for="zipCode"
id="zipCode-label"
>
auth.enedissgegrandlyon.zipCode
<span
aria-hidden="true"
class="MuiFormLabel-asterisk MuiInputLabel-asterisk"
>
*
</span>
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-formControl"
......@@ -65,6 +81,7 @@ exports[`StepAddress component should be rendered correctly 1`] = `
class="MuiInputBase-input MuiOutlinedInput-input"
id="zipCode"
name="zipCode"
required=""
type="number"
value=""
/>
......@@ -77,6 +94,7 @@ exports[`StepAddress component should be rendered correctly 1`] = `
>
<span>
auth.enedissgegrandlyon.zipCode
*
</span>
</legend>
</fieldset>
......@@ -86,12 +104,19 @@ exports[`StepAddress component should be rendered correctly 1`] = `
class="MuiFormControl-root MuiTextField-root"
>
<label
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined"
class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-outlined Mui-required Mui-required"
data-shrink="false"
for="city"
id="city-label"
>
auth.enedissgegrandlyon.city
<span
aria-hidden="true"
class="MuiFormLabel-asterisk MuiInputLabel-asterisk"
>
*
</span>
</label>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-formControl"
......@@ -101,6 +126,7 @@ exports[`StepAddress component should be rendered correctly 1`] = `
class="MuiInputBase-input MuiOutlinedInput-input"
id="city"
name="city"
required=""
type="text"
value=""
/>
......@@ -113,6 +139,7 @@ exports[`StepAddress component should be rendered correctly 1`] = `
>
<span>
auth.enedissgegrandlyon.city
*
</span>
</legend>
</fieldset>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment