Sha256: 8528e99eb03d35ea088f919af831e242dac6232677b19be80c53ef7667d69d79
Contents?: true
Size: 1.41 KB
Versions: 6
Compression:
Stored size: 1.41 KB
Contents
= effective_form_with(model: [:admin, poll], engine: true) do |f| = f.text_field :title, hint: 'The title of your poll or election.' = f.datetime_field :start_at = f.datetime_field :end_at - if f.object.poll_notifications.present? .alert.alert-info Please be aware of the existing #{ets(f.object.poll_notifications)} when changing the start or end availability date. -# Audience - f.object.audience_class_name ||= current_user.class.name = f.hidden_field :audience_class_name = f.radios :audience, Effective::Poll::AUDIENCES = f.show_if :audience, 'All Users' do .card .card-body %h5 All Users %p All users may complete this #{etd(poll)} = f.show_if :audience, 'Individual Users' do .card .card-body %h5 Individual Users %p Only the following individual users may complete this #{etd(poll)} -# Audience Users - ajax_url = (@select2_users_ajax_path || effective_resources.users_admin_select2_ajax_index_path) unless Rails.env.test? = f.select :audience_scope, current_user.class.all, ajax_url: ajax_url, multiple: true = f.show_if :audience, 'Selected Users' do .card .card-body %h5 Selected Users %p Users within any of the following groups may complete this #{etd(poll)} = f.checks :audience_scope, effective_polls_audience_scope_collection(f.object), multiple: true = effective_submit(f)
Version data entries
6 entries across 6 versions & 1 rubygems