4 files renamed
4 files modified
| | |
| | | import com.gitblit.wicket.panels.AccessPolicyPanel;
|
| | | import com.gitblit.wicket.panels.BasePanel.JavascriptEventConfirmation;
|
| | | import com.gitblit.wicket.panels.BulletListPanel;
|
| | | import com.gitblit.wicket.panels.CheckboxOption;
|
| | | import com.gitblit.wicket.panels.BooleanOption;
|
| | | import com.gitblit.wicket.panels.ChoiceOption;
|
| | | import com.gitblit.wicket.panels.RegistrantPermissionsPanel;
|
| | | import com.gitblit.wicket.panels.RepositoryNamePanel;
|
| | |
| | | //
|
| | | // TICKETS
|
| | | //
|
| | | form.add(new CheckboxOption("acceptNewPatchsets",
|
| | | form.add(new BooleanOption("acceptNewPatchsets",
|
| | | getString("gb.acceptNewPatchsets"),
|
| | | getString("gb.acceptNewPatchsetsDescription"),
|
| | | new PropertyModel<Boolean>(repositoryModel, "acceptNewPatchsets")));
|
| | |
|
| | | form.add(new CheckboxOption("acceptNewTickets",
|
| | | form.add(new BooleanOption("acceptNewTickets",
|
| | | getString("gb.acceptNewTickets"),
|
| | | getString("gb.acceptNewTicketsDescription"),
|
| | | new PropertyModel<Boolean>(repositoryModel, "acceptNewPatchsets")));
|
| | |
|
| | | form.add(new CheckboxOption("requireApproval",
|
| | | form.add(new BooleanOption("requireApproval",
|
| | | getString("gb.requireApproval"),
|
| | | getString("gb.requireApprovalDescription"),
|
| | | new PropertyModel<Boolean>(repositoryModel, "requireApproval")));
|
| | |
| | | //
|
| | | // RECEIVE
|
| | | //
|
| | | form.add(new CheckboxOption("isFrozen",
|
| | | form.add(new BooleanOption("isFrozen",
|
| | | getString("gb.isFrozen"),
|
| | | getString("gb.isFrozenDescription"),
|
| | | new PropertyModel<Boolean>(repositoryModel, "isFrozen")));
|
| | |
|
| | | form.add(new CheckboxOption("incrementalPushTags",
|
| | | form.add(new BooleanOption("incrementalPushTags",
|
| | | getString("gb.enableIncrementalPushTags"),
|
| | | getString("gb.useIncrementalPushTagsDescription"),
|
| | | new PropertyModel<Boolean>(repositoryModel, "useIncrementalPushTags")));
|
| | |
|
| | | final CheckBox verifyCommitter = new CheckBox("checkbox", new PropertyModel<Boolean>(repositoryModel, "verifyCommitter"));
|
| | | verifyCommitter.setOutputMarkupId(true);
|
| | | form.add(new CheckboxOption("verifyCommitter",
|
| | | form.add(new BooleanOption("verifyCommitter",
|
| | | getString("gb.verifyCommitter"),
|
| | | getString("gb.verifyCommitterDescription") + "<br/>" + getString("gb.verifyCommitterNote"),
|
| | | verifyCommitter).setIsHtmlDescription(true));
|
| | |
| | | "span6",
|
| | | new PropertyModel<String>(repositoryModel, "origin")).setEnabled(false));
|
| | |
|
| | | form.add(new CheckboxOption("showRemoteBranches",
|
| | | form.add(new BooleanOption("showRemoteBranches",
|
| | | getString("gb.showRemoteBranches"),
|
| | | getString("gb.showRemoteBranchesDescription"),
|
| | | new PropertyModel<Boolean>(repositoryModel, "showRemoteBranches")));
|
| | |
|
| | | form.add(new CheckboxOption("skipSizeCalculation",
|
| | | form.add(new BooleanOption("skipSizeCalculation",
|
| | | getString("gb.skipSizeCalculation"),
|
| | | getString("gb.skipSizeCalculationDescription"),
|
| | | new PropertyModel<Boolean>(repositoryModel, "skipSizeCalculation")));
|
| | |
|
| | | form.add(new CheckboxOption("skipSummaryMetrics",
|
| | | form.add(new BooleanOption("skipSummaryMetrics",
|
| | | getString("gb.skipSummaryMetrics"),
|
| | | getString("gb.skipSummaryMetricsDescription"),
|
| | | new PropertyModel<Boolean>(repositoryModel, "skipSummaryMetrics")));
|
| | |
| | | import com.gitblit.wicket.GitBlitWebSession;
|
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.panels.AccessPolicyPanel;
|
| | | import com.gitblit.wicket.panels.CheckboxOption;
|
| | | import com.gitblit.wicket.panels.ConditionalChoiceOption;
|
| | | import com.gitblit.wicket.panels.BooleanOption;
|
| | | import com.gitblit.wicket.panels.BooleanChoiceOption;
|
| | | import com.gitblit.wicket.panels.RepositoryNamePanel;
|
| | |
|
| | | public class NewRepositoryPage extends RootSubPage {
|
| | |
| | |
|
| | | // add README
|
| | | addReadmeModel = Model.of(false);
|
| | | form.add(new CheckboxOption("addReadme",
|
| | | form.add(new BooleanOption("addReadme",
|
| | | getString("gb.initWithReadme"),
|
| | | getString("gb.initWithReadmeDescription"),
|
| | | addReadmeModel));
|
| | |
| | |
|
| | | gitignoreModel = Model.of("");
|
| | | addGitignoreModel = Model.of(false);
|
| | | form.add(new ConditionalChoiceOption<String>("addGitIgnore",
|
| | | form.add(new BooleanChoiceOption<String>("addGitIgnore",
|
| | | getString("gb.initWithGitignore"),
|
| | | getString("gb.initWithGitignoreDescription"),
|
| | | addGitignoreModel,
|
| | |
| | |
|
| | | // TODO consider gitflow at creation (ticket-55)
|
| | | addGitflowModel = Model.of(false);
|
| | | form.add(new CheckboxOption("addGitFlow",
|
| | | form.add(new BooleanOption("addGitFlow",
|
| | | "Include a .gitflow file",
|
| | | "This will generate a config file which guides Git clients in setting up Gitflow branches.",
|
| | | addGitflowModel).setVisible(false));
|
| | |
| | | allowForks = Model.of(app().settings().getBoolean(Keys.web.allowForking, true));
|
| | | if (allowForks.getObject()) {
|
| | | Fragment fragment = new Fragment("allowForks", "allowForksFragment", this);
|
| | | fragment.add(new CheckboxOption("allowForks",
|
| | | fragment.add(new BooleanOption("allowForks",
|
| | | getString("gb.allowForks"),
|
| | | getString("gb.allowForksDescription"),
|
| | | allowForks));
|
File was renamed from src/main/java/com/gitblit/wicket/panels/ConditionalChoiceOption.java |
| | |
| | | * @author James Moger
|
| | | *
|
| | | */
|
| | | public class ConditionalChoiceOption<T> extends BasePanel {
|
| | | public class BooleanChoiceOption<T> extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | final CheckBox checkbox;
|
| | | final DropDownChoice<T> choice;
|
| | |
|
| | | public ConditionalChoiceOption(String wicketId, String title, String description, IModel<Boolean> checkboxModel, IModel<T> choiceModel, List<T> choices) {
|
| | | public BooleanChoiceOption(String wicketId, String title, String description, IModel<Boolean> checkboxModel, IModel<T> choiceModel, List<T> choices) {
|
| | | super(wicketId);
|
| | | add(new Label("name", title));
|
| | | add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));
|
File was renamed from src/main/java/com/gitblit/wicket/panels/CheckboxOption.java |
| | |
| | | * @author James Moger
|
| | | *
|
| | | */
|
| | | public class CheckboxOption extends BasePanel {
|
| | | public class BooleanOption extends BasePanel {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public CheckboxOption(String wicketId, String title, String description, IModel<Boolean> model) {
|
| | | public BooleanOption(String wicketId, String title, String description, IModel<Boolean> model) {
|
| | | super(wicketId);
|
| | | add(new Label("name", title));
|
| | | add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));
|
| | | add(new CheckBox("checkbox", model));
|
| | | }
|
| | |
|
| | | public CheckboxOption(String wicketId, String title, String description, CheckBox checkbox) {
|
| | | public BooleanOption(String wicketId, String title, String description, CheckBox checkbox) {
|
| | | super(wicketId);
|
| | | add(new Label("name", title));
|
| | | add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));
|
| | | add(checkbox.setMarkupId("checkbox"));
|
| | | }
|
| | |
|
| | | public CheckboxOption setIsHtmlDescription(boolean val) {
|
| | | public BooleanOption setIsHtmlDescription(boolean val) {
|
| | | ((Label) get("description")).setEscapeModelStrings(!val);
|
| | | return this;
|
| | | }
|
| | |
| | | <b><span wicket:id="name"></span></b>
|
| | | </div>
|
| | | <label class="checkbox" style="color:#777;"> <span wicket:id="description"></span>
|
| | | <p style="padding-top:5px;"><input class="span2" type="text" wicket:id="text" /></p>
|
| | | <p style="padding-top:5px;"><input class="span3" type="text" wicket:id="text" /></p>
|
| | | </label>
|
| | |
|
| | | </div>
|