aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/web/client/login/LoginDialog.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-11-08 23:38:34 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2012-11-08 23:38:34 +1300
commitefc59ab19fc92242d3532f990d129908f79be480 (patch)
tree260ba7069d834dd3e6d992e67398821c6d9013f8 /src/main/java/org/traccar/web/client/login/LoginDialog.java
parentfdcaf4c391020ea30881019938707b411dc9c426 (diff)
downloadetbsa-traccar-web-efc59ab19fc92242d3532f990d129908f79be480.tar.gz
etbsa-traccar-web-efc59ab19fc92242d3532f990d129908f79be480.tar.bz2
etbsa-traccar-web-efc59ab19fc92242d3532f990d129908f79be480.zip
Add login dialog
Diffstat (limited to 'src/main/java/org/traccar/web/client/login/LoginDialog.java')
-rw-r--r--src/main/java/org/traccar/web/client/login/LoginDialog.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/web/client/login/LoginDialog.java b/src/main/java/org/traccar/web/client/login/LoginDialog.java
new file mode 100644
index 0000000..3ac01cc
--- /dev/null
+++ b/src/main/java/org/traccar/web/client/login/LoginDialog.java
@@ -0,0 +1,50 @@
+package org.traccar.web.client.login;
+
+import com.smartgwt.client.widgets.Window;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.PasswordItem;
+import com.smartgwt.client.widgets.form.fields.TextItem;
+import com.smartgwt.client.widgets.form.fields.ButtonItem;
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.TitleOrientation;
+import com.smartgwt.client.widgets.layout.Layout;
+import com.smartgwt.client.widgets.form.fields.ToolbarItem;
+import com.smartgwt.client.widgets.IButton;
+import com.smartgwt.client.widgets.Button;
+
+public class LoginDialog extends Window {
+
+ private DynamicForm form;
+
+ public LoginDialog() {
+
+ // Window properties
+ setTitle("User Authentication");
+ setShowCloseButton(false);
+ setShowMinimizeButton(false);
+ setAutoSize(true);
+
+ // Login form
+ form = new DynamicForm();
+ form.setHeight100();
+ form.setWidth100();
+ TextItem loginEdit = new TextItem();
+ loginEdit.setTitle("Login");
+ PasswordItem passwordEdit = new PasswordItem();
+ passwordEdit.setTitle("Password");
+
+ ToolbarItem toolbarItem = new ToolbarItem();
+ toolbarItem.setButtons(new IButton("Login"), new IButton("Register"));
+
+ form.setFields(loginEdit, passwordEdit, toolbarItem);
+ form.setCellPadding(5);
+
+ Layout layout = new Layout();
+ layout.setPadding(10);
+
+ layout.addMember(form);
+
+ addItem(layout);
+ }
+
+}