mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 09:42:13 +01:00
950f2e2074
* add google+ * sort signin oauth2 providers based on the name so order is always the same * update auth tip for google+ * add gitlab provider * add bitbucket provider (and some go fmt) * add twitter provider * add facebook provider * add dropbox provider * add openid connect provider incl. new format of tips section in "Add New Source" * lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow) * imports according to goimport and code style * make it possible to set custom urls to gitlab and github provider (only these could have a different host) * split up oauth2 into multiple files * small typo in comment * fix indention * fix indentation * fix new line before external import * fix layout of signin part * update "broken" dependency
58 lines
No EOL
2.9 KiB
Cheetah
58 lines
No EOL
2.9 KiB
Cheetah
<div class="oauth2 field {{if not (eq .type 6)}}hide{{end}}">
|
|
<div class="inline required field">
|
|
<label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
|
|
<div class="ui selection type dropdown">
|
|
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
|
|
<div class="text">{{.oauth2_provider}}</div>
|
|
<i class="dropdown icon"></i>
|
|
<div class="menu">
|
|
{{range $key, $value := .OAuth2Providers}}
|
|
<div class="item" data-value="{{$key}}">{{$value.DisplayName}}</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="required field">
|
|
<label for="oauth2_key">{{.i18n.Tr "admin.auths.oauth2_clientID"}}</label>
|
|
<input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}">
|
|
</div>
|
|
<div class="required field">
|
|
<label for="oauth2_secret">{{.i18n.Tr "admin.auths.oauth2_clientSecret"}}</label>
|
|
<input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
|
|
</div>
|
|
<div class="open_id_connect_auto_discovery_url required field">
|
|
<label for="open_id_connect_auto_discovery_url">{{.i18n.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
|
|
<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}">
|
|
</div>
|
|
|
|
<div class="oauth2_use_custom_url inline field">
|
|
<div class="ui checkbox">
|
|
<label><strong>{{.i18n.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label>
|
|
<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox">
|
|
</div>
|
|
</div>
|
|
<div class="oauth2_use_custom_url_field oauth2_auth_url required field">
|
|
<label for="oauth2_auth_url">{{.i18n.Tr "admin.auths.oauth2_authURL"}}</label>
|
|
<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{.oauth2_auth_url}}">
|
|
</div>
|
|
<div class="oauth2_use_custom_url_field oauth2_token_url required field">
|
|
<label for="oauth2_token_url">{{.i18n.Tr "admin.auths.oauth2_tokenURL"}}</label>
|
|
<input id="oauth2_token_url" name="oauth2_token_url" value="{{.oauth2_token_url}}">
|
|
</div>
|
|
<div class="oauth2_use_custom_url_field oauth2_profile_url required field">
|
|
<label for="oauth2_profile_url">{{.i18n.Tr "admin.auths.oauth2_profileURL"}}</label>
|
|
<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{.oauth2_profile_url}}">
|
|
</div>
|
|
<div class="oauth2_use_custom_url_field oauth2_email_url required field">
|
|
<label for="oauth2_email_url">{{.i18n.Tr "admin.auths.oauth2_emailURL"}}</label>
|
|
<input id="oauth2_email_url" name="oauth2_email_url" value="{{.oauth2_email_url}}">
|
|
</div>
|
|
{{if .OAuth2DefaultCustomURLMappings}}
|
|
{{range $key, $value := .OAuth2DefaultCustomURLMappings}}
|
|
<input id="{{$key}}_token_url" value="{{$value.TokenURL}}" type="hidden" />
|
|
<input id="{{$key}}_auth_url" value="{{$value.AuthURL}}" type="hidden" />
|
|
<input id="{{$key}}_profile_url" value="{{$value.ProfileURL}}" type="hidden" />
|
|
<input id="{{$key}}_email_url" value="{{$value.EmailURL}}" type="hidden" />
|
|
{{end}}
|
|
{{end}}
|
|
</div> |