]> source.dussan.org Git - gitblit.git/commitdiff
Disallow browser autocomplete on add/edit pages
authorJames Moger <james.moger@gitblit.com>
Fri, 3 Feb 2012 22:21:10 +0000 (17:21 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 3 Feb 2012 22:21:10 +0000 (17:21 -0500)
docs/04_releases.mkd
src/com/gitblit/wicket/pages/EditRepositoryPage.java
src/com/gitblit/wicket/pages/EditTeamPage.java
src/com/gitblit/wicket/pages/EditUserPage.java

index 2d465bc3913d872b9a9a822c23442d00028f9499..effc94f88de607773cce86e167b9c0af770eb00b 100644 (file)
@@ -14,6 +14,7 @@
 \r
 #### fixes \r
 \r
+- Disallow browser autocomplete on add/edit user/team/repository pages\r
 - Fixed username case-sensitivity issues (issue 43)\r
 - Disregard searching a subfolder if Gitblit does not have filesystem permissions (Github/lemval issue 51)\r
 \r
index a259a995c4c04041eac6fd811924e66714ebefdc..0361da3e4345638b080ca862964e61fc072b342a 100644 (file)
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Set;\r
 \r
 import org.apache.wicket.PageParameters;\r
+import org.apache.wicket.behavior.SimpleAttributeModifier;\r
 import org.apache.wicket.extensions.markup.html.form.palette.Palette;\r
 import org.apache.wicket.markup.html.form.Button;\r
 import org.apache.wicket.markup.html.form.CheckBox;\r
@@ -261,6 +262,9 @@ public class EditRepositoryPage extends RootSubPage {
                        }\r
                };\r
 \r
+               // do not let the browser pre-populate these fields\r
+               form.add(new SimpleAttributeModifier("autocomplete", "off"));\r
+\r
                // field names reflective match RepositoryModel fields\r
                form.add(new TextField<String>("name").setEnabled(isCreate || isAdmin));\r
                form.add(new TextField<String>("description"));\r
index 8a0540f1385338f3fd6bba6a5e46011997a78789..0af3cb4ec8c7ce8808f2081b713ac166031475e8 100644 (file)
@@ -24,6 +24,7 @@ import java.util.List;
 import java.util.Set;\r
 \r
 import org.apache.wicket.PageParameters;\r
+import org.apache.wicket.behavior.SimpleAttributeModifier;\r
 import org.apache.wicket.extensions.markup.html.form.palette.Palette;\r
 import org.apache.wicket.markup.html.form.Button;\r
 import org.apache.wicket.markup.html.form.ChoiceRenderer;\r
@@ -211,6 +212,9 @@ public class EditTeamPage extends RootSubPage {
                        }\r
                };\r
 \r
+               // do not let the browser pre-populate these fields\r
+               form.add(new SimpleAttributeModifier("autocomplete", "off"));\r
+\r
                // field names reflective match TeamModel fields\r
                form.add(new TextField<String>("name"));\r
                form.add(users);\r
index 142a5424adb657ba3d649b8095b4d30ec16b68f6..62d955e2a534eaa583387b43944698e7634ec2d1 100644 (file)
@@ -22,6 +22,7 @@ import java.util.Iterator;
 import java.util.List;\r
 \r
 import org.apache.wicket.PageParameters;\r
+import org.apache.wicket.behavior.SimpleAttributeModifier;\r
 import org.apache.wicket.extensions.markup.html.form.palette.Palette;\r
 import org.apache.wicket.markup.html.form.Button;\r
 import org.apache.wicket.markup.html.form.CheckBox;\r
@@ -197,6 +198,9 @@ public class EditUserPage extends RootSubPage {
                                }\r
                        }\r
                };\r
+               \r
+               // do not let the browser pre-populate these fields\r
+               form.add(new SimpleAttributeModifier("autocomplete", "off"));\r
 \r
                // field names reflective match UserModel fields\r
                form.add(new TextField<String>("username"));\r