= effective_form_with(model: [:admin, event_ticket], engine: true) do |f| = f.hidden_field :event_id = card(et(Effective::EventTicket)) do = f.text_field :title .row .col = f.select :category, Effective::EventTicket::CATEGORIES, hint: "Determines who can purchase this ticket at which price. Also determines if the dropdown of related members is displayed to the purchaser." = f.show_if(:category, 'Regular') do .alert.alert-info.mb-4 %strong Regular Ticket: Anyone will be able to purchase this ticket. They will be asked for a first and last name. Will not display the dropdown list of all members. Only the regular price applies. = f.show_if(:category, 'Member Only') do .alert.alert-info.mb-4 %strong Member Only Ticket: Only members will be able to purchase this ticket. They must select a member from the dropdown list of all members. Only the member price applies. = f.show_if(:category, 'Member or Non-Member') do .alert.alert-info.mb-4 %strong Member or Non-Member Ticket: Anyone will be able to purchase this ticket. They can select a member from the dropdown list of all members to receive the member pricing or they can enter a first name and last name to receive the regular pricing. .col = f.number_field :capacity, hint: "The number of registrations will be limited to capacity. Leave blank for unlimited capacity." = f.check_box :display_capacity, label: "Yes, display the remaining ticket capacity to users during registration", hint: "Leave blank to hide the capacity." - if EffectiveEvents.delayed? - event_delayed = f.object.event&.delayed? - f.object.waitlist = false if !event_delayed = f.check_box :waitlist, label: "Yes, add to waitlist once capacity is reached", hint: "requires a event with delayed payment. Once capacity is reached, new registrations will be added to the waitlist. Payment information is collected but not charged for waitlisted registrants. To waitlist everyone and promote later, set the capacity to zero.", disabled: !event_delayed .row .col-md-6 = f.price_field :early_bird_price, hint: 'requires an event with early bird date. A price of $0 will allow a checkout for free. Leave blank for no early bird price.', disabled: !f.object.event&.early_bird_end_at.present? = f.show_if_any(:category, ['Regular', 'Member or Non-Member']) do = f.price_field :regular_price, hint: 'A price of $0 will allow a checkout for free.' = f.show_if_any(:category, ['Member Only']) do = f.static_field :regular_price, value: 'None' = f.show_if_any(:category, ['Member Only', 'Member or Non-Member']) do = f.price_field :member_price, hint: 'A price of $0 will allow a checkout for free when selecting a member.' .row - if defined?(EffectiveQbSync) .col-md-6= f.text_field :qb_item_name, label: 'QuickBooks item name' = f.check_box :tax_exempt = f.check_box :archived, label: 'Archive this ticket. While archived, it cannot be purchased by users but registrants can only be added by an admin.' = card('Questions') do %p %small.text-muted Please add up to 3 questions to ask during registration. Each ticket will have their own unique answers. Leave a question blank to skip. = f.text_field :question1, label: 'Question 1' = f.text_field :question2, label: 'Question 2' = f.text_field :question3, label: 'Question 3' = effective_submit(f)