mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
anrechnungen reload page on languageChange in php template site with cis4Reload attribute set;
This commit is contained in:
@@ -9,11 +9,13 @@ export default {
|
||||
changeLanguage: function(lang){
|
||||
if(this.allActiveLanguages.some(l => l.sprache === lang))
|
||||
{
|
||||
const isReload = document.querySelector('[cis4Reload]')
|
||||
this.$p.setLanguage(lang, this.$fhcApi)
|
||||
.then(res => res.data)
|
||||
.then(data =>
|
||||
{
|
||||
this.$emit('languageChanged', lang);
|
||||
if(isReload) window.location.reload()
|
||||
else this.$emit('languageChanged', lang);
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user