diff --git a/app/helpers/policies_helper.rb b/app/helpers/policies_helper.rb index 81db1114..0a51cd81 100644 --- a/app/helpers/policies_helper.rb +++ b/app/helpers/policies_helper.rb @@ -55,11 +55,13 @@ def scap_content_selector(form) select_f form, :scap_content_id, scap_contents, :id, :title, { :include_blank => _("Choose existing SCAP Content") }, { :label => _("SCAP Content"), + :required => true, :onchange => 'scap_content_selected(this);', :'data-url' => method_path('scap_content_selected') } else select_f form, :scap_content_id, scap_contents, :id, :title, { :label => _("SCAP Content"), + :required => true, :onchange => 'scap_content_selected(this);', :'data-url' => method_path('scap_content_selected') } end diff --git a/app/views/policies/steps/_policy_attributes_form.html.erb b/app/views/policies/steps/_policy_attributes_form.html.erb index 679145e2..80333058 100644 --- a/app/views/policies/steps/_policy_attributes_form.html.erb +++ b/app/views/policies/steps/_policy_attributes_form.html.erb @@ -1,5 +1,5 @@
<%= wizard_header @policy.step_index, *translate_steps(@policy) %> - <%= text_f(f, :name) %> + <%= text_f(f, :name, :required => true) %> <%= text_f(f, :description, :size => "col-md-8" ) %>
diff --git a/app/views/policies/steps/_schedule_form.html.erb b/app/views/policies/steps/_schedule_form.html.erb index 6a65708b..fd2cc06c 100644 --- a/app/views/policies/steps/_schedule_form.html.erb +++ b/app/views/policies/steps/_schedule_form.html.erb @@ -4,8 +4,12 @@ <%= wizard_header @policy.step_index, *@policy.steps %> <%= 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'), :include_blank => _('Choose day in month')) %> - <%= text_f(f, :cron_line, :help_inline => _('You can specify custom cron line, e.g. "0 3 * * *", separate each of 5 values by space')) %> + { :onchange => 'period_selected(this)', :required => true }) %> + <%= select_f(f, :weekday, days_of_week_hash, :first, :last, + { :include_blank => _('Choose weekday') }, + { :required => true }) %> + <%= select_f(f, :day_of_month, (1..31).to_a, :to_i, :to_s, + { :include_blank => _('Choose day in month') }, + { :help_inline => _('Number of a day in month, note that not all months have same count of days'), :required => true }) %> + <%= text_f(f, :cron_line, :help_inline => _('You can specify custom cron line, e.g. "0 3 * * *", separate each of 5 values by space'), :required => true) %>