import org.apache.wicket.markup.html.form.RadioGroup;\r
import org.apache.wicket.markup.html.list.ListItem;\r
import org.apache.wicket.markup.html.list.ListView;\r
+import org.apache.wicket.markup.html.panel.Fragment;\r
import org.apache.wicket.model.IModel;\r
import org.apache.wicket.model.Model;\r
\r
}\r
add(policiesGroup);\r
\r
- allowForks = Model.of(true);\r
- add(new CheckboxOption("allowForks",\r
+ 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
getString("gb.allowForks"),\r
getString("gb.allowForksDescription"),\r
- allowForks).setEnabled(app().settings().getBoolean(Keys.web.allowForking, true)));\r
+ allowForks));\r
+ add(fragment);\r
+ } else {\r
+ add(new Label("allowForks").setVisible(false));\r
+ }\r
\r
setOutputMarkupId(true);\r
}\r