Orbit/app/views/admin/users_new_interface/_role.html.erb

25 lines
987 B
Plaintext
Raw Normal View History

<div class="groups map-block back">
2012-10-15 05:54:29 +00:00
<h4><span><%= role.title %></span></h4>
<div class="form-horizontal">
2012-10-18 10:36:21 +00:00
<% role.sub_roles.each do |sub_role| %>
<% sub_role_disable = @user.sub_roles.include?(sub_role) ? false : true %>
2012-10-18 10:36:21 +00:00
<%#= hidden_field_tag("[user][new_attribute_values][sub_role][disable][#{sub_role.id}]",sub_role_disable)%>
<legend>
2012-11-27 03:15:15 +00:00
<button for=<%=@form_index%> class="onoff pull-right <%= sub_role_disable ? 'disabled' : '' %> "><%= t(:on_upcase) %></button><%= sub_role.title %>
<%= hidden_field_tag("user[disable_sub_role][id][#{sub_role.id}]",sub_role_disable,:for=>@form_index,:class=>"subrole_disable_field",:value=>sub_role_disable)%>
</legend>
<div class="controls-block <%= sub_role_disable ? 'hide' : '' %>" >
<% sub_role.attribute_fields.each do |af|%>
<%= af.block_helper(@user,@form_index)%>
2012-10-15 05:54:29 +00:00
<% @form_index = @form_index +1 %>
<% end %>
</div>
2012-10-15 05:54:29 +00:00
<% end %>
2012-10-15 05:54:29 +00:00
2012-10-15 05:54:29 +00:00
</div>
</div>