Sha256: de242ea0b097d4ffd65a8ec6f6bd19ba2a28d6f9c863046bd4d35996176f9e5f
Contents?: true
Size: 1.07 KB
Versions: 9
Compression:
Stored size: 1.07 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, input_js: { minDate: Time.zone.now.beginning_of_day.strftime('%F') } = f.datetime_field :end_at -# Audience = 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 poll = f.show_if :audience, 'Individual Users' do .card .card-body %h5 Individual Users %p Only the following individual users may complete this poll - user_ids = User.respond_to?(:sorted) ? User.sorted : User.all = f.select :audience_scope, user_ids, multiple: true, label: false = f.show_if :audience, 'Selected Users' do .card .card-body %h5 Selected Users %p Users within any of the following groups may complete this poll = f.checks :audience_scope, effective_polls_audience_scope_collection(), multiple: true, label: false = effective_submit(f)
Version data entries
9 entries across 9 versions & 1 rubygems