.info = t :messenger_settings_intro
br

fieldset#messenger_settings.box.tabular
  legend = l :label_messenger_outgoing_webhook
  p
    label = l :label_settings_messenger_url
    = text_field_tag 'settings[messenger_url]', @settings[:messenger_url], size: 60, placeholder: 'https://webhook.url'
    em.info = t :messenger_url_info_html
  p
    label = l :label_settings_messenger_icon
    = text_field_tag 'settings[messenger_icon]', @settings[:messenger_icon], size: 60
  p
    label = l :label_settings_messenger_channel
    = text_field_tag 'settings[messenger_channel]', @settings[:messenger_channel], size: 30, placeholder: 'redmine'
    em.info = t :messenger_channel_info_html
  p
    label = l :label_settings_messenger_username
    = text_field_tag 'settings[messenger_username]', @settings[:messenger_username], size: 30
  p
    label = l :label_settings_messenger_verify_ssl
    = check_box_tag 'settings[messenger_verify_ssl]', 1, @settings[:messenger_verify_ssl].to_i == 1
    em.info = t :messenger_verify_ssl_info_html

fieldset#messenger_settings.box.tabular
  legend = l :label_issue_plural
  .info = t :messenger_issue_intro
  br
  p
    label = l :label_settings_auto_mentions
    = check_box_tag 'settings[auto_mentions]', 1, @settings[:auto_mentions].to_i == 1
  p
    label = l :label_settings_default_mentions
    = text_field_tag 'settings[default_mentions]', @settings[:default_mentions], size: 30
    em.info = t :default_mentionsl_info
  p
    label = l :label_settings_display_watchers
    = check_box_tag 'settings[display_watchers]', 1, @settings[:display_watchers].to_i == 1
  p
    label = l :label_settings_post_updates
    = check_box_tag 'settings[post_updates]', 1, @settings[:post_updates].to_i == 1
  p
    label = l :label_settings_new_include_description
    = check_box_tag 'settings[new_include_description]', 1, @settings[:new_include_description].to_i == 1
  p
    label = l :label_settings_updated_include_description
    = check_box_tag 'settings[updated_include_description]', 1, @settings[:updated_include_description].to_i == 1
  p
    label = l :label_settings_post_private_issues
    = check_box_tag 'settings[post_private_issues]', 1, @settings[:post_private_issues].to_i == 1
  p
    label = l :label_settings_post_private_notes
    = check_box_tag 'settings[post_private_notes]', 1, @settings[:post_private_notes].to_i == 1

  p
    label = l :label_settings_messenger_direct_users_messages
    = check_box_tag 'settings[messenger_direct_users_messages]', 1, @settings[:messenger_direct_users_messages].to_i == 1
    em.info = t :messenger_direct_users_messages_info_html

fieldset#messenger_settings.box.tabular
  legend = l :label_wiki
  .info = t :messenger_wiki_intro
  br
  p
    label = l :label_settings_post_wiki
    = check_box_tag 'settings[post_wiki]', 1, @settings[:post_wiki].to_i == 1
  p
    label = l :label_settings_post_wiki_updates
    = check_box_tag 'settings[post_wiki_updates]', 1, @settings[:post_wiki_updates].to_i == 1

- if RedmineMessenger::REDMINE_DB_SUPPORT
  fieldset#messenger_settings.box.tabular
    legend = l :field_db_entries
    .info = t :messenger_db_intro
    br
    p
      label = l :label_settings_post_db
      = check_box_tag 'settings[post_db]', 1, @settings[:post_db].to_i == 1
    p
      label = l :label_settings_post_db_updates
      = check_box_tag 'settings[post_db_updates]', 1, @settings[:post_db_updates].to_i == 1
    p
      label = l :label_settings_post_private_db
      = check_box_tag 'settings[post_private_db]', 1, @settings[:post_private_db].to_i == 1

- if RedmineMessenger::REDMINE_CONTACTS_SUPPORT
  fieldset#messenger_settings.box.tabular
    legend = l :label_contact_plural
    .info = t :messenger_contacts_intro
    br
    p
      label = l :label_settings_post_contact
      = check_box_tag 'settings[post_contact]', 1, @settings[:post_contact].to_i == 1
    p
      label = l :label_settings_post_contact_updates
      = check_box_tag 'settings[post_contact_updates]', 1, @settings[:post_contact_updates].to_i == 1
    p
      label = l :label_settings_post_private_contacts
      = check_box_tag 'settings[post_private_contacts]', 1, @settings[:post_private_contacts].to_i == 1

- if Redmine::Plugin.installed? 'redmine_passwords'
  fieldset#messenger_settings.box.tabular
    legend = l :label_password_plural
    .info = t :messenger_passwords_intro
    br
    p
      label = l :label_settings_post_password
      = check_box_tag 'settings[post_password]', 1, @settings[:post_password].to_i == 1
    p
      label = l :label_settings_post_password_updates
      = check_box_tag 'settings[post_password_updates]', 1, @settings[:post_password_updates].to_i == 1
