mirror of
https://github.com/danbulant/Portfolio
synced 2026-07-05 02:50:47 +00:00
feat: replace countries with select, force personal id only on Czech Republic
This commit is contained in:
parent
2d93e3316e
commit
e05739ea71
1 changed files with 17 additions and 9 deletions
|
|
@ -403,12 +403,12 @@
|
||||||
</p>
|
</p>
|
||||||
<div class="flex w-full flex-row md:flex-col">
|
<div class="flex w-full flex-row md:flex-col">
|
||||||
<span class="mt-8 w-full">
|
<span class="mt-8 w-full">
|
||||||
<TextField
|
<SelectField
|
||||||
error={$typedErrors['candidate']['citizenship']}
|
error={$typedErrors['candidate']['citizenship']}
|
||||||
on:change={handleChange}
|
on:change={handleChange}
|
||||||
bind:value={$form.candidate.citizenship}
|
bind:value={$form.candidate.citizenship}
|
||||||
type="text"
|
|
||||||
placeholder="Občanství"
|
placeholder="Občanství"
|
||||||
|
options={['Česká republika', 'Slovenská republika', 'Ukrajina', 'Jiné']}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span class="mt-8 ml-2 w-full md:ml-0">
|
<span class="mt-8 ml-2 w-full md:ml-0">
|
||||||
|
|
@ -416,13 +416,21 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-8 flex w-full items-center justify-center">
|
<div class="mt-8 flex w-full items-center justify-center">
|
||||||
<IdField
|
{#if $form.candidate.citizenship === 'Česká republika' || !$form.candidate.citizenship}
|
||||||
error={$typedErrors['candidate']['personalIdNumber']}
|
<IdField
|
||||||
on:change={handleChange}
|
error={$typedErrors['candidate']['personalIdNumber']}
|
||||||
bind:value={$form.candidate.personalIdNumber}
|
on:change={handleChange}
|
||||||
placeholder="Rodné číslo"
|
bind:value={$form.candidate.personalIdNumber}
|
||||||
helperText="Rodné číslo musí být ve formátu 123456/7890"
|
placeholder="Rodné číslo"
|
||||||
/>
|
/>
|
||||||
|
{:else}
|
||||||
|
<TextField
|
||||||
|
error={$typedErrors['candidate']['personalIdNumber']}
|
||||||
|
on:change={handleChange}
|
||||||
|
bind:value={$form.candidate.personalIdNumber}
|
||||||
|
placeholder="Rodné číslo"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
<span class="ml-2">
|
<span class="ml-2">
|
||||||
<SelectField
|
<SelectField
|
||||||
error={$typedErrors['candidate']['study']}
|
error={$typedErrors['candidate']['study']}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue