From ca094446b3049ea1462c9e50228e061ffb7a7707 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 1 Oct 2007 14:00:38 +0000 Subject: [PATCH] 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 --- app/views/roles/_form.rhtml | 5 +++-- app/views/roles/edit.rhtml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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 } %> -- 2.39.5