<p>
  <label><%= l(:label_helpdesk_from_address) %></label>
  <%= text_field_tag 'settings[helpdesk_answer_from]', @settings["helpdesk_answer_from"], :size => "98%" %>
  <em class="info"><%= l(:text_helpdesk_answer_macros, :macro => HelpdeskSettings::FROM_MACRO_LIST.join(', ')) %></em>
</p>

<p>
  <label><%= l(:label_helpdesk_save_cc) %></label>
  <%= check_box_tag 'settings[helpdesk_save_cc]', 1, @settings["helpdesk_save_cc"] %>
</p>

<p>
  <label><%= l(:label_helpdesk_send_note_by_default) %></label>
  <%= check_box_tag 'settings[send_note_by_default]', 1, @settings["send_note_by_default"] %>
</p>

<p>
  <label><%= l(:label_helpdesk_add_contact_notes) %></label>
  <%= check_box_tag 'settings[helpdesk_add_contact_notes]', 1, @settings["helpdesk_add_contact_notes"] %>
</p>

<p>
  <label><%= l(:label_helpdesk_assign_contact_user) %></label>
  <%= check_box_tag 'settings[helpdesk_assign_contact_user]', 1, @settings["helpdesk_assign_contact_user"], :class => 'assign_contact_user' %>
</p>

<p>
  <label class='parent'><%= l(:label_helpdesk_create_private_tickets) %></label>
  <%= check_box_tag 'settings[helpdesk_create_private_tickets]', 1, @settings["helpdesk_create_private_tickets"], :disabled => true, :class => 'private_tikets' %>
</p>

<p>
  <label class='parent'><%= l(:label_helpdesk_autoclose_tickets_after) %></label>
  <%= select_tag 'settings[helpdesk_autoclose_tickets_after]', options_for_select((1..24).map{ |h| [h, h] }, @settings["helpdesk_autoclose_tickets_after"]),
                                                               :onchange => "toggleStatusesForAutoclose(this); return false", :include_blank => true %>
  <%= radio_button_tag 'settings[helpdesk_autoclose_tickets_time_unit]', 'day', RedmineHelpdesk.autoclose_time_unit_is?('day') || RedmineHelpdesk.autoclose_time_unit.nil?   %>
  <%= l(:label_helpdesk_days) %>
  <%= radio_button_tag 'settings[helpdesk_autoclose_tickets_time_unit]', 'hour', RedmineHelpdesk.autoclose_time_unit_is?('hour') %>
  <%= l(:label_helpdesk_hours) %>
</p>
<div id="statuses_autoclose" style="display:<%= !@settings["helpdesk_autoclose_tickets_after"].blank? ? 'block' : 'none' %>">
  <p>
    <label><%= l(:label_helpdesk_autoclose_from_status) %></label>
    <%= select_tag 'settings[helpdesk_autoclose_from_status]', options_for_select(IssueStatus.all.map{|st| [st.name, st.id]}, @settings["helpdesk_autoclose_from_status"]), :style => "width:150px" %>
  </p>
  <p>
    <label><%= l(:label_helpdesk_autoclose_to_status) %></label>
    <%= select_tag 'settings[helpdesk_autoclose_to_status]', options_for_select(IssueStatus.all.map{|st| [st.name, st.id]}, @settings["helpdesk_autoclose_to_status"]), :style => "width:150px" %>
  </p>
</div>
