mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
add Functionality sendInfomail
- expand InputComponent for dynamic adding of actionButton to Form Upload Image - add Phrases for Infomail
This commit is contained in:
@@ -28,7 +28,8 @@ export default {
|
|||||||
label: String,
|
label: String,
|
||||||
// NOTE(chris): remove these from $attrs array to prevent doubled event listeners
|
// NOTE(chris): remove these from $attrs array to prevent doubled event listeners
|
||||||
onInput: [Array, Function],
|
onInput: [Array, Function],
|
||||||
'onUpdate:modelValue': [Array, Function]
|
'onUpdate:modelValue': [Array, Function],
|
||||||
|
titleActionButton: String
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -314,6 +315,7 @@ export default {
|
|||||||
:id="idCmp"
|
:id="idCmp"
|
||||||
:name="name"
|
:name="name"
|
||||||
:class="validationClass"
|
:class="validationClass"
|
||||||
|
:titleActionButton="titleActionButton"
|
||||||
@update:model-value="clearValidationForThisName"
|
@update:model-value="clearValidationForThisName"
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
export default {
|
export default {
|
||||||
emits: [
|
emits: [
|
||||||
'update:modelValue'
|
'update:modelValue',
|
||||||
|
'actionbutton-clicked'
|
||||||
],
|
],
|
||||||
props: {
|
props: {
|
||||||
modelValue: String
|
modelValue: String,
|
||||||
|
titleActionButton: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
valueAsBase64DataString() {
|
valueAsBase64DataString() {
|
||||||
@@ -28,6 +33,9 @@ export default {
|
|||||||
},
|
},
|
||||||
deleteImage() {
|
deleteImage() {
|
||||||
this.$emit('update:modelValue', '');
|
this.$emit('update:modelValue', '');
|
||||||
|
},
|
||||||
|
emitAction(){
|
||||||
|
this.$emit('actionbutton-clicked', this.modelValue);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
template: `
|
template: `
|
||||||
@@ -42,6 +50,7 @@ export default {
|
|||||||
<button type="button" class="btn btn-outline-dark btn-sm" @click="openUploadDialog">
|
<button type="button" class="btn btn-outline-dark btn-sm" @click="openUploadDialog">
|
||||||
<i class="fa fa-pen"></i>
|
<i class="fa fa-pen"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<button v-if="titleActionButton" class="btn btn-outline-dark btn-sm" @click="emitAction">{{titleActionButton}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -158,6 +158,16 @@ export default {
|
|||||||
},
|
},
|
||||||
reload(){
|
reload(){
|
||||||
this.updateStudent(this.modelValue);
|
this.updateStudent(this.modelValue);
|
||||||
|
},
|
||||||
|
sendInfomail(){
|
||||||
|
const subject = this.$p.t('person', 'betreffProfilfoto');
|
||||||
|
const subjectEncoded = encodeURIComponent(subject);
|
||||||
|
|
||||||
|
const body = this.$p.t('person', 'mailText_profilfoto');
|
||||||
|
const bodyWithNewLines = body.replace(/\\n/g, '\n');
|
||||||
|
const bodyEncoded = encodeURIComponent(bodyWithNewLines);
|
||||||
|
|
||||||
|
window.location.href = "mailto:" + this.modelValue.mail_intern + "?subject=" + subjectEncoded + "&body=" + bodyEncoded;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -400,8 +410,10 @@ export default {
|
|||||||
container-class="col-4 stv-details-details-foto"
|
container-class="col-4 stv-details-details-foto"
|
||||||
:label="$p.t('person', 'foto')"
|
:label="$p.t('person', 'foto')"
|
||||||
type="UploadImage"
|
type="UploadImage"
|
||||||
|
titleActionButton="Infomail"
|
||||||
v-model="data.foto"
|
v-model="data.foto"
|
||||||
name="foto"
|
name="foto"
|
||||||
|
@actionbutton-clicked="sendInfomail"
|
||||||
>
|
>
|
||||||
<img alt="No Image" :src="noImageSrc" class="w-100">
|
<img alt="No Image" :src="noImageSrc" class="w-100">
|
||||||
</form-input>
|
</form-input>
|
||||||
|
|||||||
@@ -30281,8 +30281,6 @@ array(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
//ProfilUpdate Phrasen ende
|
//ProfilUpdate Phrasen ende
|
||||||
array(
|
array(
|
||||||
'app' => 'core',
|
'app' => 'core',
|
||||||
@@ -46677,6 +46675,46 @@ and represent the current state of research on the topic. The prescribed citatio
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'app' => 'core',
|
||||||
|
'category' => 'person',
|
||||||
|
'phrase' => 'mailText_profilfoto',
|
||||||
|
'insertvon' => 'system',
|
||||||
|
'phrases' => array(
|
||||||
|
array(
|
||||||
|
'sprache' => 'German',
|
||||||
|
'text' => "Hallo,\n\nIhr Profilbild wurde entfernt, da es nicht den aktuellen Bildrichtlinen entspricht. Bitte laden Sie unter CIS->Profil ein neues Profilbild hoch!\n\nDanke!",
|
||||||
|
'description' => '',
|
||||||
|
'insertvon' => 'system'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'sprache' => 'English',
|
||||||
|
'text' => "Hello,\n\nYour profile picture has been removed because it does not comply with the current image guidelines. Please upload a new profile picture under CIS->Profile!\n\nThank you!",
|
||||||
|
'description' => '',
|
||||||
|
'insertvon' => 'system'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'app' => 'core',
|
||||||
|
'category' => 'person',
|
||||||
|
'phrase' => 'betreffProfilfoto',
|
||||||
|
'insertvon' => 'system',
|
||||||
|
'phrases' => array(
|
||||||
|
array(
|
||||||
|
'sprache' => 'German',
|
||||||
|
'text' => 'Profilbild',
|
||||||
|
'description' => '',
|
||||||
|
'insertvon' => 'system'
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'sprache' => 'English',
|
||||||
|
'text' => 'Profile picture',
|
||||||
|
'description' => '',
|
||||||
|
'insertvon' => 'system'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
// FHC-4 Finetuning END
|
// FHC-4 Finetuning END
|
||||||
|
|
||||||
//**************************** CORE/search
|
//**************************** CORE/search
|
||||||
|
|||||||
Reference in New Issue
Block a user