- content_for :javascript do
  initialize_email_members_form("#{I18n.locale}");

- content_for :title_header do
  %h1
    = t("layouts.admin.admin")
    = "-"
    = t("admin.emails.new.send_email_to_members")

= render :partial => "admin/left_hand_navigation", :locals => { :links => admin_links_for(@current_community) }

.new-member-email-form.left-navi-section
  %h2= t(".send_email_to_members_title")
  = form_for :email, :url => admin_community_emails_path(:community_id => @current_community.id), :html => { :id => "new_member_email" } do |form|
    = form.label :subject, t(".email_subject")
    = form.text_field :subject
    = form.label :content, t(".email_content")
    = form.text_area :content, :placeholder => t(".email_content_placeholder"), :class => "email_members_text_area"
    - if available_locales.size > 1
      = label_tag "email_language", t(".email_language")
      = render :partial => "layouts/permanent_notification", :locals => { :text => t(".message_will_be_sent_only_to_people_with_this_language") }
      .select-tag-dropdown
        - options = [[t(".any_language"), "any"]] | available_locales
        = select_tag "email[locale]", options_for_select(options, "any")
    - else
      = form.hidden_field :locale, :value => "any"
    = button_tag t(".send_email"), :class => "send_button"
