Sha256: cd8128c9f07498ac8e8847cb320a682450689c12dd24a0277312f9f4c54ab53f

Contents?: true

Size: 941 Bytes

Versions: 1

Compression:

Stored size: 941 Bytes

Contents

function scap_content_selected(element){
  var attrs = attribute_hash(['scap_content_id']);
  var url = $(element).attr('data-url');
  foreman.tools.showSpinner();
  $.ajax({
    data: attrs,
    type: 'post',
    url: url,
    complete: function() { reloadOnAjaxComplete($(element));},
    success: function(request) {
      $('#scap_content_profile_select').html(request);
    }
  })
}

function previous_step(previous) {
  $('#policy_current_step').val(previous);
  $('#new_policy').submit();
}

function period_selected(period) {
  $("#policy_weekday, #policy_day_of_month, #policy_cron_line").closest("div.clearfix").hide();
  switch($(period).val()) {
    case 'weekly':
      field = "#policy_weekday";
      break;
    case 'monthly':
      field = "#policy_day_of_month";
      break;
    case 'custom':
      field = "#policy_cron_line";
      break;
    default:
      field = "";
  }
  $(field).closest("div.clearfix").show();
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foreman_openscap-0.5.4 app/assets/javascripts/foreman_openscap/policy_edit.js