Don't show attributes on role form for built-in roles.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@788 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/351/head
Jean-Philippe Lang 17 years ago
parent 50096526bc
commit ca094446b3
  1. 5
      app/views/roles/_form.rhtml
  2. 2
      app/views/roles/edit.rhtml

@ -1,10 +1,11 @@
<%= error_messages_for 'role' %> <%= error_messages_for 'role' %>
<% unless @role.builtin? %>
<div class="box"> <div class="box">
<p><%= f.text_field :name, :required => true, :disabled => @role.builtin? %></p> <p><%= f.text_field :name, :required => true %></p>
<p><%= f.check_box :assignable %></p> <p><%= f.check_box :assignable %></p>
</div> </div>
<% end %>
<h3><%= l(:label_permissions) %></h3> <h3><%= l(:label_permissions) %></h3>
<div class="box"> <div class="box">

@ -1,4 +1,4 @@
<h2><%=l(:label_role)%></h2> <h2><%=l(:label_role)%>: <%= @role.name %></h2>
<% labelled_tabular_form_for :role, @role, :url => { :action => 'edit' }, :html => {:id => 'role_form'} do |f| %> <% labelled_tabular_form_for :role, @role, :url => { :action => 'edit' }, :html => {:id => 'role_form'} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %> <%= render :partial => 'form', :locals => { :f => f } %>

Loading…
Cancel
Save