mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'feature-62462/FHC4_Studierendenverwaltung_Delete_Photo'
This commit is contained in:
@@ -276,7 +276,17 @@ class Student extends FHCAPI_Controller
|
||||
$update_person = array();
|
||||
foreach ($array_allowed_props_person as $prop) {
|
||||
$val = $this->input->post($prop);
|
||||
if ($val !== null) {
|
||||
if ($val === null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if($prop == 'foto')
|
||||
{
|
||||
$fotoval = ($val == '') ? null : str_replace('data:image/jpeg;base64,', '', $val);
|
||||
$update_person[$prop] = $fotoval;
|
||||
}
|
||||
else
|
||||
{
|
||||
$update_person[$prop] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,13 @@ export default {
|
||||
redirectToLeitung(){
|
||||
this.$emit('redirectToLeitung', {
|
||||
person_id: this.leitungData.person_id});
|
||||
},
|
||||
getFotoSrc(foto) {
|
||||
if(foto === null) {
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + 'skin/images/profilbild_dummy.jpg';
|
||||
} else {
|
||||
return 'data:image/jpeg;base64,' + foto;
|
||||
}
|
||||
}
|
||||
},
|
||||
template: `
|
||||
@@ -116,7 +123,7 @@ export default {
|
||||
<img
|
||||
class="d-block h-100 rounded"
|
||||
alt="Profilbild"
|
||||
:src="'data:image/jpeg;base64,' + person.foto"
|
||||
:src="getFotoSrc(person.foto)"
|
||||
/>
|
||||
|
||||
<template v-if="person.foto_sperre">
|
||||
|
||||
Reference in New Issue
Block a user