Change submit button on block edit page when can only revoke
This commit is contained in:
parent
11a7bf7e0e
commit
76736bab4f
4 changed files with 14 additions and 5 deletions
|
@ -21,6 +21,8 @@
|
|||
<%= f.form_group :needs_view do %>
|
||||
<%= f.check_box :needs_view %>
|
||||
<% end %>
|
||||
|
||||
<%= f.primary %>
|
||||
<% else %>
|
||||
<div class="alert alert-info">
|
||||
<% if @user_block.active? %>
|
||||
|
@ -32,7 +34,11 @@
|
|||
|
||||
<%= hidden_field_tag "user_block_period", 0 %>
|
||||
<%= hidden_field_tag "user_block[needs_view]", false %>
|
||||
<% end %>
|
||||
|
||||
<%= f.primary %>
|
||||
<% if @user_block.active? %>
|
||||
<%= f.submit t(".revoke"), :class => "btn btn-danger" %>
|
||||
<% else %>
|
||||
<%= f.primary %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue