<commit_before>@(repository: service.RepositoryService.RepositoryInfo, info: Option[Any])(implicit context: app.Context)
@import context._
@import view.helpers._
@html.main("Settings", Some(repository)){
  @html.header("settings", repository)
  @menu("options", repository){
    @helper.html.information(info)
    <form id="form" method="post" action="@url(repository)/settings/options" validate="true">
      <div class="box">
        <div class="box-header">Settings</div>
        <div class="box-content">
          <fieldset>
            <label for="description"><strong>Description</strong></label>
            <input type="text" name="description" id="description" style="width: 600px;" value="@repository.repository.description"/>
          </fieldset>
          <fieldset class="margin">
            <label for="defaultBranch"><strong>Default Branch</strong></label>
            <select name="defaultBranch" id="defaultBranch">
              @repository.branchList.map { branch =>
                <option value="@branch"@if(branch==repository.repository.defaultBranch){ selected}>@branch</option>
              }
            </select>
          </fieldset>
          <fieldset class="margin">
            <label>
              <input type="radio" name="isPrivate" value="false"
                @if(!repository.repository.isPrivate              ){ checked  }
                @if(repository.repository.parentUserName.isDefined){ disabled }
              >
              <strong>Public</strong><br>
              <div>
                <span class="note">All users and guests can read this repository.</span>
              </div>
            </label>
          </fieldset>
          <fieldset>
            <label>
              <input type="radio" name="isPrivate" value="true"
                @if(repository.repository.isPrivate               ){ checked  }
                @if(repository.repository.parentUserName.isDefined){ disabled }
              >
              <strong>Private</strong><br>
              <div>
                <span class="note">Only collaborators can read this repository.</span>
              </div>
            </label>
          </fieldset>
        </div>
      </div>
      @*
      <div class="box">
        <div class="box-header">Features</div>
        <div class="box-content">
          <dl>
            <dt>
              <label class="checkbox">
                <input type="checkbox" name="wiki" id="wiki"/> <strong>Wiki</strong>
              </label>
            </dt>
            <dd>
              Adds lightweight Wiki system to this repository.
              This is the simplest way to provide documentation or examples.
              Only collaborators can edit Wiki pages.
            </dd>
          </dl>
          <hr>
          <dl>
            <dt>
              <label class="checkbox">
                <input type="checkbox" name="issue" id="issue"/> <strong>Issue</strong>
              </label>
            </dt>
            <dd>
              Adds lightweight issue tracking integrated with this repository.
              All users who have signed in and can access this repository can register an issue.
            </dd>
          </dl>
        </div>
      </div>
      *@
      <fieldset>
        <input type="submit" class="btn btn-success" value="Apply changes"/>
      </fieldset>
    </form>
  }
}
<commit_msg>(refs #90)Display validation error message for Default Branch.<commit_after>@(repository: service.RepositoryService.RepositoryInfo, info: Option[Any])(implicit context: app.Context)
@import context._
@import view.helpers._
@html.main("Settings", Some(repository)){
  @html.header("settings", repository)
  @menu("options", repository){
    @helper.html.information(info)
    <form id="form" method="post" action="@url(repository)/settings/options" validate="true">
      <div class="box">
        <div class="box-header">Settings</div>
        <div class="box-content">
          <fieldset>
            <label for="description"><strong>Description</strong></label>
            <input type="text" name="description" id="description" style="width: 600px;" value="@repository.repository.description"/>
          </fieldset>
          <fieldset class="margin">
            <label for="defaultBranch"><strong>Default Branch</strong></label>
            <select name="defaultBranch" id="defaultBranch">
              @repository.branchList.map { branch =>
                <option value="@branch"@if(branch==repository.repository.defaultBranch){ selected}>@branch</option>
              }
            </select>
            <span class="error" id="error-defaultBranch"></span>
          </fieldset>
          <fieldset class="margin">
            <label>
              <input type="radio" name="isPrivate" value="false"
                @if(!repository.repository.isPrivate              ){ checked  }
                @if(repository.repository.parentUserName.isDefined){ disabled }
              >
              <strong>Public</strong><br>
              <div>
                <span class="note">All users and guests can read this repository.</span>
              </div>
            </label>
          </fieldset>
          <fieldset>
            <label>
              <input type="radio" name="isPrivate" value="true"
                @if(repository.repository.isPrivate               ){ checked  }
                @if(repository.repository.parentUserName.isDefined){ disabled }
              >
              <strong>Private</strong><br>
              <div>
                <span class="note">Only collaborators can read this repository.</span>
              </div>
            </label>
          </fieldset>
        </div>
      </div>
      @*
      <div class="box">
        <div class="box-header">Features</div>
        <div class="box-content">
          <dl>
            <dt>
              <label class="checkbox">
                <input type="checkbox" name="wiki" id="wiki"/> <strong>Wiki</strong>
              </label>
            </dt>
            <dd>
              Adds lightweight Wiki system to this repository.
              This is the simplest way to provide documentation or examples.
              Only collaborators can edit Wiki pages.
            </dd>
          </dl>
          <hr>
          <dl>
            <dt>
              <label class="checkbox">
                <input type="checkbox" name="issue" id="issue"/> <strong>Issue</strong>
              </label>
            </dt>
            <dd>
              Adds lightweight issue tracking integrated with this repository.
              All users who have signed in and can access this repository can register an issue.
            </dd>
          </dl>
        </div>
      </div>
      *@
      <fieldset>
        <input type="submit" class="btn btn-success" value="Apply changes"/>
      </fieldset>
    </form>
  }
}

{'fraction_non_alphanumeric': 0.13094730862093454, 'fraction_numerical': 0.001136202243999432, 'mean_word_length': 1.6826666666666668, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 169, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6190848', 'n_tokens_mistral': 1772, 'n_tokens_neox': 1727, 'n_words': 400}