From f576188c2ccd2e06d165097e9f1a9d0e2e4f0e5c Mon Sep 17 00:00:00 2001 From: Gleb Gorelov Date: Thu, 8 Oct 2015 08:39:24 +0000 Subject: [PATCH] Show confirmation dialog on exit from UserEditor if we changed password or password confirmation fields #PL-6089 --- .../haulmont/cuba/gui/app/security/user/edit/UserEditor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gui/src/com/haulmont/cuba/gui/app/security/user/edit/UserEditor.java b/modules/gui/src/com/haulmont/cuba/gui/app/security/user/edit/UserEditor.java index 95cc86ab97..9d88037b65 100644 --- a/modules/gui/src/com/haulmont/cuba/gui/app/security/user/edit/UserEditor.java +++ b/modules/gui/src/com/haulmont/cuba/gui/app/security/user/edit/UserEditor.java @@ -213,6 +213,7 @@ public class UserEditor extends AbstractEditor { } else { passwField.setRequired(true); } + passwField.addValueChangeListener(e -> ((DatasourceImplementation) userDs).setModified(true)); } else { passwField.setVisible(false); } @@ -233,6 +234,7 @@ public class UserEditor extends AbstractEditor { } else { confirmPasswField.setRequired(true); } + confirmPasswField.addValueChangeListener(e -> ((DatasourceImplementation) userDs).setModified(true)); } else { confirmPasswField.setVisible(false); }