Files
Atay-Makhzan/templates/admin/auth/new.tmpl
T

127 lines
4.8 KiB
Handlebars
Raw Normal View History

2015-09-10 17:11:41 -04:00
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content admin new authentication">
{{template "admin/navbar" .}}
2015-12-07 23:30:52 +01:00
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
2022-06-27 22:58:46 +02:00
{{.locale.Tr "admin.auths.new"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post">
2021-10-19 06:08:41 +08:00
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<!-- Types and name -->
<div class="inline required field {{if .Err_Type}}error{{end}}">
2022-06-27 22:58:46 +02:00
<label>{{.locale.Tr "admin.auths.auth_type"}}</label>
<div class="ui selection type dropdown">
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
<div class="text">{{.CurrentTypeName}}</div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu">
{{range .AuthSources}}
2021-07-25 08:09:52 +01:00
<div class="item" data-value="{{.Type.Int}}">{{.Name}}</div>
{{end}}
2015-12-07 23:30:52 +01:00
</div>
</div>
</div>
<div class="required inline field {{if .Err_Name}}error{{end}}">
2022-06-27 22:58:46 +02:00
<label for="name">{{.locale.Tr "admin.auths.auth_name"}}</label>
<input id="name" name="name" value="{{.name}}" autofocus required>
</div>
2015-09-10 17:11:41 -04:00
<!-- LDAP and DLDAP -->
{{template "admin/auth/source/ldap" .}}
2015-09-10 17:11:41 -04:00
<!-- SMTP -->
{{template "admin/auth/source/smtp" .}}
2015-09-10 17:11:41 -04:00
<!-- PAM -->
<div class="pam required field {{if not (eq .type 4)}}gt-hidden{{end}}">
2022-06-27 22:58:46 +02:00
<label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label>
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
2022-06-27 22:58:46 +02:00
<label for="pam_email_domain">{{.locale.Tr "admin.auths.pam_email_domain"}}</label>
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
</div>
<div class="pam optional field {{if not (eq .type 4)}}gt-hidden{{end}}">
<div class="ui checkbox">
2022-06-27 22:58:46 +02:00
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
2022-06-27 22:58:46 +02:00
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div>
</div>
2017-02-22 08:14:37 +01:00
<!-- OAuth2 -->
{{template "admin/auth/source/oauth" .}}
2015-09-10 17:11:41 -04:00
<!-- SSPI -->
{{template "admin/auth/source/sspi" .}}
<div class="ldap field">
<div class="ui checkbox">
2022-06-27 22:58:46 +02:00
<label><strong>{{.locale.Tr "admin.auths.attributes_in_bind"}}</strong></label>
<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
</div>
</div>
<div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
2017-05-10 16:10:18 +03:00
<div class="ui checkbox">
2022-06-27 22:58:46 +02:00
<label><strong>{{.locale.Tr "admin.auths.syncenabled"}}</strong></label>
2017-05-10 16:10:18 +03:00
<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
2022-06-27 22:58:46 +02:00
<label><strong>{{.locale.Tr "admin.auths.activated"}}</strong></label>
<input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
</div>
2015-12-07 23:30:52 +01:00
</div>
2015-09-10 17:11:41 -04:00
<div class="field">
2022-06-27 22:58:46 +02:00
<button class="ui green button">{{.locale.Tr "admin.auths.new"}}</button>
2015-12-07 23:30:52 +01:00
</div>
</form>
</div>
<h4 class="ui top attached header">
2022-06-27 22:58:46 +02:00
{{.locale.Tr "admin.auths.tips"}}
</h4>
<div class="ui attached segment">
<h5>GMail Settings:</h5>
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
2017-05-01 15:26:53 +02:00
2022-06-27 22:58:46 +02:00
<h5>{{.locale.Tr "admin.auths.tips.oauth2.general"}}:</h5>
<p>{{.locale.Tr "admin.auths.tips.oauth2.general.tip"}}</p>
2017-05-01 15:26:53 +02:00
2022-06-27 22:58:46 +02:00
<h5 class="ui top attached header">{{.locale.Tr "admin.auths.tip.oauth2_provider"}}</h5>
2017-05-01 15:26:53 +02:00
<div class="ui attached segment">
<li>Bitbucket</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.bitbucket"}}</span>
2017-05-01 15:26:53 +02:00
<li>Dropbox</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.dropbox"}}</span>
2017-05-01 15:26:53 +02:00
<li>Facebook</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.facebook"}}</span>
2017-05-01 15:26:53 +02:00
<li>GitHub</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.github"}}</span>
2017-05-01 15:26:53 +02:00
<li>GitLab</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.gitlab"}}</span>
<li>Google</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.google_plus"}}</span>
2017-05-01 15:26:53 +02:00
<li>OpenID Connect</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.openid_connect"}}</span>
2017-05-01 15:26:53 +02:00
<li>Twitter</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.twitter"}}</span>
2019-01-13 14:06:22 -05:00
<li>Discord</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.discord"}}</span>
<li>Gitea</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.gitea"}}</span>
2020-03-02 22:11:45 -05:00
<li>Nextcloud</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.nextcloud"}}</span>
<li>Yandex</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.yandex"}}</span>
<li>Mastodon</li>
2022-06-27 22:58:46 +02:00
<span>{{.locale.Tr "admin.auths.tip.mastodon"}}</span>
2017-05-01 15:26:53 +02:00
</div>
2015-12-07 23:30:52 +01:00
</div>
2014-05-03 10:48:14 +08:00
</div>
</div>
2015-09-10 17:11:41 -04:00
{{template "base/footer" .}}