refactor: wrap student registration form in v-container and v-card to match style

This commit is contained in:
2025-10-20 18:30:59 +02:00
parent 06084fb2d3
commit 9fab8b9772

View File

@@ -1,37 +1,39 @@
<template>
<div class="page-container form-wrap">
<h4 class="page-title">Registrácia študenta</h4>
<v-form v-model="isValid" @submit.prevent="onSubmit">
<v-text-field v-model="form.title" label="Tituly pred:" variant="outlined" density="comfortable" />
<v-container fluid class="page-container form-wrap">
<v-card id="page-container-card">
<h4 class="page-title">Registrácia študenta</h4>
<v-form v-model="isValid" @submit.prevent="onSubmit">
<v-text-field v-model="form.title" label="Tituly pred:" variant="outlined" density="comfortable" />
<v-text-field v-model="form.firstName" :rules="[rules.required]" label="Meno:" variant="outlined"
density="comfortable" />
<v-text-field v-model="form.firstName" :rules="[rules.required]" label="Meno:" variant="outlined"
density="comfortable" />
<v-text-field v-model="form.lastName" :rules="[rules.required]" label="Priezvisko:" variant="outlined"
density="comfortable" />
<v-text-field v-model="form.lastName" :rules="[rules.required]" label="Priezvisko:" variant="outlined"
density="comfortable" />
<v-text-field v-model="form.address" label="Adresa:" variant="outlined" density="comfortable" />
<v-text-field v-model="form.address" label="Adresa:" variant="outlined" density="comfortable" />
<v-text-field v-model="form.studentEmail" :rules="[rules.required, rules.email]" label="Študentský email:"
variant="outlined" density="comfortable" />
<v-text-field v-model="form.studentEmail" :rules="[rules.required, rules.email]"
label="Študentský email:" variant="outlined" density="comfortable" />
<v-text-field v-model="form.altEmail" :rules="[rules.optionalEmail]" label="Alternatívny email:"
variant="outlined" density="comfortable" />
<v-text-field v-model="form.altEmail" :rules="[rules.optionalEmail]" label="Alternatívny email:"
variant="outlined" density="comfortable" />
<v-text-field v-model="form.phone" :rules="[rules.phone]" label="Telefón:" variant="outlined"
density="comfortable" />
<v-text-field v-model="form.phone" :rules="[rules.phone]" label="Telefón:" variant="outlined"
density="comfortable" />
<v-select v-model="form.studyProgram" :items="programs" :rules="[rules.required]" label="Študijný odbor:"
variant="outlined" density="comfortable" />
<v-select v-model="form.studyProgram" :items="programs" :rules="[rules.required]"
label="Študijný odbor:" variant="outlined" density="comfortable" />
<v-checkbox v-model="form.consent" :rules="[rules.mustAgree]"
label="Súhlasím s podmienkami spracúvania osobných údajov" density="comfortable" />
<v-checkbox v-model="form.consent" :rules="[rules.mustAgree]"
label="Súhlasím s podmienkami spracúvania osobných údajov" density="comfortable" />
<v-btn type="submit" color="success" size="large" block :disabled="!isValid || !form.consent">
Registrovať
</v-btn>
</v-form>
</div>
<v-btn type="submit" color="success" size="large" block :disabled="!isValid || !form.consent">
Registrovať
</v-btn>
</v-form>
</v-card>
</v-container>
</template>
<script setup>
@@ -79,6 +81,10 @@ function onSubmit() {
padding-right: 24px;
}
#page-container-card {
padding: 10px;
}
.page-title {
font-size: 24px;
line-height: 1.2;