Remove What's new section from user preferences section [SCI-9098] (#6046)

This commit is contained in:
Alex Kriuchykhin 2023-08-23 13:12:06 +02:00 committed by GitHub
parent 7f6e26b311
commit b08a94ced6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 50 deletions

View file

@ -54,26 +54,6 @@
function enableDependant(dependant) {
dependant.checkboxpicker().prop('disabled', false);
}
// Initialize system messages
var system_message_notification = $('[name="system_message_notification"]');
system_message_notification
.checkboxpicker({
onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle'
});
system_message_notification.prop('checked', true);
system_message_notification.prop('disabled', true);
// Initialize system messages email
var system_message_notification_mail = $('[name="system_message_notification_email"]');
system_message_notification_mail
.checkboxpicker({
onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle'
});
system_message_notification_mail.prop(
'checked',
system_message_notification_mail.attr('value') === 'true'
);
}
// triggers submit action when the user clicks

View file

@ -33,9 +33,6 @@ module Users
read_from_params(:assignments_notification_email) do |val|
@user.assignments_email_notification = val
end
read_from_params(:system_message_notification_email) do |val|
@user.system_message_email_notification = val
end
if @user.save
render json: {
status: :ok

View file

@ -515,8 +515,7 @@ class User < ApplicationRecord
# json friendly attributes
NOTIFICATIONS_TYPES = %w(assignments_notification recent_notification
assignments_email_notification
recent_email_notification
system_message_email_notification)
recent_email_notification)
# declare notifications getters
NOTIFICATIONS_TYPES.each do |name|

View file

@ -94,28 +94,6 @@
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<strong><%=t 'notifications.form.system_message' %></strong>
<p><%=t 'notifications.form.system_message_description' %></p>
<div class="row">
<div class="col-sm-4">
<%=t 'notifications.form.notification_scinote' %>
</div>
<div class="col-sm-8">
<%= check_box_tag :system_message_notification %>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<%=t 'notifications.form.notification_email' %>
</div>
<div class="col-sm-8">
<%= check_box_tag :system_message_notification_email, @user.system_message_email_notification %>
</div>
</div>
</div>
</div>
</div>
<% end %>
<br>

View file

@ -3199,8 +3199,6 @@ en:
assignments_description: 'Assignment notifications appear whenever you get assigned to a team, project, task.'
recent_notification: 'Recent changes'
recent_notification_description: 'Recent changes notifications appear whenever there is a change on a task you are assigned to.'
system_message: "What's New in SciNote"
system_message_description: 'You will be notified about new SciNote features, releases and improvements you can benefit from.'
deliver:
download_link: "Download link:"
download_text: "Click the link to download the file."

View file

@ -154,7 +154,6 @@ describe User, type: :model do
it { is_expected.to respond_to(:assignments_email_notification) }
it { is_expected.to respond_to(:recent_notification) }
it { is_expected.to respond_to(:recent_email_notification) }
it { is_expected.to respond_to(:system_message_email_notification) }
end
describe 'user variables' do