<% settings = Setting.plugin_redmine_ux_toolkit || {} %>
<% auto_watch_issue_author_enabled = settings.fetch('auto_watch_issue_author', '0').to_s == '1' %>
<% auto_watch_issue_commenters_enabled = settings.fetch('auto_watch_issue_commenters', '0').to_s == '1' %>

<p>
  <strong><%= l(:label_ux_toolkit_watchers) %></strong>
</p>

<p>
  <%= hidden_field_tag 'settings[auto_watch_issue_author]', '0', id: nil %>
  <%= check_box_tag 'settings[auto_watch_issue_author]',
                    '1',
                    auto_watch_issue_author_enabled,
                    id: 'settings_auto_watch_issue_author' %>
  <%= label_tag 'settings_auto_watch_issue_author',
                l(:label_ux_toolkit_auto_watch_issue_author) %>
  <em class="info"><%= l(:text_ux_toolkit_auto_watch_issue_author_help) %></em>
</p>

<p>
  <%= hidden_field_tag 'settings[auto_watch_issue_commenters]', '0', id: nil %>
  <%= check_box_tag 'settings[auto_watch_issue_commenters]',
                    '1',
                    auto_watch_issue_commenters_enabled,
                    id: 'settings_auto_watch_issue_commenters' %>
  <%= label_tag 'settings_auto_watch_issue_commenters',
                l(:label_ux_toolkit_auto_watch_issue_commenters) %>
  <em class="info"><%= l(:text_ux_toolkit_auto_watch_issue_commenters_help) %></em>
</p>
