code.gitea.io/gitea@v1.22.3/templates/admin/auth/new.tmpl (about) 1 {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new authentication")}} 2 <div class="admin-setting-content"> 3 <h4 class="ui top attached header"> 4 {{ctx.Locale.Tr "admin.auths.new"}} 5 </h4> 6 <div class="ui attached segment"> 7 <form class="ui form" action="{{.Link}}" method="post"> 8 {{template "base/disable_form_autofill"}} 9 {{.CsrfTokenHtml}} 10 <!-- Types and name --> 11 <div class="inline required field {{if .Err_Type}}error{{end}}"> 12 <label>{{ctx.Locale.Tr "admin.auths.auth_type"}}</label> 13 <div class="ui selection type dropdown"> 14 <input type="hidden" id="auth_type" name="type" value="{{.type}}"> 15 <div class="text">{{.CurrentTypeName}}</div> 16 {{svg "octicon-triangle-down" 14 "dropdown icon"}} 17 <div class="menu"> 18 {{range .AuthSources}} 19 <div class="item" data-value="{{.Type.Int}}">{{.Name}}</div> 20 {{end}} 21 </div> 22 </div> 23 </div> 24 <div class="required inline field {{if .Err_Name}}error{{end}}"> 25 <label for="auth_name">{{ctx.Locale.Tr "admin.auths.auth_name"}}</label> 26 <input id="auth_name" name="name" value="{{.name}}" autofocus required> 27 </div> 28 29 <!-- LDAP and DLDAP --> 30 {{template "admin/auth/source/ldap" .}} 31 32 <!-- SMTP --> 33 {{template "admin/auth/source/smtp" .}} 34 35 <!-- PAM --> 36 <div class="pam required field {{if not (eq .type 4)}}tw-hidden{{end}}"> 37 <label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label> 38 <input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}"> 39 <label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label> 40 <input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}"> 41 </div> 42 <div class="pam optional field {{if not (eq .type 4)}}tw-hidden{{end}}"> 43 <div class="ui checkbox"> 44 <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> 45 <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> 46 <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> 47 </div> 48 </div> 49 50 <!-- OAuth2 --> 51 {{template "admin/auth/source/oauth" .}} 52 53 <!-- SSPI --> 54 {{template "admin/auth/source/sspi" .}} 55 56 <div class="ldap field"> 57 <div class="ui checkbox"> 58 <label><strong>{{ctx.Locale.Tr "admin.auths.attributes_in_bind"}}</strong></label> 59 <input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}> 60 </div> 61 </div> 62 <div class="ldap inline field {{if not (eq .type 2)}}tw-hidden{{end}}"> 63 <div class="ui checkbox"> 64 <label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label> 65 <input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}> 66 </div> 67 </div> 68 <div class="inline field"> 69 <div class="ui checkbox"> 70 <label><strong>{{ctx.Locale.Tr "admin.auths.activated"}}</strong></label> 71 <input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}> 72 </div> 73 </div> 74 75 <div class="field"> 76 <button class="ui primary button">{{ctx.Locale.Tr "admin.auths.new"}}</button> 77 </div> 78 </form> 79 </div> 80 81 <h4 class="ui top attached header"> 82 {{ctx.Locale.Tr "admin.auths.tips"}} 83 </h4> 84 <div class="ui attached segment"> 85 <h5>GMail Settings:</h5> 86 <p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p> 87 88 <h5 class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:</h5> 89 <p class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p> 90 91 <h5 class="ui top attached header">{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}</h5> 92 <div class="ui attached segment"> 93 <li>Bitbucket</li> 94 <span>{{ctx.Locale.Tr "admin.auths.tip.bitbucket"}}</span> 95 <li>Dropbox</li> 96 <span>{{ctx.Locale.Tr "admin.auths.tip.dropbox"}}</span> 97 <li>Facebook</li> 98 <span>{{ctx.Locale.Tr "admin.auths.tip.facebook"}}</span> 99 <li>GitHub</li> 100 <span>{{ctx.Locale.Tr "admin.auths.tip.github"}}</span> 101 <li>GitLab</li> 102 <span>{{ctx.Locale.Tr "admin.auths.tip.gitlab_new"}}</span> 103 <li>Google</li> 104 <span>{{ctx.Locale.Tr "admin.auths.tip.google_plus"}}</span> 105 <li>OpenID Connect</li> 106 <span>{{ctx.Locale.Tr "admin.auths.tip.openid_connect"}}</span> 107 <li>Twitter</li> 108 <span>{{ctx.Locale.Tr "admin.auths.tip.twitter"}}</span> 109 <li>Discord</li> 110 <span>{{ctx.Locale.Tr "admin.auths.tip.discord"}}</span> 111 <li>Gitea</li> 112 <span>{{ctx.Locale.Tr "admin.auths.tip.gitea"}}</span> 113 <li>Nextcloud</li> 114 <span>{{ctx.Locale.Tr "admin.auths.tip.nextcloud"}}</span> 115 <li>Yandex</li> 116 <span>{{ctx.Locale.Tr "admin.auths.tip.yandex"}}</span> 117 <li>Mastodon</li> 118 <span>{{ctx.Locale.Tr "admin.auths.tip.mastodon"}}</span> 119 </div> 120 </div> 121 </div> 122 {{template "admin/layout_footer" .}}