<%= t('headings.settings', "Account Settings") %>
<%= form_for :account, :url => account_url(@account), :html => {:method => :put, :id => "account_settings", :class => 'account_settings'} do |f| %>
<%= t(:account_settings_title, "Account Settings") %>
<%= f.blabel :name, :en => "Account Name" %>
<%= f.text_field :name, :class => 'same-width-as-select' %>
<% if !@account.root_account? && (@context.sis_source_id && can_do(@context.root_account, @current_user, :read_sis) || can_do(@context.root_account, @current_user, :manage_sis)) %>
<%= f.blabel :sis_source_id, :en => "SIS ID" %>
<% if can_do(@context.root_account, @current_user, :manage_sis) %>
<%= f.text_field :sis_source_id, :title => "SIS ID", :value => @context.sis_source_id %>
<% else %>
<%= @context.sis_source_id %>
<% end %>
<% end %>
<% if available_locales.size > 1 %>
<%= f.blabel :default_locale, :default_language, :en => "Default Language" %>
<% no_language = t(:no_language_preference, "Not set (defaults to %{language})", :language => available_locales[infer_locale(:context => @context.parent_account)]) %>
<%= f.select :default_locale,
[[no_language, nil]] + available_locales.invert.sort_by { |desc, _| Canvas::ICU.collation_key(desc) },
{:selected => @context.default_locale}, {:class => 'locale'} %>
<%= render :partial => 'shared/locale_warning' %>
<%= t(:default_language_description, "This will override any browser/OS language settings. Preferred languages can still be set at the course/user level.") %>
<% end %>
<% if @account.root_account? %>
<%= f.blabel :default_time_zone, :en => "Default Time Zone" %>
<%= f.time_zone_select :default_time_zone, I18nTimeZone.us_zones, :model => I18nTimeZone %>
<%= f.fields_for :settings do |settings| %>
<% if @account.grants_right?(@current_user, :manage_site_settings) %>
<%= settings.blabel :mfa_settings, :en => "Multi-Factor Authentication" %>
<%= settings.select :mfa_settings, [[t('select.mfa.disabled', "Disabled"), :disabled],
[t('select.mfa.optional', "Optional"), :optional],
[t('select.mfa.required_for_admins', "Required for Admins"), :required_for_admins],
[t('select.mfa.required', "Required"), :required]], :selected => @account.mfa_settings %>
<%= settings.check_box :mobile_qr_login_is_enabled, checked: @account.mobile_qr_login_is_enabled? %>
<%= settings.label :mobile_qr_login_is_enabled, en: "Allow logins to the mobile apps via the use of QR codes" %>
<% end %>
<% unless @account.site_admin? %>
<%= settings.blabel :self_enrollment, :en => "Allow Self-Enrollment" %>
<%= settings.select :self_enrollment, [
[t(:never_allow_self_enrollment_option, 'Never'), ''],
[t(:self_enroll_for_manually_created_courses_option, 'For Manually-Created Courses'), 'manually_created'],
[t(:self_enroll_for_any_courses_option, 'For Any Courses'), 'any']
], :selected => @account.settings[:self_enrollment] %>
<%= settings.blabel :trusted_referers, :en => "Trusted HTTP Referers" %>
<%= settings.text_field :trusted_referers,
:value => @account.settings[:trusted_referers],
:class => 'same-width-as-select',
:placeholder => "https://example.edu" %>
<%= t("This is a comma separated list of URL's to trust. Trusting any URL's in this list will bypass the CSRF token when logging in to Canvas.") %>
<% if can_do(@context, @current_user, :manage_account_settings) %>
<%= settings.blabel :default_dashboard_view, t("Default View for Dashboard") %>
<%= settings.select :default_dashboard_view, options_for_select(dashboard_view_options(@account), @account.default_dashboard_view) %>
<%= settings.check_box :force_default_dashboard_view, :checked => false %> <%= settings.label :force_default_dashboard_view, t("Overwrite all users' existing default dashboard preferences") %>
<% end %>
<%= settings.check_box :prevent_course_renaming_by_teachers, :checked => @account.settings[:prevent_course_renaming_by_teachers] %>
<%= settings.label :prevent_course_renaming_by_teachers, :en => "Don't let teachers rename their courses" %>
<%= settings.check_box :allow_sending_scores_in_emails, :checked => @account.settings[:allow_sending_scores_in_emails] != false %>
<%= settings.label :allow_sending_scores_in_emails, :en => "Students can opt-in to receiving scores in email notifications" %>
<% if @account.grants_right?(@current_user, :manage_site_settings) %>
<%= settings.check_box :include_students_in_global_survey, checked: @account.include_students_in_global_survey?%>
<%= settings.label :include_students_in_global_survey, en: "Include students in global surveys" %>
<% end %>
<%= settings.check_box :restrict_quiz_questions, :checked => @account.settings[:restrict_quiz_questions] %>
<%= settings.label :restrict_quiz_questions, :en => "Restrict students from viewing quiz questions after course end date" %>
<% end %>
<% end %>
<% end %>
<% unless @account.site_admin? %>
<%= f.fields_for :settings do |settings| %>
<%= settings.fields_for :restrict_student_future_view do |r| %>
<% hash = @account.restrict_student_future_view %>
<% disabled = hash[:locked] && hash[:inherited] %>
<%= r.check_box :value, :checked => hash[:value], :disabled => disabled %>
<%= r.label :value , t("Restrict students from accessing courses before start date") %>
<% unless disabled %>
<%= r.check_box :locked, :checked => hash[:locked] %>
<%= r.label :locked, :en => "Lock this setting for sub-accounts and courses" %>
<% end %>
<% end %>
<%= settings.fields_for :restrict_student_future_listing do |r| %>
<% hash = @account.restrict_student_future_listing %>
<% disabled = hash[:locked] && hash[:inherited] %>
<%= r.check_box :value, :checked => hash[:value], :disabled => disabled %>
<%= r.label :restrict_student_future_listing, :en => "Restrict students from viewing future courses in enrollments list" %>
<% unless disabled %>
<%= r.check_box :locked, :checked => hash[:locked] %>
<%= r.label :locked, t("Lock this setting for sub-accounts") %>
<% end %>
<% end %>
<%= settings.fields_for :restrict_student_past_view do |r| %>
<% hash = @account.restrict_student_past_view %>
<% disabled = hash[:locked] && hash[:inherited] %>
<%= r.check_box :value, :checked => hash[:value], :disabled => disabled %>
<%= r.label :value, t("Restrict students from accessing courses after end date") %>
<% unless disabled %>
<%= r.check_box :locked, :checked => hash[:locked] %>
<%= r.label :locked, :en => "Lock this setting for sub-accounts and courses" %>
<% end %>
<% end %>
<%= settings.fields_for :lock_all_announcements do |r| %>
<% hash = @account.lock_all_announcements %>
<% disabled = hash[:locked] && hash[:inherited] %>
<%= r.check_box :value, :checked => hash[:value], :disabled => disabled %>
<%= r.label :value, :en => "Disable comments on announcements" %>
<% unless disabled %>
<%= r.check_box :locked, :checked => hash[:locked] %>
<%= r.label :locked, :en => "Lock this setting for sub-accounts and courses" %>
<% end %>
<% end %>
<%= settings.fields_for :enable_offline_web_export do |r| %>
<% hash = @account.enable_offline_web_export %>
<% disabled = hash[:locked] && hash[:inherited] %>
<%= r.check_box :value, checked: hash[:value], disabled: disabled %>
<%= r.label :value, t("Allow students to download course content and view offline") %>
<% end %>
<%= settings.fields_for :usage_rights_required do |r| %>
<% hash = @account.usage_rights_required %>
<% disabled = hash[:locked] && hash[:inherited] %>
<%= r.check_box :value, :checked => hash[:value], :disabled => disabled %>
<%= r.label :value, t("Copyright and license information must be provided for files before they are published.") %>
<% unless disabled %>
<%= r.check_box :locked, :checked => hash[:locked] %>
<%= r.label :locked, :en => "Lock this setting for sub-accounts and courses" %>
<% end %>
<% end %>
<% if @account.feature_allowed?(:rce_enhancements) %>
<%= settings.fields_for :disable_rce_media_uploads do |r| %>
<% hash = @account.disable_rce_media_uploads %>
<% disabled = hash[:locked] && hash[:inherited] %>
<%= r.check_box :value, checked: hash[:value], disabled: disabled %>
<%= r.label :value, t("Disable uploads to Canvas Media from the enhanced rich content editor") %>
<% end %>
<% end %>
<% end %>
<% end %>
<%= render partial: 'additional_settings', locals: { f: f } %>
<% if !@account.site_admin? && @account.root_account? && @account.feature_enabled?(:slack_notifications)%>
<% slack_api_key = @account.root_account.settings[:encrypted_slack_key] ? Canvas::Security.decrypt_password(@account.root_account.settings[:encrypted_slack_key], @account.root_account.settings[:encrypted_slack_key_salt], 'instructure_slack_encrypted_key') : '' %>
<%= t("Slack Api Key") %>
<%= t("Current Slack Api Key:") %>
<%= slack_api_key.length > 4 ? "#{slack_api_key[0..3]}#{'*' * (slack_api_key.length - 4)}" : '****' %>
<%= f.fields_for :slack do |slack| %>
<%= slack.label :slack_api_key , t("New Slack Api Key") %>
<%= slack.text_field :slack_api_key, placeholder: t("New Slack Api Key"), value:''%>
<% end %>
<% end %>
<% if !@account.site_admin? && @account.root_account? %>
<%= t("Personal Pronouns") %>
<%= f.fields_for :settings do |settings| %>
<%= settings.check_box :can_add_pronouns, :checked => @account.settings[:can_add_pronouns], class: "element_toggler", "aria-controls": "personal_pronouns_options" %>
<%= settings.label :can_add_pronouns, en: "Enable Personal Pronouns" %>
>
<%= settings.check_box :can_change_pronouns, :checked => @account.can_change_pronouns? %>
<%= settings.label :can_change_pronouns, en: "Allow users to change their pronouns in Canvas" %>
<% js_env(PRONOUNS_LIST: ((@account.pronouns.presence || Pronouns.default_pronouns)))
js_bundle :available_pronouns_list %>
<% end %>
<% end %>
<% if !@account.site_admin? && @account.root_account? && @account.grants_right?(@current_user, :manage_site_settings) %>
<% TermsOfService.ensure_terms_for_account(@account) %>
<% js_bundle :terms_of_service_modal%>
<%= t("Acceptable Use Policy") %>
<%= f.fields_for :terms_of_service do |tos| %>
<%= tos.label :terms_type, t("License Type") %>
<% if TermsOfService.type_dropdown_options_for_account(@account)[0][1] == "built_in:default" %>
(<%= t("Old Policy") %>)
<% end %>
<%= tos.select :terms_type, options_for_select(TermsOfService.type_dropdown_options_for_account(@account), @account.terms_of_service.terms_type) %>
<%= tos.check_box :passive, :checked => @account.terms_of_service.passive %>
<%= tos.label :passive, t("Allow passive acceptance of Terms of Service")%>
<% end %>
<% end %>
<% if !@account.site_admin? &&
@account.root_account? &&
@account.feature_enabled?(:google_docs_domain_restriction) &&
@account.grants_right?(@current_user, :manage_site_settings) %>
<%= t(:google_docs_domain, 'Allowed Google Docs Domain') %>
<%= f.fields_for :settings do |settings| %>
<%= settings.label :google_docs_domain, t('labels.domain', 'Domain:') %>
<%= settings.text_field :google_docs_domain, placeholder: 'gmail.com', value: @account.settings[:google_docs_domain] %>
<% end %>
<% end %>
<% unless @account.site_admin? %>
<%= t('Quiz IP Address Filters') %>
<%= t('Quiz IP Address Filters') %>
<%= t(:quiz_ip_filters_help_tooltip, "What are Quiz IP Filters?") %>
<%= t(:quiz_ip_filters_help_title, "What are Quiz IP Filters?") %>
<%= mt(:quiz_ip_filters_help_message,
"Quiz IP filters are a way to limit access to quizzes to computers in a specified IP range.\n\n" +
"Specify a set of IP address filters that teachers can use to " +
"protect access to quizzes. Filters can be a comma-separated " +
"list of addresses, or an address followed by a mask " +
"(\"192.168.217.1/24\" or \"192.168.217.1/255.255.255.0\").\"") %>
"
>
<%= t(:add_ip_filter_link, "Filter") %>
<% end %>
<%= t('Features') %>
<%= t(:features_title, "Features") %>
<%= f.fields_for :settings do |settings| %>
<% if @account.root_account? %>
<% if @account.grants_right?(@current_user, :manage_site_settings) %>
<%= settings.check_box :admins_can_change_passwords, :checked => @account.settings[:admins_can_change_passwords] == true %>
<%= settings.label :admins_can_change_passwords, :en => "Password setting by admins" %>
<%= settings.check_box :admins_can_view_notifications, :checked => @account.settings[:admins_can_view_notifications] %>
<%= settings.label :admins_can_view_notifications, :en => "Admins can view notifications" %>
<% unless @account.site_admin? %>
<%= f.check_box :enable_user_notes, :checked => @account.enable_user_notes %>
<%= f.label :enable_user_notes, :en => "Faculty Journal" %>
<%= settings.check_box :enable_eportfolios, :checked => @account.settings[:enable_eportfolios] != false %>
<%= settings.label :enable_eportfolios, :en => "ePortfolios" %>
<% if !@account.feature_enabled?(:new_sis_integrations) %>
<%= f.check_box :allow_sis_import, :checked => @account.allow_sis_import %>
<%= f.label :allow_sis_import, t("SIS imports") %>
<%= f.fields_for :settings do |settings| %>
<%= settings.check_box :include_integration_ids_in_gradebook_exports, :checked => @account.settings[:include_integration_ids_in_gradebook_exports] == true %>
<%= settings.label :include_integration_ids_in_gradebook_exports, t("Include Integration IDs in the gradebook exports.") %>
<% end %>
<% end %>
<%= settings.check_box :allow_invitation_previews, :checked => @account.settings[:allow_invitation_previews] %>
<%= settings.label :allow_invitation_previews, :en => "Invitation Previews" %>
<%= settings.check_box :enable_alerts, :checked => @account.settings[:enable_alerts] %>
<%= settings.label :enable_alerts, :en => "Alerts (beta)" %>
<% end %>
<%# end of site_admin? %>
<%= settings.check_box :global_includes, :checked => @account.settings[:global_includes] %>
<%= settings.label :global_includes, :en => "Custom CSS/JavaScript overrides" %>
<%= t ("Custom CSS and Javascript may cause accessibility issues or conflicts with future Canvas updates!")%>
<%= t do %>
Before implementing custom CSS or Javascript, please refer to our documentation .
<% end %>
<%= settings.check_box :show_scheduler, :checked => @account.settings[:show_scheduler] %>
<%= settings.label :show_scheduler, :en => "Enable Scheduler" %>
<%= settings.check_box :enable_profiles, :checked => @account.settings[:enable_profiles] %>
<%= settings.label :enable_profiles, :en => "Enable Profiles" %>
<%= settings.check_box :limit_parent_app_web_access, :checked => @account.settings[:limit_parent_app_web_access] %>
<%= settings.label :limit_parent_app_web_access, :en => "Limit access to Canvas web from the Canvas Parent app" %>
<% end %>
<%# end of :manage_site_settings %>
<%= settings.check_box :sub_account_includes, checked: @account.settings[:sub_account_includes] %>
<%= settings.label :sub_account_includes, :en => "Let sub-accounts use the Theme Editor to customize their own branding" %>
<% if @account.canvas_authentication? %>
<%= settings.check_box :open_registration, :checked => @account.open_registration? %>
<%= settings.label :open_registration, :en => "Open Registration" %>
<% if @account.delegated_authentication? %>
<%= link_to(image_tag('warning.png', :alt => ''), '#',
:class => 'open_registration_delegated_warning_link no-hover',
:title => t(:open_registration_delegated_warning_tooltip,
"An External Identity Provider is Enabled"))
%>
<%= t(:open_registration_delegated_warning_message,
"An external identity provider is enabled, and users created via open registration may not be able to log in unless
the external identity provider's login form has a link back to %{url}.", :url => canvas_login_url) %>
<% end %>
<% end %>
<%= settings.check_box :users_can_edit_name, :checked => @account.users_can_edit_name? %>
<%= settings.label :users_can_edit_name, :en => "Users can edit their name" %>
<%= settings.check_box :edit_institution_email, :checked => @account.edit_institution_email? %>
<%= settings.label :edit_institution_email, :en => "Users can delete their institution-assigned email address" %>
<%= settings.check_box :author_email_in_notifications, :checked => @account.author_email_in_notifications? %>
<%= settings.label :author_email_in_notifications, :en => "Show the email address of sender for user interaction Notifications" %>
<%= settings.check_box :enable_course_catalog, :checked => @account.settings[:enable_course_catalog] %>
<%= settings.label :enable_course_catalog, :en => "Show a searchable list of courses in this root account with the \"Include this course in the public course index\" flag enabled." %>
<% end %>
<% unless @account.site_admin? %>
/>
<%= t 'labels.equella', 'Equella' %>
<% end %>
<% if @account.grants_right?(@current_user, :manage_site_settings) %>
<%= settings.check_box :enable_turnitin, :checked => @account.settings[:enable_turnitin] %>
<%= settings.label :enable_turnitin, :en => "Turnitin" %>
<% end %>
<% end %>
<%= f.fields_for :services do |services| %>
<% Account.services_exposed_to_ui_hash(:setting, @current_user, @account).sort_by { |k,h| Canvas::ICU.collation_key(h[:name]) }.each do |key, service| %>
<%= services.check_box key, :checked => @account.service_enabled?(key) %>
<%= services.label key, service[:name] + " " %>
<% if key == :avatars %>
<%= hidden_field_tag "account[settings][enable_gravatar]", "0", id: "hidden_account_settings_enable_gravatar" %>
<%= check_box_tag "account[settings][enable_gravatar]", "1", @account.enable_gravatar? %>
<%= label_tag "account[settings][enable_gravatar]", t("Enable Gravatar") %>
<% end %>
<% end %>
<% end %>
<% unless @account.site_admin? %>
<% if @account.feature_enabled?(:new_sis_integrations) %>
<%= render partial: 'sis_integration_settings', locals: { f: f } %>
<% else %>
<%= render partial: 'sis_integration_settings_old', locals: { f: f } %>
<% end %>
<% end %>
<% if @account.root_account? && !@account.site_admin? && show_feedback_link? %>
<% end %>
<% unless @account.site_admin? %>
<%= t(:equella_settings_title, "Equella Settings") %>
<%= f.fields_for :settings do |settings| %>
<% end %>
<%= t("Similarity Detection Platform") %>
<% if @account.settings[:enable_turnitin] %>
<%= t(:turnitin_settings_title, "Turnitin Settings") %>
<% end %>
<% end %>
<% if @account.root_account? and not (exposed_services = Account.services_exposed_to_ui_hash(:service, @current_user)).empty? %>
<%= t('Enabled Web Services') %>
<%= t('Enabled Web Services') %>
<%= f.fields_for :services do |services| %>
<% exposed_services.sort_by { |k,h| Canvas::ICU.collation_key(h[:name]) }.each do |key, service| %>
<%= services.check_box key, :checked => @account.service_enabled?(key) %>
<%= services.label key, service[:name] + " " %>
<% end %>
<% end %>
" id="google_docs_previews_help_dialog">
<%= mt(:about_google_docs, <<-TEXT, :terms_url => "https://docs.google.com/viewer/TOS")
Google Docs Previews allow users to view documents from
within Canvas, rather than having to download them and
open the corresponding program (e.g. Word or Excel).
Google Docs Previews can also render file types
not supported by the Canvas document previewer.
By using this service you
acknowledge that you have read and agreed to the
[Google Docs Viewer Terms of Service](%{terms_url}).
TEXT
%>
<% end %>
<% if @account.root_account? && !@account.site_admin? %>
<%= t('Who Can Create New Courses') %>
<%= t(:create_courses_title, "Who Can Create New Courses") %>
<%= t(:create_courses_description, "(Account Administrators can always create courses)") %>
<%= f.fields_for :settings do |settings| %>
<%= settings.check_box :teachers_can_create_courses, :checked => @account.teachers_can_create_courses? %>
<%= settings.label :teachers_can_create_courses, :en => "Teachers" %>
<%= settings.check_box :no_enrollments_can_create_courses, :checked => @account.no_enrollments_can_create_courses? %>
<%= settings.label :no_enrollments_can_create_courses, :en => "Users with no enrollments" %>
<%= settings.check_box :students_can_create_courses, :checked => @account.students_can_create_courses? %>
<%= settings.label :students_can_create_courses, :en => "Students" %>
<% end %>
<% end %>
<%= render partial: 'external_integration_keys', locals: { f: f } %>
<% if @account.root_account &&
@account.root_account.feature_enabled?(:smart_alerts) &&
can_do(@account, @current_user, :manage_alerts)
%>
<%= t('Smart Assignment Alerts') %>
<%= t('Smart Assignment Alerts') %>
<%= f.fields_for :settings do |settings| %>
<% end %>
<% end %>
<%= t(:update_settings_button, "Update Settings") %>
<% end %>
<% end %>
<% if can_do(@account, @current_user, :manage_privacy_settings) %>
<% end %>
<% if can_do(@context, @current_user, :manage_storage_quotas) %>
<% end %>
<% if can_do(@context, @current_user, :manage_account_settings) && @account.root_account? && !@account.site_admin? %>
<%= form_for :account, :url => account_url(@account), :html => {:method => :put, :id => "account_settings_notifications"} do |f| %>
<%= t(:email_notification_from_settings, 'E-mail Notification "From" Settings') %>
<%= t(:email_notification_from_description, "This setting allows the Admin to brand or label the 'From' text on all notifications sent from Canvas for this Account.") %>
<%= f.fields_for :settings do |settings| %>
<%= settings.radio_button :outgoing_email_default_name_option, 'default',
:checked => @account.settings[:outgoing_email_default_name].blank?,
:class => 'notification_from_name_option' %>
<%= settings.label :outgoing_email_default_name_option_default, :en => "Default Canvas Setting" %>
: 2em;'>
<%= t 'notifications.example', 'Example:' %>
<%= settings.radio_button :outgoing_email_default_name_option, 'custom',
:checked => !@account.settings[:outgoing_email_default_name].blank?,
:class => 'notification_from_name_option' %>
<%= settings.label :outgoing_email_default_name_option_custom, :en => 'Custom "From" Name' %>
: 2em;'>
<%= t('notifications.custom_name_description', 'If selected, this will replace all other branding sent in Canvas notifications.') %>
<%= text_field_tag 'account[settings][outgoing_email_default_name]', @account.settings[:outgoing_email_default_name] %>
: 2em;'>
<%= t 'notifications.example', 'Example:' %>
<%= t('notifications.external_services', 'Notifications Sent to External Services') %>
<% end %>
<%= t(:update_settings_button, "Update Settings") %>
<% end %>
<%= t(:global_announcements_title, "Global Announcements") %>
<%= will_paginate(@announcements, params: {anchor: "tab-announcements"}) %>
<% @announcements.each do |announcement| %>
<%= accessible_message_icon_text(notification_icon_type(announcement)) %>
<%= announcement.subject %>
<%= user_content(announcement.message) %>
<% if can_do(@account, @current_user, :manage_alerts) %>
<% end %>
<%= t("This is a message for *%{name}*", name: announcement.account.name, wrapper: '\1 ') %>
<%= t(:alert_timespan, "from %{start_at} to %{end_at}",
:start_at => datetime_string(announcement.start_at),
:end_at => datetime_string(announcement.end_at)) %>
<%= link_to(context_user_name(@account, announcement.user_id), user_path(announcement.user_id)) %>
<% if announcement.required_account_service %>
<%= AccountServices.allowable_services[announcement.required_account_service.to_sym].try(:[], :name) %>
<% end %>
<% unless announcement.account_notification_roles.empty? %>
<%= t "Send only to the following types of users:" %>
<%= roles_message(@account) %>
<% announcement.account_notification_roles.each do |r| %>
<% @course_roles.select {|rt| rt[:id] == r.role_id }.each do |rt| %>
<%= rt[:label] %>
<% end %>
<% # NilEnrollment is a special case %>
<% if r.role_id.nil? %>
<%= t :no_enrollment_roles, "Unenrolled users" %>
<% end %>
<% @account_roles.select {|rt| rt[:id] == r.role_id }.each do |rt| %>
<%= rt[:label] %>
<% end %>
<% end %>
<% end %>
<% if announcement.months_in_display_cycle %>
<%= t :announcement_sent_to_subset, "Sent to 1 / %{denominator} users each month", denominator: announcement.months_in_display_cycle %>
<% end %>
<% if can_do(@account, @current_user, :manage_alerts) %>
<%= render(:partial => "edit_account_notification", :locals => {:announcement => announcement}) %>
<% end %>
<% end %>
<% if can_do(@account, @current_user, :manage_alerts) %>
<%= t("New Announcement") %>
<%= form_for :account_notification,
url: account_account_notifications_url(@account),
html: {
id: "add_notification_form",
class: "hidden_form",
role: "region" } do |f| %>
<%= t("Title") %>
<%= f.text_field :subject, :class => 'ic-Input', :id => 'account_notification_subject' %>
<%= t("Announcement type") %>
<%= options_for_select([[t("information"), "information", {:class=>"information"}],
[t("error"), "error", {:class=>"error"}],
[t("warning"), "warning", {:class=>"warning"}],
[t("question"), "question", {:class=>"question"}],
[t("calendar"), "calendar", {:class=>"calendar"}]]) %>
<% if @account.root_account.trust_exists? %>
<%= f.check_box :domain_specific, :checked => !!@account.root_account.settings[:default_announcement_domain_specific] %>
<%= f.label :domain_specific, t("Only show announcement on current account domain") %>
<% end %>
<% if @account.site_admin? %>
<% end %>
<%= t("Announcement starts at") %>
<%= datepicker_screenreader_prompt %>
<%= f.text_field :start_at,
:class => 'datetime_field',
"aria-labelledby" => "announcement_starts_at_label",
"data-tooltip" => "",
:title => accessible_date_format %>
<%= t("Announcement ends at") %>
<%= datepicker_screenreader_prompt %>
<%= f.text_field :end_at,
:class => 'datetime_field',
"aria-labelledby" => "announcement_ends_at_label",
"data-tooltip" => "",
:title => accessible_date_format %>
<% if !@account.site_admin? %>
<%= f.check_box :send_message %>
<%= f.label :send_message, t("Send notification directly to users when announcement starts"), :class => "ic-Label" %>
<% end %>
<%= t('#buttons.cancel', %{Cancel}) %>
<%= t("Publish announcement") %>
<% end %>
<% end %>
<%= render :partial => 'external_tools/external_tools', :object => @context.context_external_tools.active %>
<% end %>
<% if @context.root_account.settings[:enable_alerts] && can_do(@context, @current_user, :manage_interaction_alerts) %>
<% end %>
<% if can_do(@context, @current_user, :view_feature_flags) %>
<% end %>
<% if @account.root_account.feature_enabled?(:javascript_csp) && can_do(@context, @current_user, :manage_account_settings) && !@account.site_admin? %>