mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 15:31:12 +00:00
"Required" and "Read-only" rules on "Fields Permissions" screen are not colored (#19580).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@14160 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
09eef4e75c
commit
b474ad67de
@ -65,7 +65,7 @@
|
|||||||
<%= name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
|
<%= name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
|
||||||
</td>
|
</td>
|
||||||
<% for status in @statuses -%>
|
<% for status in @statuses -%>
|
||||||
<td class="<%= @permissions[status.id][field] %>">
|
<td class="<%= @permissions[status.id][field].try(:join, ' ') %>">
|
||||||
<%= field_permission_tag(@permissions, status, field, @roles) %>
|
<%= field_permission_tag(@permissions, status, field, @roles) %>
|
||||||
<% unless status == @statuses.last %><a href="#" class="repeat-value">»</a><% end %>
|
<% unless status == @statuses.last %><a href="#" class="repeat-value">»</a><% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -257,6 +257,15 @@ class WorkflowsControllerTest < ActionController::TestCase
|
|||||||
assert_equal IssueStatus.sorted.to_a, assigns(:statuses)
|
assert_equal IssueStatus.sorted.to_a, assigns(:statuses)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_get_permissions_should_set_css_class
|
||||||
|
WorkflowPermission.delete_all
|
||||||
|
WorkflowPermission.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :field_name => 'assigned_to_id', :rule => 'required')
|
||||||
|
|
||||||
|
get :permissions, :role_id => 1, :tracker_id => 2
|
||||||
|
assert_response :success
|
||||||
|
assert_select 'td.required > select[name=?]', 'permissions[1][assigned_to_id]'
|
||||||
|
end
|
||||||
|
|
||||||
def test_post_permissions
|
def test_post_permissions
|
||||||
WorkflowPermission.delete_all
|
WorkflowPermission.delete_all
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user