summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-08-16 22:56:57 +0100
committerGitHub <noreply@github.com>2019-08-16 22:56:57 +0100
commitbee1227b2f64d33ecbb0c5972ffc1b7d9689f95f (patch)
tree557dd7a1e9bcac37b9c6e2e36ccc2a298076df1d /templates
parent867f46f78e5777d7bafe83cda3244c1001ce3e60 (diff)
downloadgitea-bee1227b2f64d33ecbb0c5972ffc1b7d9689f95f.tar.gz
gitea-bee1227b2f64d33ecbb0c5972ffc1b7d9689f95f.zip
Extract the username and password from the mirror url (#7651)
* Explode out mirror username and password * Update models/repo_mirror.go * Just roundtrip the password * remove unused declaration * Update templates/repo/settings/options.tmpl
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/settings/options.tmpl19
1 files changed, 18 insertions, 1 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index c6d715acbe..87e23b6937 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -80,9 +80,26 @@
</div>
<div class="field {{if .Err_MirrorAddress}}error{{end}}">
<label for="mirror_address">{{.i18n.Tr "repo.mirror_address"}}</label>
- <input id="mirror_address" name="mirror_address" value="{{.Mirror.FullAddress}}" required>
+ <input id="mirror_address" name="mirror_address" value="{{.Mirror.AddressNoCredentials}}" required>
<p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p>
</div>
+ <div class="ui accordion optional field">
+ <label class="ui title {{if .Err_Auth}}text red active{{end}}">
+ <i class="icon dropdown"></i>
+ <label for="">{{.i18n.Tr "repo.need_auth"}}</label>
+ </label>
+ <div class="content {{if .Err_Auth}}active{{else if .Mirror.Username}}active{{end}}">
+ <div class="inline field {{if .Err_Auth}}error{{end}}">
+ <label for="mirror_username">{{.i18n.Tr "username"}}</label>
+ <input id="mirror_username" name="mirror_username" value="{{.Mirror.Username}}" {{if not .mirror_username}}data-need-clear="true"{{end}}>
+ </div>
+ <input class="fake" type="password">
+ <div class="inline field {{if .Err_Auth}}error{{end}}">
+ <label for="mirror_password">{{.i18n.Tr "password"}}</label>
+ <input id="mirror_password" name="mirror_password" type="password" value="{{.Mirror.Password}}" {{if not .mirror_password}}data-need-clear="true"{{end}}>
+ </div>
+ </div>
+ </div>
<div class="field">
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>