/
_form.html.erb
44 lines (38 loc) · 1.17 KB
/
_form.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<%= content_for :html_head do %>
<%= stylesheet_link_tag('cms/form_layout') %>
<style type="text/css">
.checkbox_group .checkboxes .instructions {
padding-bottom: 10px;
}
</style>
<%= javascript_tag do %>
jQuery(function($) {
$('#group_group_type_id').selectbox();
});
<% end %>
<% end %>
<%= content_for :functions do %>
<%= link_to(span_tag("List All"), groups_path,
:id => "list_all_button",
:class => "button") %>
<% end %>
<%= form_for @group do |f| %>
<%= f.cms_error_messages %>
<div class="fields text_fields">
<%= f.label :name, "Group Name" %>
<%= f.text_field :name %>
</div>
<% unless @group.guest? %>
<div class="fields select_fields">
<%= f.label :group_type_id, "Type of User" %>
<div><%= f.select :group_type_id, Cms::GroupType.non_guest.map { |g| [g.name, g.id] } %></div>
<div class="instructions">What kind of user does this group represent?</div>
<br clear="all" />
</div>
<% end %>
<%= render :partial => 'permissions' %>
<%= render :partial => 'sections' %>
<div class="buttons">
<%= lt_button_wrapper(f.submit("Save", :class => "submit")) %>
</div>
<% end %>