Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

As I user I could tick check box when I want to be auto-logged in the…

… future.
  • Loading branch information...
commit c5e91b39a203c9103754f8a03ab2e4151fc9e199 1 parent d787a98
Tomasz Dziurko authored September 13, 2012
7  src/main/java/pl/tomaszdziurko/wicket/view/LoginPage.html
@@ -31,6 +31,13 @@
31 31
                             <input type="password" id="password" wicket:id="password" />
32 32
                         </div>
33 33
                     </div>
  34
+                    <div class="control-group">
  35
+                        <div class="controls">
  36
+                            <label class="checkbox">
  37
+                                <input type="checkbox" wicket:id="rememberMe"> Remember me on this computer
  38
+                            </label>
  39
+                        </div>
  40
+                    </div>
34 41
                     <div class="form-actions">
35 42
                         <input type="submit" wicket:id="submit" value="Login" title="Login" class="btn btn-primary"/>
36 43
                     </div>
3  src/main/java/pl/tomaszdziurko/wicket/view/LoginPage.java
... ...
@@ -1,6 +1,7 @@
1 1
 package pl.tomaszdziurko.wicket.view;
2 2
 
3 3
 import org.apache.wicket.markup.html.form.Button;
  4
+import org.apache.wicket.markup.html.form.CheckBox;
4 5
 import org.apache.wicket.markup.html.form.Form;
5 6
 import org.apache.wicket.markup.html.form.PasswordTextField;
6 7
 import org.apache.wicket.markup.html.form.RequiredTextField;
@@ -15,6 +16,7 @@
15 16
 
16 17
     private String login;
17 18
     private String password;
  19
+    private boolean rememberMe;
18 20
 
19 21
     public LoginPage() {
20 22
 
@@ -24,6 +26,7 @@ public LoginPage() {
24 26
         loginForm.add(new FeedbackPanel("feedback"));
25 27
         loginForm.add(new RequiredTextField<String>("login", new PropertyModel<String>(this, "login")));
26 28
         loginForm.add(new PasswordTextField("password", new PropertyModel<String>(this, "password")));
  29
+        loginForm.add(new CheckBox("rememberMe", new PropertyModel<Boolean>(this, "rememberMe")));
27 30
 
28 31
         Button submit = new Button("submit") {
29 32
             @Override

0 notes on commit c5e91b3

Please sign in to comment.
Something went wrong with that request. Please try again.