mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-01 07:09:21 +01:00
Fix and improve repo visibility checkbox when FORCE_PRIVATE is on
This commit is contained in:
parent
1b3e6a4831
commit
acee2b2470
9 changed files with 98 additions and 63 deletions
|
@ -49,14 +49,17 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
|
|
|
@ -88,14 +88,18 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||||
|
|
|
@ -62,14 +62,18 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||||
|
|
|
@ -104,14 +104,18 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||||
|
|
|
@ -100,14 +100,18 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}} checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||||
|
|
|
@ -102,14 +102,18 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||||
|
|
|
@ -99,14 +99,18 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||||
|
|
|
@ -102,14 +102,18 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}} checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||||
|
|
|
@ -88,14 +88,18 @@
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox"
|
||||||
{{if .IsForcedPrivate}}
|
{{if .IsForcedPrivate}}
|
||||||
<input name="private" type="checkbox" checked readonly>
|
checked disabled
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</label>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
{{if .private}}checked{{end}}
|
||||||
|
{{end}}>
|
||||||
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
<label>{{ctx.Locale.Tr "repo.visibility_helper"}}</label>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .IsForcedPrivate}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_helper_forced"}}</span>
|
||||||
|
{{end}}
|
||||||
|
<span class="help">{{ctx.Locale.Tr "repo.visibility_description"}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||||
|
|
Loading…
Reference in a new issue