<% provide(:head_title, t("users.settings.preferences.head_title")) %> <%= render partial: "users/settings/navigation.html.erb" %>
<%= form_for(@user, url: update_preferences_path(format: :json), remote: true, html: { method: :put, "data-for" => "time_zone" }) do |f| %>
<%= f.label t("users.settings.preferences.edit.time_zone_label") %> <%= t("users.settings.preferences.edit.time_zone_sublabel") %>

<%=t "users.settings.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.preferences.edit.time_zone_sublabel") %>
<%=t "general.cancel" %> <%= f.submit t("general.update"), class: "btn btn-primary" %>
<% end %> <% if Rails.configuration.x.enable_tutorial %>
<%= t('tutorial.title') %>
<%= link_to t('users.settings.preferences.tutorial.repeat_tutorial'), tutorial_path(format: :json), remote: true, class: "btn btn-primary", id: "reset-tutorial-btn" %> <% end %>
<%= t('notifications.title') %> <%= form_for(@user, url: notifications_settings_path(format: :json), html: { method: :post, id: 'notifications-settings-panel' }, remote: true) do |f| %>
<%= f.label t('notifications.form.recent_notification'), class: 'visible-sm visible-xs'%>
<%= check_box_tag :recent_notification, @user.recent_notification %>
<%= f.label t('notifications.form.assignments'), class: 'visible-sm visible-xs' %> <%= check_box_tag :assignments_notification, @user.assignments_notification %>
<%= f.label t('notifications.form.system_message'), class: 'visible-sm visible-xs' %> <%= check_box_tag :system_message_notification %>
<%= f.label t('notifications.form.recent_notification'), class: 'visible-sm visible-xs'%>
<%= check_box_tag :recent_notification_email, @user.recent_notification_email %>
<%= f.label t('notifications.form.assignments'), class: 'visible-sm visible-xs' %> <%= check_box_tag :assignments_notification_email, @user.assignments_notification_email %>
<% end %>
<%= javascript_include_tag "users/settings/preferences" %>