summaryrefslogtreecommitdiffstats
path: root/app/views/settings/_mail_handler.html.erb
blob: 02dfe526408dfd421ff0bcc7c804288bec806500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<%= form_tag({:action => 'edit', :tab => 'mail_handler'}) do %>

<div class="box tabular settings">
  <p>
    <%= setting_text_area :mail_handler_body_delimiters, :rows => 5 %>
    <%= setting_check_box :mail_handler_enable_regex_delimiters, :label => false %> <%= l(:setting_mail_handler_enable_regex_delimiters) %>
    <em class="info"><%= l(:text_line_separated) %></em>
  </p>
  <p>
    <%= setting_text_field :mail_handler_excluded_filenames, :size => 60 %>
    <em class="info"><%= l(:text_comma_separated) %>
    <%= l(:label_example) %>: smime.p7s, *.vcf</em>
  </p>
</div>

<div class="box tabular settings">
<p><%= setting_check_box :mail_handler_api_enabled,
         :onclick => "if (this.checked) { $('#settings_mail_handler_api_key').removeAttr('disabled'); } else { $('#settings_mail_handler_api_key').attr('disabled', true); }"%></p>

<p><%= setting_text_field :mail_handler_api_key, :size => 30,
                                                 :id => 'settings_mail_handler_api_key',
                                                 :disabled => !Setting.mail_handler_api_enabled? %>
  <%= link_to_function l(:label_generate_key), "if (!$('#settings_mail_handler_api_key').attr('disabled')) { $('#settings_mail_handler_api_key').val(randomKey(20)) }" %>
</p>
</div>

<%= submit_tag l(:button_save) %>

<% end %>