This commit is contained in:
2020-11-19 20:44:36 +00:00
parent 0dbae7d8e4
commit 62cb30853a
3 changed files with 53 additions and 5 deletions

View File

@@ -1,5 +1,7 @@
<template>
<v-form ref="form">
{{ obj }}
<v-row>
<v-col cols="12">
<v-text-field
@@ -47,14 +49,25 @@
<script>
/* Xeslint-disable */
export default {
async created() {},
async created() {
debugger;
let searchParams = new URLSearchParams(window.location.search);
//home-reset?rc={ResetCode}&tr={EffectiveTranslationId}&lg={loginName}
this.obj.passwordResetCode = searchParams.get("rc");
this.obj.loginName = searchParams.get("lg");
this.obj.translationId = parseInt(searchParams.get("tr"));
await initForm(this);
},
data() {
return {
obj: {
newPassword: null,
confirmPassword: null,
passwordResetCode: null
passwordResetCode: null,
loginName: null,
translationId: 0 //1 //safety valve default to english
},
reveal: true,
formState: {
ready: true,
@@ -110,4 +123,29 @@ export default {
}
}
};
/////////////////////////////////
//
//
async function initForm(vm) {
await fetchTranslatedText(vm);
}
//////////////////////////////////////////////////////////
//
// Ensures UI translated text is available
//
async function fetchTranslatedText(vm) {
debugger;
await window.$gz.translation.cacheTranslations(
[
"NewPassword",
"ConfirmPassword",
"UserLogin",
"ErrorRequiredFieldEmpty",
"ErrorNoMatch"
],
vm.translationId
);
}
</script>