Add option to manipulate the repo url

This commit is contained in:
Matt Martz 2014-06-03 11:44:44 -05:00
parent 40fe430581
commit 8d9c7cee56
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 return err
} }
default: default:
repo.URL = r.FormValue("URL")
repo.Disabled = len(r.FormValue("Disabled")) == 0 repo.Disabled = len(r.FormValue("Disabled")) == 0
repo.DisabledPullRequest = len(r.FormValue("DisabledPullRequest")) == 0 repo.DisabledPullRequest = len(r.FormValue("DisabledPullRequest")) == 0
repo.Private = len(r.FormValue("Private")) > 0 repo.Private = len(r.FormValue("Private")) > 0

View file

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