James Moger
2014-07-05 f010ef67e4fece736f005050ef63ad5a62c68c8b
src/main/java/com/gitblit/wicket/pages/NewRepositoryPage.java
@@ -56,8 +56,8 @@
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.BooleanChoiceOption;
import com.gitblit.wicket.panels.BooleanOption;
import com.gitblit.wicket.panels.RepositoryNamePanel;
public class NewRepositoryPage extends RootSubPage {
@@ -130,7 +130,7 @@
               if (addGitignore) {
                  gitignore = gitignoreModel.getObject();
                  if (StringUtils.isEmpty(gitignore)) {
                     throw new GitBlitException("Please select a .gitignore file");
                     throw new GitBlitException(getString("gb.pleaseSelectGitIgnore"));
                  }
               }
@@ -142,7 +142,6 @@
            } catch (GitBlitException e) {
               error(e.getMessage());
               namePanel.resetModel(repositoryModel);
               return;
            }
            setRedirect(true);
@@ -181,7 +180,7 @@
      // add README
      addReadmeModel = Model.of(false);
      form.add(new CheckboxOption("addReadme",
      form.add(new BooleanOption("addReadme",
            getString("gb.initWithReadme"),
            getString("gb.initWithReadmeDescription"),
            addReadmeModel));
@@ -202,16 +201,16 @@
      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,
            gitignoreModel,
            gitignores));
            gitignores).setVisible(gitignores.size() > 0));
      // 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));