]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - components/PasswordCredentialImpl.js
1 qx
.Class
.define("org.argeo.security.ria.components.PasswordCredentialImpl", {
2 extend
: qx
.ui
.container
.Composite
,
3 implement
: [org
.argeo
.security
.ria
.components
.ICredentialPane
],
5 "modified" : "qx.event.type.Event"
13 construct : function(){
15 this.setLayout(new qx
.ui
.layout
.HBox(5, "center"));
16 this.add(new qx
.ui
.basic
.Label("Password"), {flex
:1});
17 this.pass1
= new qx
.ui
.form
.PasswordField();
18 this.add(this.pass1
, {flex
:2});
19 this.add(new qx
.ui
.basic
.Label("Confirm Password"), {flex
:1});
20 this.pass2
= new qx
.ui
.form
.PasswordField();
21 this.add(this.pass2
, {flex
:2});
22 this.pass1
.addListener("changeValue", function(){this.fireEvent("modified");}, this);
23 this.pass2
.addListener("changeValue", function(){this.fireEvent("modified");}, this);
24 this.pass2
.addListener("changeValue", this.validate
, this);
28 getContainer : function(){
31 getData : function(format
){return true;},
32 validate : function(){
33 if(this.pass1
.getValue() == this.pass2
.getValue()){
36 // TODO WHEN TESTING 0.8.3
37 //this.pass1.setValid(false);
38 //this.pass2.setValid(false);
41 return this.getValid();
43 setEditMode : function(editMode
){return true;}