| | |
| | | import org.apache.wicket.markup.html.form.IChoiceRenderer;
|
| | | import org.apache.wicket.markup.html.form.TextField;
|
| | | import org.apache.wicket.model.CompoundPropertyModel;
|
| | | import org.apache.wicket.model.IModel;
|
| | | import org.apache.wicket.model.Model;
|
| | | import org.apache.wicket.model.util.CollectionModel;
|
| | | import org.apache.wicket.model.util.ListModel;
|
| | |
|
| | |
| | | private final boolean isCreate;
|
| | |
|
| | | private boolean isAdmin;
|
| | |
|
| | | private IModel<String> mailRecipients;
|
| | |
|
| | | public EditRepositoryPage() {
|
| | | // create constructor
|
| | |
| | | Collections.sort(repositoryUsers);
|
| | | }
|
| | | federationSets.addAll(repositoryModel.federationSets);
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | final String oldName = repositoryModel.name;
|
| | | // users palette
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | // set mail recipients
|
| | | String ml = mailRecipients.getObject();
|
| | | if (!StringUtils.isEmpty(ml)) {
|
| | | List<String> list = StringUtils.getStringsFromValue(ml.trim(), " ");
|
| | | repositoryModel.mailRecipients = list;
|
| | | }
|
| | |
|
| | | // save the repository
|
| | | GitBlit.self().updateRepositoryModel(oldName, repositoryModel, isCreate);
|
| | |
|
| | |
| | | repositoryUsers.add(repositoryModel.owner);
|
| | | }
|
| | | GitBlit.self().setRepositoryUsers(repositoryModel, repositoryUsers);
|
| | | |
| | |
|
| | | // save the team access list
|
| | | Iterator<String> teams = teamsPalette.getSelectedChoices();
|
| | | List<String> repositoryTeams = new ArrayList<String>();
|
| | |
| | | form.add(new CheckBox("showReadme"));
|
| | | form.add(new CheckBox("skipSizeCalculation"));
|
| | | form.add(new CheckBox("skipSummaryMetrics"));
|
| | | mailRecipients = new Model<String>(repositoryModel.mailRecipients == null ? ""
|
| | | : StringUtils.flattenStrings(repositoryModel.mailRecipients, " "));
|
| | | form.add(new TextField<String>("mailRecipients", mailRecipients));
|
| | | form.add(usersPalette);
|
| | | form.add(teamsPalette);
|
| | | form.add(federationSetsPalette);
|