Add settings page for Storage, add notification prefs
This commit is contained in:
25
app/views/settings/_remotestorage.html.erb
Normal file
25
app/views/settings/_remotestorage.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<%= form_for @user, url: setting_path(:remotestorage), html: { :method => :put } do |f| %>
|
||||
<section>
|
||||
<h3>Notifications</h3>
|
||||
<ul role="list">
|
||||
<%= render FormElements::FieldsetComponent.new(
|
||||
positioning: :horizontal,
|
||||
title: "New connection authorized",
|
||||
description: "Notify me when my storage is connected to a new app"
|
||||
) do %>
|
||||
<% f.fields_for :preferences do |p| %>
|
||||
<%= p.select :remotestorage_notify_auth_created, options_for_select([
|
||||
["off", "disabled"],
|
||||
["Chat (Jabber)", "xmpp"], # TODO make DRY, check for XMPP enabled
|
||||
["E-Mail", "email"]
|
||||
], selected: @user.preferences[:remotestorage_notify_auth_created]) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</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 %>
|
||||
Reference in New Issue
Block a user