mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-22 21:09:53 +08:00
Merge pull request #4890 from G-Chubinidze/gc_SCI_7627
My profile page updates of user data [SCI-7627]
This commit is contained in:
commit
07b584e111
9 changed files with 23 additions and 10 deletions
app
assets/stylesheets/settings
views/users/registrations
config/locales
|
@ -22,12 +22,10 @@
|
||||||
|
|
||||||
|
|
||||||
.two-factor-container {
|
.two-factor-container {
|
||||||
border: $border-default;
|
|
||||||
column-gap: 1em;
|
column-gap: 1em;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto fit-content;
|
grid-template-columns: auto fit-content;
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
padding: 1em;
|
|
||||||
row-gap: .5em;
|
row-gap: .5em;
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,6 +37,13 @@
|
||||||
.enabled {
|
.enabled {
|
||||||
@include font-button;
|
@include font-button;
|
||||||
color: $brand-success;
|
color: $brand-success;
|
||||||
|
position: relative;
|
||||||
|
left: 10px;
|
||||||
|
|
||||||
|
.fa-check-circle {
|
||||||
|
position: relative;
|
||||||
|
right: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +51,11 @@
|
||||||
align-self: end;
|
align-self: end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.two-factor-auth-button {
|
||||||
|
padding-top: 20px;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="row user-statistics">
|
<div class="row user-statistics">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<h2><%=t "users.statistics.title" %></h2>
|
<h3><%=t "users.statistics.title" %></h3>
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li class="label label-primary">
|
<li class="label label-primary">
|
||||||
<h2><%= @user.statistics[:number_of_teams]%></h2>
|
<h2><%= @user.statistics[:number_of_teams]%></h2>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<b><%= t("users.registrations.edit.2fa_title") %></b>
|
<b><%= t("users.registrations.edit.2fa_title") %></b>
|
||||||
<% if current_user.two_factor_auth_enabled? %>
|
<% if current_user.two_factor_auth_enabled? %>
|
||||||
<span class="enabled">
|
<span class="enabled">
|
||||||
<i class="fas fa-shield-alt"></i>
|
<i class="fas fa-check-circle"></i>
|
||||||
<%= t("users.registrations.edit.2fa_enabled") %>
|
<%= t("users.registrations.edit.2fa_enabled") %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -11,6 +11,9 @@
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<%= t("users.registrations.edit.2fa_description") %>
|
<%= t("users.registrations.edit.2fa_description") %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="two-factor-auth-button">
|
||||||
<% if current_user.two_factor_auth_enabled? %>
|
<% if current_user.two_factor_auth_enabled? %>
|
||||||
<button class="btn btn-secondary" id="twoFactorAuthenticationDisable"><%= t("users.registrations.edit.2fa_button_disable") %></button>
|
<button class="btn btn-secondary" id="twoFactorAuthenticationDisable"><%= t("users.registrations.edit.2fa_button_disable") %></button>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
html: { method: :put, "data-for" => "email", class: 'settings-page-email', id: 'user-email-field' }) do |f| %>
|
html: { method: :put, "data-for" => "email", class: 'settings-page-email', id: 'user-email-field' }) do |f| %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label t("users.registrations.edit.email_label") %>
|
<h3><%= t("users.registrations.edit.email_label") %></h3>
|
||||||
<div class="user-attribute">
|
<div class="user-attribute">
|
||||||
<%= @user.email %>
|
<%= @user.email %>
|
||||||
<a href="#" class="btn btn-default" data-action="edit"><%= t("general.change") %></a>
|
<a href="#" class="btn btn-default" data-action="edit"><%= t("general.change") %></a>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<span class="settings-external-id user-settings-block">
|
<span class="settings-external-id user-settings-block">
|
||||||
<label><%= t("users.registrations.edit.external_id_label") %></label>
|
<h3><%= t("users.registrations.edit.external_id_label") %></h3>
|
||||||
<%= render partial: "shared/inline_editing",
|
<%= render partial: "shared/inline_editing",
|
||||||
locals: {
|
locals: {
|
||||||
initial_value: @user.external_id,
|
initial_value: @user.external_id,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<span class="settings-page-full-name user-settings-block">
|
<span class="settings-page-full-name user-settings-block">
|
||||||
<label><%= t("users.registrations.edit.name_label") %></label>
|
<h3><%= t("users.registrations.edit.name_label") %></h3>
|
||||||
<%= render partial: "shared/inline_editing",
|
<%= render partial: "shared/inline_editing",
|
||||||
locals: {
|
locals: {
|
||||||
initial_value: @user.full_name,
|
initial_value: @user.full_name,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<span class="settings-page-initials user-settings-block">
|
<span class="settings-page-initials user-settings-block">
|
||||||
<label><%= t("users.registrations.edit.initials_label") %></label>
|
<h3><%= t("users.registrations.edit.initials_label") %></h3>
|
||||||
<%= render partial: "shared/inline_editing",
|
<%= render partial: "shared/inline_editing",
|
||||||
locals: {
|
locals: {
|
||||||
initial_value: @user.initials,
|
initial_value: @user.initials,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<%= hidden_field_tag "user[change_password]", "true" %>
|
<%= hidden_field_tag "user[change_password]", "true" %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label t("users.registrations.edit.password_label") %>
|
<h3><%= t("users.registrations.edit.password_label") %></h3>
|
||||||
<div class="user-attribute">
|
<div class="user-attribute">
|
||||||
••••••••••••
|
••••••••••••
|
||||||
<a href="#" class="btn btn-default" data-action="edit"><%=t("general.change") %></a>
|
<a href="#" class="btn btn-default" data-action="edit"><%=t("general.change") %></a>
|
||||||
|
|
|
@ -2279,7 +2279,7 @@ en:
|
||||||
email_label: "Email"
|
email_label: "Email"
|
||||||
email_title: "Change email"
|
email_title: "Change email"
|
||||||
new_email_label: "New email"
|
new_email_label: "New email"
|
||||||
external_id_label: 'External Id'
|
external_id_label: 'External ID'
|
||||||
external_id_title: 'External Id'
|
external_id_title: 'External Id'
|
||||||
current_password_label: "Current password"
|
current_password_label: "Current password"
|
||||||
password_explanation: "(we need your current password to confirm your changes)"
|
password_explanation: "(we need your current password to confirm your changes)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue