Web: Client: added translations, fixed changePassword api

This commit is contained in:
Nikita Gopienko 2019-09-26 12:22:56 +03:00
parent adc6dc801e
commit e7391d01d1
4 changed files with 8 additions and 10 deletions

View File

@ -16,6 +16,7 @@
"PassworResetTitle": "Now you can create a new password.", "_comment":"SYNTAX ERROR 'Passwor' Reset Title",
"PasswordCustomMode": "Password",
"ImportContactsOkButton": "OK",
"LoadingProcessing": "Loading...",
"CustomWelcomePageTitle": "{{welcomePageTitle}}"

View File

@ -63,9 +63,10 @@ const Form = props => {
setIsLoading(true);
console.log("changePassword onSubmit", match, location, history);
const str = location.search.split("&");
const userId = str[1].slice(4);
const key = `type=PasswordChange&${location.search.slice(1)}`;
const userId = "f305ea37-da05-11e9-89de-e0cb4e43b8c0"; //TODO: Find real userId by key
changePassword(userId, password, key)
.then(() => {
@ -149,6 +150,7 @@ const Form = props => {
tooltipPasswordTitle="Password must contain:"
tooltipPasswordLength={tooltipPasswordLength}
placeholder={t("PasswordCustomMode")}
maxLength={30}
//isAutoFocussed={true}
//autocomple="current-password"

View File

@ -66,7 +66,7 @@ export function changePassword(userId, password, key) {
const IS_FAKE = true;
return IS_FAKE
? fakeApi.changePassword()
: axios.put(`${API_URL}/${userId}/password`, {password}, {
: axios.put(`${API_URL}/people/${userId}/password`, {password}, {
headers: { confirm: key }
});
}
}

View File

@ -150,12 +150,7 @@ export function validateConfirmLink(link) {
}
export function changePassword() {
const data = {
//minLength: 12,
//upperCase: true,
//digits: true,
//specSymbols: true
};
const data = { password: "password" };
return fakeResponse(data);
}