for user new interface, member role is working.
This commit is contained in:
1 parent
b301f6522a
commit
bd0d975014
15 files changed
+312
-90
No files matched your search
@@ -1,16 +1,19 @@
|
||||
<div class="map-block back">
|
||||
<div class="groups map-block back">
|
||||
<h4><span><%= role.title %></span></h4>
|
||||
<div class="form-horizontal">
|
||||
|
||||
|
||||
|
||||
<% role.sub_roles.each do |sub_role| %>
|
||||
<% sub_role_disable = @disable_all_field ? true : !check_user_role_enable(sub_role.attribute_fields) %>
|
||||
<% sub_role_disable = @user.sub_roles.include?(sub_role) ? false : true %>
|
||||
<%= 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)%>
|
||||
<%#= 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%> >
|
||||
<legend>
|
||||
<button for=<%=@form_index%> class="onoff pull-right <%= sub_role_disable ? 'disabled' : '' %> ">ON</button><%= sub_role.title %>
|
||||
</legend>
|
||||
<div class="controls-block <%= sub_role_disable ? 'hide' : '' %>" >
|
||||
<% sub_role.attribute_fields.each do |af|%>
|
||||
<%= af.block_helper(@user,@form_index,sub_role_disable)%>
|
||||
<%= af.block_helper(@user,@form_index)%>
|
||||
<% @form_index = @form_index +1 %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user