<% # Copyright (C) 2018 Colin Darie , 2018 Evolix %> <% # License: GNU AGPL-3+ (see full text in LICENSE file) %> <%= simple_form_for(check) do |f| %> <%= f.input :domain, autofocus: true, input_html: { autocapitalize: :none, autocorrect: :off }, label: t(".#{check.kind || "generic" }.domain") %> <% if check.new_record? %> <%= f.input :kind, as: check.kind.present? ? :hidden : :radio_buttons, collection: Check.kinds.keys %> <% end %> <%= f.input :comment %> <%= f.input :vendor %> <% if check.persisted? %> <%= f.input :active %> <% end %>

<%= t(".notifications") %>

<%= t(".notifications_hint") %>

<%- check.notifications.each_with_index do |notification, index| %>
<%= f.fields_for :notifications, notification do |nf| %> <%= render "notifications/nested_form_headers", f: nf if index.zero? %> <%= render "notifications/nested_form", f: nf, check: check %> <% end %>
<% end %> <%= f.button :submit, class: "btn-primary mt-5" %> <% end %>