<% provide(:head_title, t("users.settings.account.preferences.head_title")) %> <% provide(:container_class, "no-second-nav-container") %> <%= render partial: "users/settings/sidebar.html.erb" %>
<%= form_for(@user, url: update_preferences_path(format: :json), remote: true, html: { method: :put, 'data-for' => 'settings[time_zone]', 'data-turbolinks' => false }) do |f| %>
<%= f.label t("users.settings.account.preferences.edit.time_zone_label") %> <%= t("users.settings.account.preferences.edit.time_zone_sublabel") %>

<%=t "users.settings.account.preferences.edit.time_zone_title" %>

<%= f.select :time_zone, ActiveSupport::TimeZone.all.collect { |tz| [tz.formatted_offset + " " + tz.name, tz.name] }, {}, {class: 'form-control selectpicker', 'data-role': 'clear'} %> <%= t("users.settings.account.preferences.edit.time_zone_sublabel") %>
<%=t "general.cancel" %> <%= f.submit t("general.save"), class: "btn btn-success" %>
<% end %> <%= form_for(@user, url: update_preferences_path(format: :json), remote: true, html: { method: :put, 'data-for' => 'date_format', 'data-turbolinks' => false }) do |f| %>
<%= f.label t("users.settings.account.preferences.edit.date_format_label") %> <%= t("users.settings.account.preferences.edit.date_format_sublabel") %>

<%=t "users.settings.account.preferences.edit.date_format_title" %>

<%= f.select :date_format, Constants::SUPPORTED_DATE_FORMATS.collect { |df| ["#{l(Time.new(2014, 5, 16), format: :full_date, date_format: df)}", df] }, {}, { class: 'form-control selectpicker', 'data-role': 'clear' } %> <%= t("users.settings.account.preferences.edit.date_format_sublabel") %>
<%=t "general.cancel" %> <%= f.submit t("general.save"), class: "btn btn-success" %>
<% end %>
<%= form_for(@user, url: update_togglable_settings_path(format: :json), html: { method: :post, id: 'togglable-settings-panel' }, remote: true) do |f| %>

<%= t('notifications.title') %>

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

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

<%=t 'notifications.form.notification_scinote' %>
<%= check_box_tag :assignments_notification, @user.assignments_notification %>
<%=t 'notifications.form.notification_email' %>
<%= check_box_tag :assignments_notification_email, @user.assignments_email_notification %>
<%= image_tag 'icon_small/missing.png', class: 'img-circle ' %>
<%=t 'notifications.form.recent_notification' %>

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

<%=t 'notifications.form.notification_scinote' %>
<%= check_box_tag :recent_notification, @user.recent_notification %>
<%=t 'notifications.form.notification_email' %>
<%= check_box_tag :recent_notification_email, @user.recent_email_notification %>
<%=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 %>

<%= t('users.settings.account.preferences.edit.tips.title') %>

<%=t 'users.settings.account.preferences.edit.tips.text1' %>

<%=t 'users.settings.account.preferences.edit.tips.text2' %>

<%=t 'users.settings.account.preferences.edit.tips.toggle' %>
<%= check_box_tag :tooltips_enabled, @user.settings[:tooltips_enabled] %>
<% end %>
<%= javascript_include_tag "users/settings/account/preferences/index" %>