<% if agent.is_form_configurable? %>
<% if agent.persisted? %> <%= hidden_field_tag 'agent[type]', @agent.type %> <% end %> Options <% agent.form_configurable_attributes.each do |attribute| %>
<%= label_tag attribute %> <%= agent.option_field_for(attribute) %>
<% end %>
<% else %>
<%= label_tag :options %>
<% end %>
<%= submit_tag "Save", :class => "btn btn-primary" %> <% if agent.can_dry_run? %> <%= button_tag class: 'btn btn-default agent-dry-run-button', type: 'button', 'data-action-url' => agent.persisted? ? agent_dry_runs_path(agent) : dry_runs_path(type: agent.type), 'data-with-event-mode' => agent_dry_run_with_event_mode(agent) do %><%= icon_tag('glyphicon-refresh') %> Dry Run<% end %> <% end %>