Web: Client: added translations, fixed changePassword api
This commit is contained in:
parent
adc6dc801e
commit
e7391d01d1
@ -16,6 +16,7 @@
|
|||||||
"PassworResetTitle": "Now you can create a new password.", "_comment":"SYNTAX ERROR 'Passwor' Reset Title",
|
"PassworResetTitle": "Now you can create a new password.", "_comment":"SYNTAX ERROR 'Passwor' Reset Title",
|
||||||
"PasswordCustomMode": "Password",
|
"PasswordCustomMode": "Password",
|
||||||
"ImportContactsOkButton": "OK",
|
"ImportContactsOkButton": "OK",
|
||||||
|
"LoadingProcessing": "Loading...",
|
||||||
|
|
||||||
|
|
||||||
"CustomWelcomePageTitle": "{{welcomePageTitle}}"
|
"CustomWelcomePageTitle": "{{welcomePageTitle}}"
|
||||||
|
@ -63,9 +63,10 @@ const Form = props => {
|
|||||||
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
console.log("changePassword onSubmit", match, location, history);
|
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 key = `type=PasswordChange&${location.search.slice(1)}`;
|
||||||
const userId = "f305ea37-da05-11e9-89de-e0cb4e43b8c0"; //TODO: Find real userId by key
|
|
||||||
|
|
||||||
changePassword(userId, password, key)
|
changePassword(userId, password, key)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -149,6 +150,7 @@ const Form = props => {
|
|||||||
tooltipPasswordTitle="Password must contain:"
|
tooltipPasswordTitle="Password must contain:"
|
||||||
tooltipPasswordLength={tooltipPasswordLength}
|
tooltipPasswordLength={tooltipPasswordLength}
|
||||||
placeholder={t("PasswordCustomMode")}
|
placeholder={t("PasswordCustomMode")}
|
||||||
|
maxLength={30}
|
||||||
|
|
||||||
//isAutoFocussed={true}
|
//isAutoFocussed={true}
|
||||||
//autocomple="current-password"
|
//autocomple="current-password"
|
||||||
|
@ -66,7 +66,7 @@ export function changePassword(userId, password, key) {
|
|||||||
const IS_FAKE = true;
|
const IS_FAKE = true;
|
||||||
return IS_FAKE
|
return IS_FAKE
|
||||||
? fakeApi.changePassword()
|
? fakeApi.changePassword()
|
||||||
: axios.put(`${API_URL}/${userId}/password`, {password}, {
|
: axios.put(`${API_URL}/people/${userId}/password`, {password}, {
|
||||||
headers: { confirm: key }
|
headers: { confirm: key }
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -150,12 +150,7 @@ export function validateConfirmLink(link) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function changePassword() {
|
export function changePassword() {
|
||||||
const data = {
|
const data = { password: "password" };
|
||||||
//minLength: 12,
|
|
||||||
//upperCase: true,
|
|
||||||
//digits: true,
|
|
||||||
//specSymbols: true
|
|
||||||
};
|
|
||||||
|
|
||||||
return fakeResponse(data);
|
return fakeResponse(data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user