notebook/app/views/content/form/_privacy_toggle.html.erb
2017-02-23 14:41:02 +00:00

15 lines
554 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%= form_for(content, remote: true, html: {role: :form, 'data-model': content.class.model_name}) do |form|%>
<div class="switch">
<div class="col s6">
<i class="material-icons <%= content.class.color %>-text left"><%= content.class.icon %></i>
<b><%= content.name %></b>s privacy setting:
</div>
<label class="col s6 right-align">
private
<%= form.check_box :privacy, { onchange: '$(this).submit();' }, 'public', 'private' %>
<span class="lever"></span>
public
</label>
</div>
<% end %>