]> source.dussan.org Git - gitblit.git/commitdiff
Rename option classes
authorJames Moger <james.moger@gitblit.com>
Wed, 4 Jun 2014 13:03:41 +0000 (09:03 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 4 Jun 2014 13:03:41 +0000 (09:03 -0400)
12 files changed:
src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
src/main/java/com/gitblit/wicket/pages/NewRepositoryPage.java
src/main/java/com/gitblit/wicket/panels/AccessPolicyPanel.java
src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.html [new file with mode: 0644]
src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java [new file with mode: 0644]
src/main/java/com/gitblit/wicket/panels/BooleanOption.html [new file with mode: 0644]
src/main/java/com/gitblit/wicket/panels/BooleanOption.java [new file with mode: 0644]
src/main/java/com/gitblit/wicket/panels/CheckboxOption.html [deleted file]
src/main/java/com/gitblit/wicket/panels/CheckboxOption.java [deleted file]
src/main/java/com/gitblit/wicket/panels/ConditionalChoiceOption.html [deleted file]
src/main/java/com/gitblit/wicket/panels/ConditionalChoiceOption.java [deleted file]
src/main/java/com/gitblit/wicket/panels/TextOption.html

index f891595c1b11471f4e9f65faf0f8c522f55dc677..a0e6e7bab9c6946b2259b362bcd9fc0a7f2525c6 100644 (file)
@@ -71,7 +71,7 @@ import com.gitblit.wicket.WicketUtils;
 import com.gitblit.wicket.panels.AccessPolicyPanel;\r
 import com.gitblit.wicket.panels.BasePanel.JavascriptEventConfirmation;\r
 import com.gitblit.wicket.panels.BulletListPanel;\r
-import com.gitblit.wicket.panels.CheckboxOption;\r
+import com.gitblit.wicket.panels.BooleanOption;\r
 import com.gitblit.wicket.panels.ChoiceOption;\r
 import com.gitblit.wicket.panels.RegistrantPermissionsPanel;\r
 import com.gitblit.wicket.panels.RepositoryNamePanel;\r
@@ -436,17 +436,17 @@ public class EditRepositoryPage extends RootSubPage {
                //\r
                // TICKETS\r
                //\r
-               form.add(new CheckboxOption("acceptNewPatchsets",\r
+               form.add(new BooleanOption("acceptNewPatchsets",\r
                                getString("gb.acceptNewPatchsets"),\r
                                getString("gb.acceptNewPatchsetsDescription"),\r
                                new PropertyModel<Boolean>(repositoryModel, "acceptNewPatchsets")));\r
 \r
-               form.add(new CheckboxOption("acceptNewTickets",\r
+               form.add(new BooleanOption("acceptNewTickets",\r
                                getString("gb.acceptNewTickets"),\r
                                getString("gb.acceptNewTicketsDescription"),\r
                                new PropertyModel<Boolean>(repositoryModel, "acceptNewPatchsets")));\r
 \r
-               form.add(new CheckboxOption("requireApproval",\r
+               form.add(new BooleanOption("requireApproval",\r
                                getString("gb.requireApproval"),\r
                                getString("gb.requireApprovalDescription"),\r
                                new PropertyModel<Boolean>(repositoryModel, "requireApproval")));\r
@@ -460,19 +460,19 @@ public class EditRepositoryPage extends RootSubPage {
                //\r
                // RECEIVE\r
                //\r
-               form.add(new CheckboxOption("isFrozen",\r
+               form.add(new BooleanOption("isFrozen",\r
                                getString("gb.isFrozen"),\r
                                getString("gb.isFrozenDescription"),\r
                                new PropertyModel<Boolean>(repositoryModel, "isFrozen")));\r
 \r
-               form.add(new CheckboxOption("incrementalPushTags",\r
+               form.add(new BooleanOption("incrementalPushTags",\r
                                getString("gb.enableIncrementalPushTags"),\r
                                getString("gb.useIncrementalPushTagsDescription"),\r
                                new PropertyModel<Boolean>(repositoryModel, "useIncrementalPushTags")));\r
 \r
                final CheckBox verifyCommitter = new CheckBox("checkbox", new PropertyModel<Boolean>(repositoryModel, "verifyCommitter"));\r
                verifyCommitter.setOutputMarkupId(true);\r
-               form.add(new CheckboxOption("verifyCommitter",\r
+               form.add(new BooleanOption("verifyCommitter",\r
                                getString("gb.verifyCommitter"),\r
                                getString("gb.verifyCommitterDescription") + "<br/>" + getString("gb.verifyCommitterNote"),\r
                                verifyCommitter).setIsHtmlDescription(true));\r
@@ -547,17 +547,17 @@ public class EditRepositoryPage extends RootSubPage {
                                "span6",\r
                                new PropertyModel<String>(repositoryModel, "origin")).setEnabled(false));\r
 \r
-               form.add(new CheckboxOption("showRemoteBranches",\r
+               form.add(new BooleanOption("showRemoteBranches",\r
                                getString("gb.showRemoteBranches"),\r
                                getString("gb.showRemoteBranchesDescription"),\r
                                new PropertyModel<Boolean>(repositoryModel, "showRemoteBranches")));\r
 \r
-               form.add(new CheckboxOption("skipSizeCalculation",\r
+               form.add(new BooleanOption("skipSizeCalculation",\r
                                getString("gb.skipSizeCalculation"),\r
                                getString("gb.skipSizeCalculationDescription"),\r
                                new PropertyModel<Boolean>(repositoryModel, "skipSizeCalculation")));\r
 \r
-               form.add(new CheckboxOption("skipSummaryMetrics",\r
+               form.add(new BooleanOption("skipSummaryMetrics",\r
                                getString("gb.skipSummaryMetrics"),\r
                                getString("gb.skipSummaryMetricsDescription"),\r
                                new PropertyModel<Boolean>(repositoryModel, "skipSummaryMetrics")));\r
index 0134677ed72eaf41711b9d25ad8c34a875b7f251..b8752e330b068e3aad145e3ce31b07342a7b22c1 100644 (file)
@@ -56,8 +56,8 @@ import com.gitblit.utils.StringUtils;
 import com.gitblit.wicket.GitBlitWebSession;\r
 import com.gitblit.wicket.WicketUtils;\r
 import com.gitblit.wicket.panels.AccessPolicyPanel;\r
-import com.gitblit.wicket.panels.CheckboxOption;\r
-import com.gitblit.wicket.panels.ConditionalChoiceOption;\r
+import com.gitblit.wicket.panels.BooleanOption;\r
+import com.gitblit.wicket.panels.BooleanChoiceOption;\r
 import com.gitblit.wicket.panels.RepositoryNamePanel;\r
 \r
 public class NewRepositoryPage extends RootSubPage {\r
@@ -181,7 +181,7 @@ public class NewRepositoryPage extends RootSubPage {
 \r
                // add README\r
                addReadmeModel = Model.of(false);\r
-               form.add(new CheckboxOption("addReadme",\r
+               form.add(new BooleanOption("addReadme",\r
                                getString("gb.initWithReadme"),\r
                                getString("gb.initWithReadmeDescription"),\r
                                addReadmeModel));\r
@@ -202,7 +202,7 @@ public class NewRepositoryPage extends RootSubPage {
 \r
                gitignoreModel = Model.of("");\r
                addGitignoreModel = Model.of(false);\r
-               form.add(new ConditionalChoiceOption<String>("addGitIgnore",\r
+               form.add(new BooleanChoiceOption<String>("addGitIgnore",\r
                                getString("gb.initWithGitignore"),\r
                                getString("gb.initWithGitignoreDescription"),\r
                                addGitignoreModel,\r
@@ -211,7 +211,7 @@ public class NewRepositoryPage extends RootSubPage {
 \r
                // TODO consider gitflow at creation (ticket-55)\r
                addGitflowModel = Model.of(false);\r
-               form.add(new CheckboxOption("addGitFlow",\r
+               form.add(new BooleanOption("addGitFlow",\r
                                "Include a .gitflow file",\r
                                "This will generate a config file which guides Git clients in setting up Gitflow branches.",\r
                                addGitflowModel).setVisible(false));\r
index 7a812307941e1f6d390ba8e3a7fa63c4ecd8d720..d8dcdced9ac1dcad83d423e1dd46407babf1ed07 100644 (file)
@@ -149,7 +149,7 @@ public class AccessPolicyPanel extends BasePanel {
                allowForks = Model.of(app().settings().getBoolean(Keys.web.allowForking, true));\r
                if (allowForks.getObject()) {\r
                        Fragment fragment = new Fragment("allowForks", "allowForksFragment", this);\r
-                       fragment.add(new CheckboxOption("allowForks",\r
+                       fragment.add(new BooleanOption("allowForks",\r
                                getString("gb.allowForks"),\r
                                getString("gb.allowForksDescription"),\r
                                allowForks));\r
diff --git a/src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.html b/src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.html
new file mode 100644 (file)
index 0000000..fb360d1
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml"  \r
+      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"  \r
+      xml:lang="en"  \r
+      lang="en"> \r
+\r
+<body>\r
+<wicket:panel>\r
+       <div style="padding-top:4px;">\r
+               <div>\r
+                       <label style="font-weight:bold;" class="checkbox"><input type="checkbox" wicket:id="checkbox" /> <span wicket:id="name"></span></label>\r
+               </div>\r
+               <label class="checkbox" style="color:#777;"> <span wicket:id="description"></span>\r
+               <p style="padding-top:5px;"><select class="span3" wicket:id="choice" /></p>\r
+               </label>                \r
+       </div>\r
+</wicket:panel>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java b/src/main/java/com/gitblit/wicket/panels/BooleanChoiceOption.java
new file mode 100644 (file)
index 0000000..98a700b
--- /dev/null
@@ -0,0 +1,78 @@
+/*\r
+ * Copyright 2014 gitblit.com.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package com.gitblit.wicket.panels;\r
+\r
+import java.util.List;\r
+\r
+import org.apache.wicket.ajax.AjaxRequestTarget;\r
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;\r
+import org.apache.wicket.markup.html.basic.Label;\r
+import org.apache.wicket.markup.html.form.CheckBox;\r
+import org.apache.wicket.markup.html.form.DropDownChoice;\r
+import org.apache.wicket.model.IModel;\r
+import org.parboiled.common.StringUtils;\r
+\r
+/**\r
+ * A re-usable conditional choice option panel.\r
+ *\r
+ * [x] title\r
+ *     description\r
+ *     [choices]\r
+ *\r
+ * @author James Moger\r
+ *\r
+ */\r
+public class BooleanChoiceOption<T> extends BasePanel {\r
+\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       final CheckBox checkbox;\r
+       final DropDownChoice<T> choice;\r
+\r
+       public BooleanChoiceOption(String wicketId, String title, String description, IModel<Boolean> checkboxModel, IModel<T> choiceModel, List<T> choices) {\r
+               super(wicketId);\r
+               add(new Label("name", title));\r
+               add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));\r
+\r
+               this.checkbox = new CheckBox("checkbox", checkboxModel);\r
+               checkbox.setOutputMarkupId(true);\r
+\r
+               this.choice = new DropDownChoice<T>("choice", choiceModel, choices);\r
+               choice.setOutputMarkupId(true);\r
+\r
+               setup();\r
+       }\r
+\r
+       private void setup() {\r
+               add(checkbox);\r
+               add(choice.setMarkupId("choice").setEnabled(choice.getChoices().size() > 0));\r
+               choice.setEnabled(checkbox.getModelObject());\r
+\r
+               checkbox.add(new AjaxFormComponentUpdatingBehavior("onchange") {\r
+\r
+                       private static final long serialVersionUID = 1L;\r
+\r
+                       @Override\r
+                       protected void onUpdate(AjaxRequestTarget target) {\r
+                               choice.setEnabled(checkbox.getModelObject());\r
+                               target.addComponent(choice);\r
+                               if (!choice.isEnabled()) {\r
+                                       choice.setModelObject(null);\r
+                               }\r
+                       }\r
+               });\r
+       }\r
+}\r
diff --git a/src/main/java/com/gitblit/wicket/panels/BooleanOption.html b/src/main/java/com/gitblit/wicket/panels/BooleanOption.html
new file mode 100644 (file)
index 0000000..6684fe9
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml"  \r
+      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"  \r
+      xml:lang="en"  \r
+      lang="en"> \r
+\r
+<body>\r
+<wicket:panel>\r
+       <div style="padding-top:4px;">\r
+               <div>\r
+                       <label style="font-weight:bold;" class="checkbox"><input type="checkbox" wicket:id="checkbox" /> <span wicket:id="name"></span></label>\r
+               </div>\r
+               <label class="checkbox" style="color:#777;" wicket:id="description"></label>\r
+       </div>\r
+</wicket:panel>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/src/main/java/com/gitblit/wicket/panels/BooleanOption.java b/src/main/java/com/gitblit/wicket/panels/BooleanOption.java
new file mode 100644 (file)
index 0000000..4a9299c
--- /dev/null
@@ -0,0 +1,54 @@
+/*\r
+ * Copyright 2014 gitblit.com.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package com.gitblit.wicket.panels;\r
+\r
+import org.apache.wicket.markup.html.basic.Label;\r
+import org.apache.wicket.markup.html.form.CheckBox;\r
+import org.apache.wicket.model.IModel;\r
+import org.parboiled.common.StringUtils;\r
+\r
+/**\r
+ * A re-usable checkbox option panel.\r
+ *\r
+ * [x] title\r
+ *     description\r
+ *\r
+ * @author James Moger\r
+ *\r
+ */\r
+public class BooleanOption extends BasePanel {\r
+\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       public BooleanOption(String wicketId, String title, String description, IModel<Boolean> model) {\r
+               super(wicketId);\r
+               add(new Label("name", title));\r
+               add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));\r
+               add(new CheckBox("checkbox", model));\r
+       }\r
+\r
+       public BooleanOption(String wicketId, String title, String description, CheckBox checkbox) {\r
+               super(wicketId);\r
+               add(new Label("name", title));\r
+               add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));\r
+               add(checkbox.setMarkupId("checkbox"));\r
+       }\r
+\r
+       public BooleanOption setIsHtmlDescription(boolean val) {\r
+               ((Label) get("description")).setEscapeModelStrings(!val);\r
+               return this;\r
+       }\r
+}\r
diff --git a/src/main/java/com/gitblit/wicket/panels/CheckboxOption.html b/src/main/java/com/gitblit/wicket/panels/CheckboxOption.html
deleted file mode 100644 (file)
index 6684fe9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml"  \r
-      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"  \r
-      xml:lang="en"  \r
-      lang="en"> \r
-\r
-<body>\r
-<wicket:panel>\r
-       <div style="padding-top:4px;">\r
-               <div>\r
-                       <label style="font-weight:bold;" class="checkbox"><input type="checkbox" wicket:id="checkbox" /> <span wicket:id="name"></span></label>\r
-               </div>\r
-               <label class="checkbox" style="color:#777;" wicket:id="description"></label>\r
-       </div>\r
-</wicket:panel>\r
-</body>\r
-</html>
\ No newline at end of file
diff --git a/src/main/java/com/gitblit/wicket/panels/CheckboxOption.java b/src/main/java/com/gitblit/wicket/panels/CheckboxOption.java
deleted file mode 100644 (file)
index 08eeaa2..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*\r
- * Copyright 2014 gitblit.com.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package com.gitblit.wicket.panels;\r
-\r
-import org.apache.wicket.markup.html.basic.Label;\r
-import org.apache.wicket.markup.html.form.CheckBox;\r
-import org.apache.wicket.model.IModel;\r
-import org.parboiled.common.StringUtils;\r
-\r
-/**\r
- * A re-usable checkbox option panel.\r
- *\r
- * [x] title\r
- *     description\r
- *\r
- * @author James Moger\r
- *\r
- */\r
-public class CheckboxOption extends BasePanel {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       public CheckboxOption(String wicketId, String title, String description, IModel<Boolean> model) {\r
-               super(wicketId);\r
-               add(new Label("name", title));\r
-               add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));\r
-               add(new CheckBox("checkbox", model));\r
-       }\r
-\r
-       public CheckboxOption(String wicketId, String title, String description, CheckBox checkbox) {\r
-               super(wicketId);\r
-               add(new Label("name", title));\r
-               add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));\r
-               add(checkbox.setMarkupId("checkbox"));\r
-       }\r
-\r
-       public CheckboxOption setIsHtmlDescription(boolean val) {\r
-               ((Label) get("description")).setEscapeModelStrings(!val);\r
-               return this;\r
-       }\r
-}\r
diff --git a/src/main/java/com/gitblit/wicket/panels/ConditionalChoiceOption.html b/src/main/java/com/gitblit/wicket/panels/ConditionalChoiceOption.html
deleted file mode 100644 (file)
index fb360d1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml"  \r
-      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"  \r
-      xml:lang="en"  \r
-      lang="en"> \r
-\r
-<body>\r
-<wicket:panel>\r
-       <div style="padding-top:4px;">\r
-               <div>\r
-                       <label style="font-weight:bold;" class="checkbox"><input type="checkbox" wicket:id="checkbox" /> <span wicket:id="name"></span></label>\r
-               </div>\r
-               <label class="checkbox" style="color:#777;"> <span wicket:id="description"></span>\r
-               <p style="padding-top:5px;"><select class="span3" wicket:id="choice" /></p>\r
-               </label>                \r
-       </div>\r
-</wicket:panel>\r
-</body>\r
-</html>
\ No newline at end of file
diff --git a/src/main/java/com/gitblit/wicket/panels/ConditionalChoiceOption.java b/src/main/java/com/gitblit/wicket/panels/ConditionalChoiceOption.java
deleted file mode 100644 (file)
index 07aaee8..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*\r
- * Copyright 2014 gitblit.com.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package com.gitblit.wicket.panels;\r
-\r
-import java.util.List;\r
-\r
-import org.apache.wicket.ajax.AjaxRequestTarget;\r
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;\r
-import org.apache.wicket.markup.html.basic.Label;\r
-import org.apache.wicket.markup.html.form.CheckBox;\r
-import org.apache.wicket.markup.html.form.DropDownChoice;\r
-import org.apache.wicket.model.IModel;\r
-import org.parboiled.common.StringUtils;\r
-\r
-/**\r
- * A re-usable conditional choice option panel.\r
- *\r
- * [x] title\r
- *     description\r
- *     [choices]\r
- *\r
- * @author James Moger\r
- *\r
- */\r
-public class ConditionalChoiceOption<T> extends BasePanel {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       final CheckBox checkbox;\r
-       final DropDownChoice<T> choice;\r
-\r
-       public ConditionalChoiceOption(String wicketId, String title, String description, IModel<Boolean> checkboxModel, IModel<T> choiceModel, List<T> choices) {\r
-               super(wicketId);\r
-               add(new Label("name", title));\r
-               add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));\r
-\r
-               this.checkbox = new CheckBox("checkbox", checkboxModel);\r
-               checkbox.setOutputMarkupId(true);\r
-\r
-               this.choice = new DropDownChoice<T>("choice", choiceModel, choices);\r
-               choice.setOutputMarkupId(true);\r
-\r
-               setup();\r
-       }\r
-\r
-       private void setup() {\r
-               add(checkbox);\r
-               add(choice.setMarkupId("choice").setEnabled(choice.getChoices().size() > 0));\r
-               choice.setEnabled(checkbox.getModelObject());\r
-\r
-               checkbox.add(new AjaxFormComponentUpdatingBehavior("onchange") {\r
-\r
-                       private static final long serialVersionUID = 1L;\r
-\r
-                       @Override\r
-                       protected void onUpdate(AjaxRequestTarget target) {\r
-                               choice.setEnabled(checkbox.getModelObject());\r
-                               target.addComponent(choice);\r
-                               if (!choice.isEnabled()) {\r
-                                       choice.setModelObject(null);\r
-                               }\r
-                       }\r
-               });\r
-       }\r
-}\r
index ff2da78e73ecf03637f561d98fa2fc053bc5e9a2..9fa0c700b36406eae3e7948099cec6bcf844414c 100644 (file)
@@ -11,7 +11,7 @@
                        <b><span wicket:id="name"></span></b>\r
                </div>\r
                <label class="checkbox" style="color:#777;"> <span wicket:id="description"></span>\r
-               <p style="padding-top:5px;"><input class="span2" type="text" wicket:id="text" /></p>\r
+               <p style="padding-top:5px;"><input class="span3" type="text" wicket:id="text" /></p>\r
                </label>\r
                \r
        </div>\r