From: Jean-Philippe Lang Date: Mon, 1 Oct 2007 14:00:38 +0000 (+0000) Subject: Don't show attributes on role form for built-in roles. X-Git-Tag: 0.6.0~94 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ca094446b3049ea1462c9e50228e061ffb7a7707;p=redmine.git 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 --- diff --git a/app/views/roles/_form.rhtml b/app/views/roles/_form.rhtml index 73299293e..8dab8129a 100644 --- a/app/views/roles/_form.rhtml +++ b/app/views/roles/_form.rhtml @@ -1,10 +1,11 @@ <%= error_messages_for 'role' %> +<% unless @role.builtin? %>
-

<%= f.text_field :name, :required => true, :disabled => @role.builtin? %>

+

<%= f.text_field :name, :required => true %>

<%= f.check_box :assignable %>

- +<% end %>

<%= l(:label_permissions) %>

diff --git a/app/views/roles/edit.rhtml b/app/views/roles/edit.rhtml index 4a591e3e4..e53a0f545 100644 --- a/app/views/roles/edit.rhtml +++ b/app/views/roles/edit.rhtml @@ -1,4 +1,4 @@ -

<%=l(:label_role)%>

+

<%=l(:label_role)%>: <%= @role.name %>

<% labelled_tabular_form_for :role, @role, :url => { :action => 'edit' }, :html => {:id => 'role_form'} do |f| %> <%= render :partial => 'form', :locals => { :f => f } %>