mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Add openid connect and saml connected accounts [SCI-10584]
This commit is contained in:
parent
6e95ba13f9
commit
874c333496
5 changed files with 116 additions and 4 deletions
|
@ -0,0 +1,24 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="col-xs-8 col-sm-9 col-md-9 col-lg-9">
|
||||
<strong><%= t('users.settings.account.connected_accounts.openid_connect.title') %></strong> <br>
|
||||
<p><%= t('users.settings.account.connected_accounts.openid_connect.connect_hint') %></p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<div>
|
||||
<strong>
|
||||
<%= t('users.settings.account.connected_accounts.openid_connect.connected') %>
|
||||
<span class="sn-icon sn-icon-check" aria-hidden="true"></span>
|
||||
</strong>
|
||||
</div>
|
||||
<div>
|
||||
<%= link_to t('users.settings.account.connected_accounts.openid_connect.unlink_button'),
|
||||
'#unlinkOpenIdConnectModal',
|
||||
class: 'btn btn-danger',
|
||||
data: { toggle: 'modal'} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render partial: 'users/settings/account/connected_accounts/unlink_modals/openid_connect_modal', locals: { provider: provider } %>
|
|
@ -0,0 +1,24 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="col-xs-8 col-sm-9 col-md-9 col-lg-9">
|
||||
<strong><%= t('users.settings.account.connected_accounts.saml.title') %></strong> <br>
|
||||
<p><%= t('users.settings.account.connected_accounts.saml.connect_hint') %></p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<div>
|
||||
<strong>
|
||||
<%= t('users.settings.account.connected_accounts.saml.connected') %>
|
||||
<span class="sn-icon sn-icon-check" aria-hidden="true"></span>
|
||||
</strong>
|
||||
</div>
|
||||
<div>
|
||||
<%= link_to t('users.settings.account.connected_accounts.saml.unlink_button'),
|
||||
'#unlinksamlModal',
|
||||
class: 'btn btn-danger',
|
||||
data: { toggle: 'modal'} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render partial: 'users/settings/account/connected_accounts/unlink_modals/saml_modal', locals: { provider: provider } %>
|
|
@ -0,0 +1,23 @@
|
|||
<div class="modal fade" id="unlinkOpenIdConnectModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('general.close') %>">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" >
|
||||
<%= t('users.settings.account.connected_accounts.openid_connect.unlink_modal.title') %>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><%= t('users.settings.account.connected_accounts.openid_connect.unlink_modal.description_1') %></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= form_tag(unlink_connected_account_path, method: :delete) do %>
|
||||
<%= hidden_field_tag :provider, provider %>
|
||||
<%= submit_tag t('users.settings.account.connected_accounts.openid_connect.unlink_modal.submit_button'), class: 'btn btn-danger' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,23 @@
|
|||
<div class="modal fade" id="unlinksamlModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('general.close') %>">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" >
|
||||
<%= t('users.settings.account.connected_accounts.saml.unlink_modal.title') %>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><%= t('users.settings.account.connected_accounts.saml.unlink_modal.description_1') %></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= form_tag(unlink_connected_account_path, method: :delete) do %>
|
||||
<%= hidden_field_tag :provider, provider %>
|
||||
<%= submit_tag t('users.settings.account.connected_accounts.saml.unlink_modal.submit_button'), class: 'btn btn-danger' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -2898,13 +2898,13 @@ en:
|
|||
not_connected: "You have no Connected accounts"
|
||||
unlink_success: "Successfully unlinked"
|
||||
azure_ad:
|
||||
title: "Your Azure AD Account"
|
||||
connect_hint: "Allows you to sign in with your Azure AD account."
|
||||
title: "Your Microsoft Azure (Active Directory) Account"
|
||||
connect_hint: "Allows you to sign in with your Microsoft Azure (Active Directory) account."
|
||||
connected: "Connected"
|
||||
unlink_button: "Unlink"
|
||||
unlink_modal:
|
||||
title: "Unlink Azure AD account?"
|
||||
description_1: "Are you sure you would like unlink Azure AD and SciNote accounts?"
|
||||
title: "Unlink Microsoft Azure (Active Directory) account?"
|
||||
description_1: "Are you sure you would like unlink Microsoft Azure (Active Directory) and SciNote accounts?"
|
||||
submit_button: "Submit"
|
||||
okta:
|
||||
title: "Your Okta Account"
|
||||
|
@ -2915,6 +2915,24 @@ en:
|
|||
title: "Unlink Okta account?"
|
||||
description_1: "Are you sure you would like unlink Okta and SciNote accounts?"
|
||||
submit_button: "Submit"
|
||||
openid_connect:
|
||||
title: "Your OpenID Connect Account"
|
||||
connect_hint: "Allows you to sign in with your OpenID Connect account."
|
||||
connected: "Connected"
|
||||
unlink_button: "Unlink"
|
||||
unlink_modal:
|
||||
title: "Unlink OpenID Connect account?"
|
||||
description_1: "Are you sure you would like unlink OpenID Connect and SciNote accounts?"
|
||||
submit_button: "Submit"
|
||||
saml:
|
||||
title: "Your SAML Account"
|
||||
connect_hint: "Allows you to sign in with your SAML account."
|
||||
connected: "Connected"
|
||||
unlink_button: "Unlink"
|
||||
unlink_modal:
|
||||
title: "Unlink SAML account?"
|
||||
description_1: "Are you sure you would like unlink SAML and SciNote accounts?"
|
||||
submit_button: "Submit"
|
||||
errors:
|
||||
not_found: "You have no Connected accounts for this provider"
|
||||
generic: "Unable to unlink linked account"
|
||||
|
|
Loading…
Reference in a new issue