diff options
author | silverwind <me@silverwind.io> | 2022-08-31 17:58:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 23:58:54 +0800 |
commit | 647b2649b1600107c5fec3505db691f78b2c1e2a (patch) | |
tree | b3bcaf968426f6ad1ba4fde3e41f3ca3224ec47e /templates/admin | |
parent | c80ca94ab1de8ea3b13c1087cd7140165a11ceb7 (diff) | |
download | gitea-647b2649b1600107c5fec3505db691f78b2c1e2a.tar.gz gitea-647b2649b1600107c5fec3505db691f78b2c1e2a.zip |
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
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 12 | ||||
-rw-r--r-- | templates/admin/auth/new.tmpl | 8 | ||||
-rw-r--r-- | templates/admin/user/edit.tmpl | 2 | ||||
-rw-r--r-- | templates/admin/user/new.tmpl | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 18722f4837..bf9d53152c 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -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> diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 6bfda9fcd3..213c621b42 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -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"> diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index dd2646b50a..7aeaa2537c 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -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}}"> diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl index b8fd8c0ad1..9fdf0dce93 100644 --- a/templates/admin/user/new.tmpl +++ b/templates/admin/user/new.tmpl @@ -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> |