summaryrefslogtreecommitdiffstats
path: root/app/views/settings/_mail_handler.rhtml
blob: 830b1ba4a5d3aa2c9f61d20dff6c0e016bf58d3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<% form_tag({:action => 'edit', :tab => 'mail_handler'}) do %>

<div class="box tabular settings">
<p><label><%= l(:setting_mail_handler_api_enabled) %></label>
<%= check_box_tag 'settings[mail_handler_api_enabled]', 1, Setting.mail_handler_api_enabled?,
                  :onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }" %>
<%= hidden_field_tag 'settings[mail_handler_api_enabled]', 0 %></p>

<p><label><%= l(:setting_mail_handler_api_key) %></label>
<%= text_field_tag 'settings[mail_handler_api_key]', Setting.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').disabled == false) { $('settings_mail_handler_api_key').value = randomKey(20) }" %></p>
</div>

<%= submit_tag l(:button_save) %>
<% end %>