<%= render 'shared/turbo_modal', title: 'New Recipients' do %> <%= form_for '', url: template_submissions_path(@template), html: { class: 'space-y-4', autocomplete: 'off' }, data: { turbo_frame: :_top } do |f| %> <% if @template.submitters.size == 1 %>
<%= f.label :emails, class: 'label' %> <%= f.text_area :emails, required: true, class: 'base-textarea w-full' %>
<% else %>
<% @template.submitters.each do |item| %>
<% end %>
<%= svg_icon('user_plus', class: 'w-4 h-4 stroke-2') %> Add Recipient
<% end %>
<% is_smtp_configured = Accounts.can_send_emails?(current_account) %> <%= f.label :send_email, class: 'flex items-center cursor-pointer' do %> <%= f.check_box :send_email, class: 'base-checkbox', disabled: !is_smtp_configured, onchange: "window.message_field && message_field.classList.toggle('hidden', !event.currentTarget.checked)" %> Send Email <% end %> <% unless is_smtp_configured %>
<%= svg_icon('info_circle', class: 'w-6 h-6') %>

SMTP not Configured

Configure SMTP settings in order to send emails:
Go to SMTP settings

<% end %>
<% unless AccountConfig.exists?(key: AccountConfig::SUBMITTER_INVITATION_EMAIL_KEY) %> <% end %>
<%= f.button button_title(title: 'Add Recipients'), class: 'base-button' %>
<% end %> <% end %>