21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-01 16:30:49 +02:00
chexpire/app/views/notifications/_nested_form.html.erb
2018-08-02 00:29:53 +02:00

32 lines
1.2 KiB
Plaintext

<% # Copyright (C) 2018 Colin Darie <colin@darie.eu>, 2018 Jeremy Lecour <jlecour@evolix.fr>, 2018 Evolix <info@evolix.fr> %>
<% # License: GNU AGPL-3+ (see full text in LICENSE file) %>
<fieldset class="form-group">
<div class="form-row">
<%- if many_channels_available? %>
<div class="form-group col-md-2">
<%- if f.object.new_record? -%>
<%= f.input :channel, collection: Notification.channels.keys, label: false %>
<% else -%>
<%= f.input_field :channel, as: :string, readonly: true, class: "form-control-plaintext" %>
<%- end %>
</div>
<% end %>
<div class="form-group <%= recipient_col_class %>">
<%= f.input :recipient, as: :email, label: false %>
</div>
<div class="form-group col-md-2">
<%= f.input :interval, as: :integer, label: false %>
</div>
<div class="form-group col-md-1">
<% if f.object.persisted? %>
<%= link_to check_notification_path(check, f.object), method: :delete, remote: true, class: "btn btn-danger" do %>
<%== Octicons::Octicon.new("x", width: 15, height: 20).to_svg %>
<% end %>
<% end %>
</div>
</div>
</fieldset>