aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-02-13 11:16:59 +0800
committerGitHub <noreply@github.com>2023-02-13 11:16:59 +0800
commiteb5e1bcd2175c05c724e19c1a261c3f3d063abe6 (patch)
tree03952b5c4d180f3fbb18b4c3b3e15fca20b473c9 /templates/org
parentc8093a13ff89834d587556a292c4c8cbfdb700a5 (diff)
downloadgitea-eb5e1bcd2175c05c724e19c1a261c3f3d063abe6.tar.gz
gitea-eb5e1bcd2175c05c724e19c1a261c3f3d063abe6.zip
Remove Fomantic-UI's `.hidden` CSS class for checkbox elements (#22851)
Fomantic-UI's `.hidden` CSS class is badly designed. * Checkbox elements do not need it in HTML, so this PR removes it (JS adds the `.hidden` class back by `$('.ui.checkbox').checkbox()`) * `menu transaction hidden` is still needed, and it should be the only usage for the `.hidden` from now on (until they get refactored properly) Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/create.tmpl8
-rw-r--r--templates/org/settings/options.tmpl8
-rw-r--r--templates/org/team/new.tmpl8
3 files changed, 12 insertions, 12 deletions
diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl
index 8da46fb325..26321f6208 100644
--- a/templates/org/create.tmpl
+++ b/templates/org/create.tmpl
@@ -19,15 +19,15 @@
<span class="inline required field"><label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label></span>
<div class="inline-grouped-list">
<div class="ui radio checkbox">
- <input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}/>
+ <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}/>
<label>{{.locale.Tr "org.settings.visibility.public"}}</label>
</div>
<div class="ui radio checkbox">
- <input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}/>
+ <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}/>
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
</div>
<div class="ui radio checkbox">
- <input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}/>
+ <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}/>
<label>{{.locale.Tr "org.settings.visibility.private"}}</label>
</div>
</div>
@@ -37,7 +37,7 @@
<label>{{.locale.Tr "org.settings.permission"}}</label>
<div class="inline-grouped-list">
<div class="ui checkbox">
- <input class="hidden" type="checkbox" name="repo_admin_change_team_access" checked/>
+ <input type="checkbox" name="repo_admin_change_team_access" checked/>
<label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
</div>
</div>
diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl
index b52639fb19..1f4a75ab1b 100644
--- a/templates/org/settings/options.tmpl
+++ b/templates/org/settings/options.tmpl
@@ -41,19 +41,19 @@
<label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label>
<div class="field">
<div class="ui radio checkbox">
- <input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}/>
+ <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}/>
<label>{{.locale.Tr "org.settings.visibility.public"}}</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
- <input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}/>
+ <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}/>
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
- <input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}/>
+ <input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}/>
<label>{{.locale.Tr "org.settings.visibility.private"}}</label>
</div>
</div>
@@ -63,7 +63,7 @@
<label>{{.locale.Tr "org.settings.permission"}}</label>
<div class="field">
<div class="ui checkbox">
- <input class="hidden" type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}/>
+ <input type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}/>
<label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
</div>
</div>
diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl
index d9d3902fe1..04b5715fc0 100644
--- a/templates/org/team/new.tmpl
+++ b/templates/org/team/new.tmpl
@@ -99,17 +99,17 @@
</td>
<td class="center aligned">
<div class="ui radio checkbox">
- <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{$.locale.Tr "org.teams.none_access"}}">
+ <input type="radio" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{$.locale.Tr "org.teams.none_access"}}">
</div>
</td>
<td class="center aligned">
<div class="ui radio checkbox">
- <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.read_access"}}">
+ <input type="radio" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.read_access"}}">
</div>
</td>
<td class="center aligned">
<div class="ui radio checkbox">
- <input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.write_access"}}">
+ <input type="radio" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.write_access"}}">
</div>
</td>
</tr>
@@ -121,7 +121,7 @@
{{if lt $unit.MaxPerm 2}}
<div {{if $unit.Type.UnitGlobalDisabled}}class="field tooltip" data-content="{{$.locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
<div class="ui checkbox">
- <input type="checkbox" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
+ <input type="checkbox" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
<label>{{$.locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.locale.Tr "org.team_unit_disabled"}}{{end}}</label>
<span class="help">{{$.locale.Tr $unit.DescKey}}</span>
</div>