<% # Its a hook only !!! %>

<p>
  <%= form.label :fixed_delay, l(:field_easy_gantt_fixed_delay) %>
  <%= form.check_box :fixed_delay %>

  <em class="small"><%= l(:text_easy_gantt_fixed_delay) %></em>
  <br>
  <span id="recalculate-fixed-delay" class="<%= 'hidden' if !form.object.fixed_delay %>">
    (<%= link_to l(:label_easy_gantt_recalculate_fixed_delay), easy_gantt_recalculate_fixed_delay_path, data: { confirm: l(:warning_easy_gantt_recalculate_fixed_delay) } %>)
  </span>
</p>

<p>
  <%= form.label l(:label_easy_gantt_critical_path) %>

  <label class="radio block">
    <%= form.radio_button :critical_path, 'disabled' %>
    <%= l('easy_gantt.critical_path.disabled') %>
  </label>

  <label class="radio block">
    <%= form.radio_button :critical_path, 'last' %>
    <%= l('easy_gantt.critical_path.last') %>
    <em>(<%= l('easy_gantt.critical_path.last_text') %>)</em>
  </label>

  <label class="radio block">
    <%= form.radio_button :critical_path, 'longest' %>
    <%= l('easy_gantt.critical_path.longest') %>
    <em>(<%= l('easy_gantt.critical_path.longest_text') %>)</em>
  </label>
</p>

<p>
  <%= form.label l(:label_show_lowest_progress_tasks) %>
  <%= form.check_box :show_lowest_progress_tasks %>
  <br>
  <em class="small"><%= l(:text_show_lowest_progress_tasks) %></em>
</p>

<script>
  $("#easy_setting_fixed_delay").on("change", function(){
    $("#recalculate-fixed-delay").css("display", (this.checked ? "inline" : "none"))
  })
</script>
