mirror of
https://github.com/Evolix/chexpire.git
synced 2024-06-29 12:32:53 +02:00
30 lines
959 B
Plaintext
30 lines
959 B
Plaintext
<%= simple_form_for(check) do |f| %>
|
|
<%= f.input :domain, autofocus: true, input_html: { autocapitalize: :none, autocorrect: :off } %>
|
|
|
|
<% if check.new_record? %>
|
|
<%= f.input :kind, as: :radio_buttons, collection: Check.kinds.keys if check.new_record? %>
|
|
<% end %>
|
|
|
|
<%= f.input :comment %>
|
|
<%= f.input :vendor %>
|
|
|
|
<% if check.persisted? %>
|
|
<%= f.input :active %>
|
|
<% end %>
|
|
|
|
<h2 class="mt-5"><%= t(".notifications") %></h2>
|
|
<p class="alert alert-light"><%= t(".notifications_hint") %></p>
|
|
|
|
<%- check.notifications.each_with_index do |notification, index| %>
|
|
<div data-notification-id="<%= notification.id %>">
|
|
<%= 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 %>
|
|
</div>
|
|
<% end %>
|
|
|
|
|
|
<%= f.button :submit, class: "btn-primary mt-5" %>
|
|
<% end %>
|