21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-06 10:45:10 +02:00
chexpire/app/views/notifications/_nested_form.html.erb

28 lines
1,023 B
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 <%= notification_variable_col_class %>">
<%= f.input :recipient, as: :email, label: false %>
</div>
<div class="form-group col-md-2">
<%= f.input :interval, as: :integer, label: false, required: true %>
</div>
<div class="form-group <%= notification_variable_col_class %>">
<%= f.input :label, label: false %>
</div>
</div>
</fieldset>