Sha256: b01e34859fb51ceec13ffceb72a411fb4ff1fa49c45e26498c59b1eb3b71a156

Contents?: true

Size: 1.83 KB

Versions: 16

Compression:

Stored size: 1.83 KB

Contents

<% submit_url = (@forum.new_record? ? admin_forum_category_forums_path(@forum_category) : admin_forum_path) %>
<%= simple_form_for @forum, url: submit_url,
      html: { class: 'form-horizontal' }, wrapper: :bs3_horizontal_form, wrapper_mappings: DmAdmin::FormWrapperMappings do |f| %>

  <%= f.error_notification message: "Please review the problems below" %>
  <% toolbar = capture do %>
    <%= link_to icons(:cancel), (@forum.new_record? ? admin_forum_category_path(@forum.forum_category) : admin_forum_path(@forum)), class: 'btn btn-link btn-icon' %>
  <% end %>
  <%= panel title: @title, toolbar: toolbar do %>
    <%= f.input :name, required: true, autofocus: true %>  
    <%= f.input :slug, label: 'Slug', hint: 'Leave blank to have auto-generated based on title.' %>
    <%= f.input :description, as: :text, label: 'Description', input_html: { rows: 4, class: 'input-block-level' } %>
    <%= f.input :published, as: :toggle, label: 'Publish It?' %>
    <%= f.input :is_public, as: :toggle, label: 'Make Forum Public?', hint: 'This will allow anyone to see the forum.  Use option below to restrict to registered users' %>
    <%= f.input :requires_login, as: :toggle, label: 'Public Requires Login?', hint: 'If this is a public forum, user must be logged in to see it.  (All private forums automatically require login)' %>
    <% if defined? DmSubscriptions %>
      <%= f.input :requires_subscription, as: :toggle, label: 'Subscription Required?', hint: 'User must have a paid subscription to access' %>
    <% end %>

    <%= submit_or_cancel cancel_url: (@forum.new_record? ? admin_forum_category_path(@forum.forum_category) : admin_forum_path(@forum)),
                         delete_url: ([:admin, @forum] unless @forum.new_record?), delete_confirm: 'Are you sure you wish to delete this forum?  All comments will also be deleted!' %>

  <% end %>
<% end %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_forum-4.2.3.10 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.9 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.8 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.7 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.6 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.5 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.4 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.3 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.2 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3.1 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.3 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.2.3 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.2.2 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.2.1 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.2 app/views/dm_forum/admin/forums/_form.html.erb
dm_forum-4.2.1.5 app/views/dm_forum/admin/forums/_form.html.erb