]> source.dussan.org Git - gitea.git/commitdiff
Fix some more hidden problems (#23074)
authorwxiaoguang <wxiaoguang@gmail.com>
Wed, 22 Feb 2023 15:26:02 +0000 (23:26 +0800)
committerGitHub <noreply@github.com>
Wed, 22 Feb 2023 15:26:02 +0000 (15:26 +0000)
Follows #22950

templates/admin/auth/edit.tmpl
templates/admin/user/edit.tmpl
web_src/js/features/admin/common.js

index 36d335f32364e68f36dad9870bda1d541a904359..d64ee188af15550678f4bc8ac4b710325237f2b6 100644 (file)
                                                        <input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}>
                                                </div>
                                        </div>
-                                       <div id="ldap-group-options" class="ui segment secondary" {{if not $cfg.GroupsEnabled}}hidden{{end}}>
+                                       <div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}">
                                                <div class="field">
                                                        <label>{{.locale.Tr "admin.auths.group_search_base"}}</label>
                                                        <input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="e.g. ou=group,dc=mydomain,dc=com">
index 7d31eb4d2b9bb1f630d6f51681fe513c9215428d..5dd1f531fda920fe4f97e7e82e20d783297b0a3f 100644 (file)
                                                <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
                                        </div>
                                </div>
-                               <div class="inline field" {{if or (DisableImportLocal) (.DisableMigrations)}}hidden{{end}}>
+                               <div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}gt-hidden{{end}}">
                                        <div class="ui checkbox">
                                                <label><strong>{{.locale.Tr "admin.users.allow_import_local"}}</strong></label>
                                                <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
index 092cf770be41d3b38a0536b824f14a854b4ce8f8..d023e0bc3695f8bf27a3c8587f1e8c81e3ed57c8 100644 (file)
@@ -50,11 +50,11 @@ export function initAdminCommon() {
 
   function onUsePagedSearchChange() {
     if ($('#use_paged_search').prop('checked')) {
-      showElem($('.search-page-size'))
-        .find('input').attr('required', 'required');
+      showElem('.search-page-size');
+      $('.search-page-size').find('input').attr('required', 'required');
     } else {
-      hideElem($('.search-page-size'))
-        .find('input').removeAttr('required');
+      hideElem('.search-page-size');
+      $('.search-page-size').find('input').removeAttr('required');
     }
   }