%= form_for @application_schedule do |f| %>
<% if @application_schedule.errors.any? %>
<%= pluralize(@application_schedule.errors.count, 'error') %> prohibited this application schedule from being saved:
<% end %>
<%= f.hidden_field :application_id, value: @application_schedule.application_id %>
<%= f.label "Application" %>
<%= @application_schedule.application.title %>
<%= f.label :application_run_group_restriction_id, "Application run group restriction*" %>
<%= f.select(:application_run_group_restriction_id,
::Naf::ApplicationRunGroupRestriction.all.map { |a| [a.application_run_group_restriction_name, a.id] },
include_blank: true) %>
<%= f.label :application_run_group_name %>
<%= select_tag(:run_group_name_type, options_for_select([["custom", "custom"],
["command", "command"],
["not set", "not set"]],
@run_group_name_type)) %>
<%= f.text_area :application_run_group_name, rows: 4, cols: 32, placeholder: "Please input Application Run Group Name" %>
<%= f.label :run_interval, "Run Interval (minutes)" %>
<%= f.text_field :run_interval %>
<%= f.label :run_interval_style_id, "Run Interval Style*" %>
<%= f.select(:run_interval_style_id,
::Naf::RunIntervalStyle.all.map { |s| [s.name, s.id] },
include_blank: true) %>
<%= f.label :priority %>
<%= f.text_field :priority %>
<%= f.label :application_run_group_limit %>
<%= f.text_field :application_run_group_limit %>
<%= f.label :application_run_group_quantum%>
<%= f.text_field :application_run_group_quantum %>
<%= f.label :enabled %>
<%= f.check_box :enabled %>
<%= f.label :visible %>
<%= f.check_box :visible %>
<%= f.label :enqueue_backlogs %>
<%= f.check_box :enqueue_backlogs %>
<% if @show_prerequisite %>
<%= f.fields_for :application_schedule_prerequisites do |builder| %>
<%= render "application_schedule_prerequisites", f: builder %>
<% end %>
<% else %>
<% f.fields_for :application_schedule_prerequisites do |builder| %>
<%= render "application_schedule_prerequisites", f: builder %>
<% end %>
<% end %>
<%= naf_link_to_add_fields "Add Schedule Prerequisite", f, :application_schedule_prerequisites %>
<%= f.submit %>
<% end %>
<% content_for :javascripts do %>
<% end %>