diff --git a/app/views/access_levels/_form.html.erb b/app/views/access_levels/_form.html.erb
index ce642853..c1c8e195 100644
--- a/app/views/access_levels/_form.html.erb
+++ b/app/views/access_levels/_form.html.erb
@@ -2,12 +2,12 @@
<%= form_for [object.event, object], remote: true do |f| %>
<%= f.text_field :name, class: 'form-control' %> |
<%= f.number_field :capacity, class: 'form-control', placeholder: 0 %> |
- <%= f.text_field :price, value: nice_amount(f.object.price), class: 'form-control', placeholder: "0.00" , disabled: f.object.registrations? %> |
+ <%= f.text_field :price, value: nice_amount(f.object.price), class: 'form-control', placeholder: "0.00", disabled: f.object.registrations.any? %> |
- <%= f.collection_select :permit, AccessLevel.permits.keys, :itself, lambda {|k| translate(k)}, {}, class: 'form-control', disabled: f.object.registrations? %>
+ <%= f.collection_select :permit, AccessLevel.permits.keys, :itself, lambda {|k| translate(k)}, {}, class: 'form-control', disabled: f.object.registrations.any? %>
|
- <%= f.check_box :has_comment, disabled: f.object.registrations? %> |
- <%= f.check_box :hidden, disabled: f.object.registrations? %> |
+ <%= f.check_box :has_comment, disabled: f.object.registrations.any? %> |
+ <%= f.check_box :hidden, disabled: f.object.registrations.any? %> |
<%= f.button button_name, class: 'btn btn-sm btn-primary' %> |
<%= javascript_tag do %>
var id = "#<% if button_name == 'Save' %>edit_<% end %><%= dom_id(f.object) %>";