unclesp1d3r/CipherSwarm

View on GitHub
app/views/shared/attack_resource/_form.html.erb

Summary

Maintainability
Test Coverage
<%# locals: (resource:,projects:) -%>
<%= simple_form_for(resource) do |f| %>
  <%= render Railsboot::ErrorsComponent.new(resource) %>
  <div class="form-inputs">
    <%= f.input :name %>
    <%= f.input :description %>
    <%= f.input :file,
                input_html: { direct_upload: true } %>
    <%= f.association :projects, as: :radio_buttons, include_blank: false,
                                 collection: projects,
                                 hint: "Select the project to associate this list with. If none are selected, the list will be available to all projects." %>
  </div>
  <div class="form-actions">
    <%= f.button :submit, class: "btn btn-primary" %>
    <%= render Railsboot::ButtonComponent.new(tag: "a", href: url_for(controller: controller_name), variant: "danger", text: "Cancel") %>
  </div>
<% end %>