1
0
forked from PGL/Clyde

modifying the frontend to send the image and getting the data

This commit is contained in:
2024-03-13 22:30:42 +01:00
parent a0285e700d
commit 64e7f8dc6b
6 changed files with 15 additions and 2 deletions

View File

@ -1,7 +1,9 @@
<script setup>
import { login , register} from '@/rest/Users.js'
import { ref } from 'vue'
import i18n from '@/i18n.js'
import { login , register } from '@/rest/Users.js'
import { uploadProfilePicture } from '@/rest/uploads.js'
const loginPage= ref(true)
const page = ref(0)
@ -23,6 +25,8 @@
const registerInfos= [{_surname:surname},{_firstname:firstname},{_birthday:birthday},{_passwordOUT:passwordOUT},
{_passwordConfirm:passwordConfirm},{_emailOUT:emailOUT},{_address:address},{_country:country},{_cursus:cursus}]
const imageSaved = ref(false)
const ppData = ref(false)
</script>
@ -99,6 +103,10 @@
<p>{{i18n("login.guest.country")}}</p>
<input type="text" v-model="country">
</div>
<form novalidate enctype="multipart/form-data" class="inputBox">
<p>ProfilePicture</p>
<input type="file" :disabled="imageSaved" @change="ppData = uploadProfilePicture($event.target.files); imageSaved = true;" accept="image/*">
</form>
<div class="inputBox">
<p>CURSUS</p>
<select v-model="cursus">