Skip to content
Snippets Groups Projects
Commit 9bfe1b83 authored by S.Listl's avatar S.Listl
Browse files

Employee fix

parent 20106971
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,6 @@
<name>PASSWORD</name>
<title>Password</title>
<contentType>PASSWORD</contentType>
<onValidation>%aditoprj%/entity/Employee_entity/entityfields/password/onValidation.js</onValidation>
</entityField>
<entityField>
<name>CONFIRM_PASSWORD</name>
......@@ -58,6 +57,11 @@
<title>Set Password</title>
<onActionProcess>%aditoprj%/entity/Employee_entity/entityfields/setpassword/onActionProcess.js</onActionProcess>
</entityActionField>
<entityParameter>
<name>passwordChange_param</name>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
import("system.translate");
import("system.result");
import("system.vars");
import("Entity_lib");
if (vars.get("$field.PASSWORD") != vars.get("$field.CONFIRM_PASSWORD"))
if (vars.get("$field.PASSWORD") != ProcessHandlingUtils.getOnValidationValue(vars.get("$field.CONFIRM_PASSWORD")))
result.string(translate.text("Password and confirmation must be the same!"));
\ No newline at end of file
import("system.translate");
import("system.result");
import("system.vars");
if (vars.get("$field.PASSWORD") != vars.get("$field.CONFIRM_PASSWORD"))
result.string(translate.text("Password and confirmation must be the same!"));
\ No newline at end of file
import("system.vars");
import("system.neon");
neon.openContext("Employee", "EmployeePassword_view", [vars.get("$field.TITLE")], neon.OPERATINGSTATE_EDIT, null);
\ No newline at end of file
var params = {
"passwordChange_param" : true
};
neon.openContext("Employee", "EmployeePassword_view", [vars.get("$field.TITLE")], neon.OPERATINGSTATE_EDIT, params);
\ No newline at end of file
......@@ -7,9 +7,10 @@ user.params[tools.FIRSTNAME] = vars.get("$field.FIRSTNAME");
user.params[tools.LASTNAME] = vars.get("$field.LASTNAME");
user.params[tools.EMAIL] = vars.get("$field.EMAIL_ADDRESS");
if (vars.get("$field.PASSWORD") && vars.get("$field.PASSWORD") == vars.get("$field.CONFIRM_PASSWORD"))
if (vars.exists("$param.passwordChange_param") && vars.get("$param.passwordChange_param")
&& vars.get("$field.PASSWORD") == vars.get("$field.CONFIRM_PASSWORD"))
{
user[tools.PASSWORD] = vars.get("$field.PASSWORD");
user[tools.PASSWORD] = vars.getString("$field.PASSWORD");
}
tools.updateUser(user);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment