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_description' %>
-