1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Make sure fmt catches all templates (#20979)

* Make sure fmt catches all templates

Make's `wildcard` is not recursive so it missed many template files, fix
that by using `find`.

* Update Makefile
This commit is contained in:
silverwind
2022-08-31 17:58:54 +02:00
committed by GitHub
parent c80ca94ab1
commit 647b2649b1
62 changed files with 251 additions and 251 deletions

View File

@@ -23,7 +23,7 @@
<!-- LDAP and DLDAP -->
{{if or .Source.IsLDAP .Source.IsDLDAP}}
{{ $cfg:=.Source.Cfg }}
{{$cfg:=.Source.Cfg}}
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
<label>{{.locale.Tr "admin.auths.security_protocol"}}</label>
<div class="ui selection security-protocol dropdown">
@@ -180,7 +180,7 @@
<!-- SMTP -->
{{if .Source.IsSMTP}}
{{ $cfg:=.Source.Cfg }}
{{$cfg:=.Source.Cfg}}
<div class="inline required field">
<label>{{.locale.Tr "admin.auths.smtp_auth"}}</label>
<div class="ui selection type dropdown">
@@ -242,7 +242,7 @@
<!-- PAM -->
{{if .Source.IsPAM}}
{{ $cfg:=.Source.Cfg }}
{{$cfg:=.Source.Cfg}}
<div class="required field">
<label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label>
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
@@ -262,7 +262,7 @@
<!-- OAuth2 -->
{{if .Source.IsOAuth2}}
{{ $cfg:=.Source.Cfg }}
{{$cfg:=.Source.Cfg}}
<div class="inline required field">
<label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label>
<div class="ui selection type dropdown">
@@ -337,7 +337,7 @@
<div class="field">
<label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label>
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{Join $cfg.Scopes "," }}{{end}}">
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{Join $cfg.Scopes ","}}{{end}}">
</div>
<div class="field">
<label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
@@ -365,7 +365,7 @@
<!-- SSPI -->
{{if .Source.IsSSPI}}
{{ $cfg:=.Source.Cfg }}
{{$cfg:=.Source.Cfg}}
<div class="field">
<div class="ui checkbox">
<label for="sspi_auto_create_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>

View File

@@ -30,10 +30,10 @@
</div>
<!-- LDAP and DLDAP -->
{{ template "admin/auth/source/ldap" . }}
{{template "admin/auth/source/ldap" .}}
<!-- SMTP -->
{{ template "admin/auth/source/smtp" . }}
{{template "admin/auth/source/smtp" .}}
<!-- PAM -->
<div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
@@ -51,10 +51,10 @@
</div>
<!-- OAuth2 -->
{{ template "admin/auth/source/oauth" . }}
{{template "admin/auth/source/oauth" .}}
<!-- SSPI -->
{{ template "admin/auth/source/sspi" . }}
{{template "admin/auth/source/sspi" .}}
<div class="ldap field">
<div class="ui checkbox">

View File

@@ -12,7 +12,7 @@
{{.CsrfTokenHtml}}
<div class="field {{if .Err_UserName}}error{{end}}">
<label for="user_name">{{.locale.Tr "username"}}</label>
<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal }}disabled{{end}}>
<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}}>
</div>
<!-- Types and name -->
<div class="inline required field {{if .Err_LoginType}}error{{end}}">

View File

@@ -69,7 +69,7 @@
<div class="inline field local{{if ne .login_type "0-0"}} hide{{end}}">
<div class="ui checkbox">
<label><strong>{{.locale.Tr "auth.allow_password_change" }}</strong></label>
<label><strong>{{.locale.Tr "auth.allow_password_change"}}</strong></label>
<input name="must_change_password" type="checkbox" checked>
</div>
</div>