* Turn prefs into a flat hash structure, since nesting is not worth the trouble * Add a custom serializer class for prefs * Add a config file for defaults and merge set prefs with unset ones * Use booleans for "true" and "false", and integers where appropriate
19 lines
676 B
Plaintext
19 lines
676 B
Plaintext
<%= form_for @user, url: setting_path(:xmpp), html: { :method => :put } do |f| %>
|
|
<section>
|
|
<h3>Contacts</h3>
|
|
<ul role="list">
|
|
<%= render FormElements::FieldsetToggleComponent.new(
|
|
field_name: "user[preferences][xmpp_exchange_contacts_with_invitees]",
|
|
enabled: @user.preferences[:xmpp_exchange_contacts_with_invitees],
|
|
title: "Exchange contacts when invited user signs up",
|
|
description: "Add each others contacts, so you can chat with them immediately"
|
|
) %>
|
|
</ul>
|
|
</section>
|
|
<section>
|
|
<p class="pt-6 border-t border-gray-200 text-right">
|
|
<%= f.submit 'Save', class: "btn-md btn-blue w-full md:w-auto" %>
|
|
</p>
|
|
</section>
|
|
<% end %>
|