app/views/thredded/preferences/_form.html.erb in thredded-0.10.1 vs app/views/thredded/preferences/_form.html.erb in thredded-0.11.0

- old
+ new

@@ -1,17 +1,25 @@ -<%= form_for( - preferences, - method: :patch, - url: (preferences.messageboard ? messageboard_preferences_path(preferences.messageboard) : global_preferences_path), - html: { - class: 'thredded--form thredded--notification-preferences-form', - 'data-thredded-user-preferences-form' => true - }) do |f| %> +<%# @type preferences [Thredded::UserPreferencesForm] %> +<%= form_for(preferences, method: :patch, url: preferences.update_path, html: { + class: 'thredded--form thredded--notification-preferences-form', + 'data-thredded-user-preferences-form' => true +}) do |f| %> <h3><%= t 'thredded.preferences.form.global_preferences_label' %></h3> <ul class="thredded--form-list"> <li> + <%= f.label :auto_follow_topics do %> + <%= f.check_box :auto_follow_topics, + 'data-thredded-update-checkbox-on-change' => + 'user_preferences_form[messageboard_auto_follow_topics]' %> + <%= t 'thredded.preferences.form.auto_follow_topics.label' %> + <p class="thredded--form-list--hint"> + <%= t 'thredded.preferences.form.auto_follow_topics.hint' %> + </p> + <% end %> + </li> + <li> <%= f.label :follow_topics_on_mention do %> <%= f.check_box :follow_topics_on_mention, 'data-thredded-bound-messageboard-pref' => 'user_preferences_form[messageboard_follow_topics_on_mention]' %> <%= t 'thredded.preferences.form.follow_topics_on_mention.label' %> <p class="thredded--form-list--hint"> <%= t 'thredded.preferences.form.follow_topics_on_mention.hint' %> @@ -46,9 +54,18 @@ <% if preferences.messageboard %> <h3> <%= t 'thredded.preferences.form.messageboard_preferences_label_html', messageboard: messageboard.name %> </h3> <ul class="thredded--form-list" data-thredded-user-preferences-form-messageboard-fields> + <li> + <%= f.label :messageboard_auto_follow_topics do %> + <%= f.check_box :messageboard_auto_follow_topics %> + <%= t 'thredded.preferences.form.messageboard_auto_follow_topics.label' %> + <p class="thredded--form-list--hint"> + <%= t 'thredded.preferences.form.messageboard_auto_follow_topics.hint' %> + </p> + <% end %> + </li> <li> <%= f.label :messageboard_follow_topics_on_mention do %> <%= f.check_box :messageboard_follow_topics_on_mention %> <%= t 'thredded.preferences.form.messageboard_follow_topics_on_mention.label' %> <p class="thredded--form-list--hint">