ensure unique recipients
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<div id="submitters_error">
|
||||
<% if local_assigns[:error] %>
|
||||
<div class="text-center text-red-500">
|
||||
<%= local_assigns[:error] %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -28,6 +28,7 @@
|
||||
<div id="list" class="hidden">
|
||||
<%= render 'list_form', template: @template %>
|
||||
</div>
|
||||
<%= render 'submissions/error' %>
|
||||
</div>
|
||||
<%= content_for(:modal_extra) %>
|
||||
<% end %>
|
||||
|
||||
@@ -335,6 +335,18 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if can?(:manage, :personalization_advanced) %>
|
||||
<%= form_for @template, url: template_preferences_path(@template), method: :post, html: { autocomplete: 'off', class: 'mt-2' }, data: { close_on_submit: false } do |f| %>
|
||||
<div class="flex items-center mt-4 justify-between w-full">
|
||||
<span>
|
||||
<%= t('ensure_unique_recipients') %>
|
||||
</span>
|
||||
<%= f.fields_for :preferences, Struct.new(:validate_unique_submitters).new(@template.preferences['validate_unique_submitters']) do |ff| %>
|
||||
<%= ff.check_box :validate_unique_submitters, { class: 'toggle', onchange: 'this.form.requestSubmit()' }, 'true', '' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="form-control mt-5 pb-2">
|
||||
<%= button_tag button_title(title: t('save'), disabled_with: t('updating')), class: 'base-button', form: :submitters_form %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user