<%= javascript 'foreman_openscap/policy_edit' %> <%= javascript 'foreman_openscap/period_selector' %> <%= form_for @policy, :url => (@policy.id? ? policy_path(:id => @policy.id) : policies_path) do |f| %> <%= base_errors_for @policy %>
<%= text_f(f, :name) %> <%= textarea_f(f, :description, :rows => :auto ) %>
<%= scap_content_selector(f) %> <%= scap_content_profile_selector(f) %>
<%= select_f(f, :period, %w[Weekly Monthly Custom], :downcase, :to_s, { :include_blank => _('Choose period') }, { :onchange => 'period_selected(this)' }) %> <%= select_f(f, :weekday, days_of_week_hash, :first, :last, :include_blank => _('Choose weekday')) %> <%= select_f(f, :day_of_month, (1..31).to_a, :to_i, :to_s, :help_inline => _('Number of a day in month, note that not all months have same count of days')) %> <%= text_f(f, :cron_line, :help_inline => _('You can specify custom cron line, e.g. "0 3 * * *", separate each of 5 values by space')) %>
<%= render 'taxonomies/loc_org_tabs', :f => f, :obj => @policy %>
<%= multiple_selects f, :hostgroups, Hostgroup, @policy.hostgroup_ids, {:disabled => @policy.used_hostgroup_ids } %>
<%= submit_or_cancel f %>
<% end %>