Added emails download views
This commit is contained in:
@@ -22,7 +22,7 @@ App.PreventDoubleSubmission =
|
||||
|
||||
initialize: ->
|
||||
$('form').on('submit', (event) ->
|
||||
unless event.target.id == "new_officing_voter"
|
||||
unless event.target.id == "new_officing_voter" || "admin_download_emails"
|
||||
buttons = $(this).find(':button, :submit')
|
||||
App.PreventDoubleSubmission.disable_buttons(buttons)
|
||||
).on('ajax:success', (event) ->
|
||||
|
||||
@@ -203,10 +203,13 @@
|
||||
<span class="icon-zip"></span>
|
||||
<strong><%= t("admin.menu.emails") %></strong>
|
||||
</a>
|
||||
<ul id="emails_menu" <%= "class=is-active" if controller_name == "newsletters" %>>
|
||||
<ul id="emails_menu" <%= "class=is-active" if controller_name == "newsletters" || "emails_download" %>>
|
||||
<li <%= "class=active" if controller_name == "newsletters" %>>
|
||||
<%= link_to t("admin.menu.newsletters"), admin_newsletters_path %>
|
||||
</li>
|
||||
<li <%= "class=active" if controller_name == "emails_download" %>>
|
||||
<%= link_to t("admin.menu.emails_download"), admin_emails_download_index_path %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
20
app/views/admin/emails_download/index.html.erb
Normal file
20
app/views/admin/emails_download/index.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<h2 class="inline-block"><%= t("admin.emails_download.index.title") %></h2>
|
||||
|
||||
<div class="small-6">
|
||||
<%= form_tag generate_csv_admin_emails_download_index_path,
|
||||
method: :get,
|
||||
id: "admin_download_emails" do %>
|
||||
|
||||
<label><%= t('admin.emails_download.index.download_segment') %></label>
|
||||
<p class="help-text" id="emails-help-text">
|
||||
<%= t('admin.emails_download.index.download_segment_help_text') %>
|
||||
</p>
|
||||
|
||||
<%= select_tag :users_segment, options_for_select(UserSegments::SEGMENTS
|
||||
.collect { |s| [t("admin.segment_recipient.#{s}"), s] }) %>
|
||||
|
||||
<div class="margin-top">
|
||||
<%= submit_tag t('admin.emails_download.index.download_emails_button'), class: "button" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user