demarches-normaliennes/app/views/admin/procedures/check_availability.js.erb
2018-10-30 15:59:37 +01:00

11 lines
433 B
Text

<% if @availability == Procedure::PATH_AVAILABLE %>
<%= remove_element('.unavailable-path-message', inner: true) %>
<% else %>
<%= render_to_element('.unavailable-path-message', partial: 'unavailable', locals: { availability: @availability }) %>
<% end %>
<% if @availability.in?(Procedure::PATH_CAN_PUBLISH) %>
<%= enable_element('button[type=submit]') %>
<% else %>
<%= disable_element('button[type=submit]') %>
<% end %>