Commit 2d7499a8d9be83f8a371cd64e592cd7dcfd094c0
1 parent
165ea16f
Exists in
master
and in
29 other branches
ActionItem501: fixed the role editing form
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2262 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/views/role/_form.rhtml
1 | <%= error_messages_for :role %> | 1 | <%= error_messages_for :role %> |
2 | 2 | ||
3 | -<% labelled_form_for :role, @role, :url => (mode == :edit) ? {:action => 'update', :id => role} : {:action => 'create'} do |f| %> | 3 | +<% labelled_form_for :role, role, :url => (mode == :edit) ? {:action => 'update', :id => role} : {:action => 'create'} do |f| %> |
4 | 4 | ||
5 | <%= f.text_field :name %> | 5 | <%= f.text_field :name %> |
6 | 6 | ||
7 | <%= _('Permissions:') %> <br> | 7 | <%= _('Permissions:') %> <br> |
8 | <% permissions.keys.each do |p| %> | 8 | <% permissions.keys.each do |p| %> |
9 | - <%= labelled_check_box(permission_name(p), (check_box_tag "role[permissions][]", p, @role.has_permission?(p))) %> <br/> | 9 | + <%= labelled_check_box(permission_name(p), "role[permissions][]", p, role.has_permission?(p)) %> <br/> |
10 | <% end %> | 10 | <% end %> |
11 | 11 | ||
12 | <% button_bar do %> | 12 | <% button_bar do %> |