Merge pull request #339 from sivel/change-repo-url

Add option to manipulate the repo url
This commit is contained in:
Brad Rydzewski 2014-06-10 19:28:33 -07:00
commit 559730ff80
2 changed files with 5 additions and 0 deletions

View file

@ -326,6 +326,7 @@ func RepoUpdate(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) err
return err
}
default:
repo.URL = r.FormValue("URL")
repo.Disabled = len(r.FormValue("Disabled")) == 0
repo.DisabledPullRequest = len(r.FormValue("DisabledPullRequest")) == 0
repo.Private = len(r.FormValue("Private")) > 0

View file

@ -31,6 +31,10 @@
<div class="col-xs-9" role="main">
<div class="alert">Manage your repository settings.</div>
<form method="POST" action="/{{.Repo.Slug}}" role="form">
<div class="form-group">
<label>Repository URL</label>
<input class="form-control form-control-xlarge" type="text" name="URL" value="{{.Repo.URL}}" />
</div>
<div class="checkbox form-group">
<label>
<input class="" type="checkbox" name="Disabled" {{ if not .Repo.Disabled }}checked="True" {{ end }}/>