diff --git a/app/assets/javascripts/users/settings/account/preferences/index.js b/app/assets/javascripts/users/settings/account/preferences/index.js index 7c169ae75..c2b150b08 100644 --- a/app/assets/javascripts/users/settings/account/preferences/index.js +++ b/app/assets/javascripts/users/settings/account/preferences/index.js @@ -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 diff --git a/app/controllers/users/settings/account/preferences_controller.rb b/app/controllers/users/settings/account/preferences_controller.rb index bba93cac4..83b4927f9 100644 --- a/app/controllers/users/settings/account/preferences_controller.rb +++ b/app/controllers/users/settings/account/preferences_controller.rb @@ -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 diff --git a/app/models/user.rb b/app/models/user.rb index 0ee6b810a..ccef0f6e2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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| diff --git a/app/views/users/settings/account/preferences/index.html.erb b/app/views/users/settings/account/preferences/index.html.erb index 3e179677c..d519e4175 100644 --- a/app/views/users/settings/account/preferences/index.html.erb +++ b/app/views/users/settings/account/preferences/index.html.erb @@ -94,28 +94,6 @@ -
-
- <%=t 'notifications.form.system_message' %> -

<%=t 'notifications.form.system_message_description' %>

-
-
- <%=t 'notifications.form.notification_scinote' %> -
-
- <%= check_box_tag :system_message_notification %> -
-
-
-
- <%=t 'notifications.form.notification_email' %> -
-
- <%= check_box_tag :system_message_notification_email, @user.system_message_email_notification %> -
-
-
-
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 63ec9ca4b..538b822a2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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." diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 4795b5a74..d63effe31 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -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