demarches-normaliennes/app/views/admin/procedures/check_availability.js.erb

12 lines
433 B
Text
Raw Normal View History

<% if @availability == Procedure::PATH_AVAILABLE %>
2018-09-04 14:53:18 +02:00
<%= 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) %>
2018-09-04 14:53:18 +02:00
<%= enable_element('button[type=submit]') %>
<% else %>
<%= disable_element('button[type=submit]') %>
2018-09-04 14:53:18 +02:00
<% end %>