Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36718 - Mark required fields for policy #545

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/helpers/policies_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
adamruzicka marked this conversation as resolved.
Show resolved Hide resolved
: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
Expand Down
2 changes: 1 addition & 1 deletion app/views/policies/steps/_policy_attributes_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="tab-pane <%= show_partial_wizard(step) %>" id="create-policy">
<%= 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" ) %>
</div>
12 changes: 8 additions & 4 deletions app/views/policies/steps/_schedule_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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) %>
</div>
Loading