2012-10-15 05:54:29 +00:00
|
|
|
<div class="map-block back">
|
|
|
|
<h4><span><%= role.title %></span></h4>
|
|
|
|
<div class="form-horizontal">
|
2012-10-15 06:44:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-18 10:36:21 +00:00
|
|
|
<% role.sub_roles.each do |sub_role| %>
|
|
|
|
<% sub_role_disable = @disable_all_field ? true : !check_user_role_enable(sub_role.attribute_fields) %>
|
|
|
|
<%#= hidden_field_tag("[user][new_attribute_values][sub_role][disable][#{sub_role.id}]",sub_role_disable)%>
|
|
|
|
<legend><button for=<%=@form_index%> class="onoff pull-right <%= sub_role_disable ? 'disabled' : '' %> "><%= sub_role_disable ? 'ON' : 'OFF' %></button><%= sub_role.title %></legend>
|
|
|
|
<div class="controls-block <%= sub_role_disable ? 'hide' : '' %>" for=<%=@form_index%> >
|
2012-10-15 06:44:48 +00:00
|
|
|
<% sub_role.attribute_fields.each do |af|%>
|
2012-10-18 10:36:21 +00:00
|
|
|
<%= af.block_helper(@user,@form_index,sub_role_disable)%>
|
2012-10-15 05:54:29 +00:00
|
|
|
<% @form_index = @form_index +1 %>
|
|
|
|
<% end %>
|
2012-10-15 06:44:48 +00:00
|
|
|
</div>
|
2012-10-15 05:54:29 +00:00
|
|
|
|
2012-10-15 06:44:48 +00:00
|
|
|
<% end %>
|
2012-10-15 05:54:29 +00:00
|
|
|
|
2012-10-15 06:44:48 +00:00
|
|
|
|
2012-10-15 05:54:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|