Sha256: 3367d1269e6889441f74939111b37993e5028cddd49076c54078e70da08857c0

Contents?: true

Size: 819 Bytes

Versions: 5

Compression:

Stored size: 819 Bytes

Contents

<%= form_with(
    model: @promotion_rule || SolidusFriendlyPromotions::PromotionRule.new(promotion: @promotion),
    scope: :promotion_rule,
    url: solidus_friendly_promotions.new_admin_promotion_promotion_rule_path(@promotion),
    method: :get
  ) do |form| %>
  <%= hidden_field_tag :level, @level %>
  <%= form.label :type %>
  <%= admin_hint SolidusFriendlyPromotions::PromotionRule.human_attribute_name(:type), t(:promotions, scope: [:solidus_friendly_promotions, :hints, "spree/calculator"]) %>
  <%=
    form.select :type,
      options_for_promotion_rule_types(form.object, level),
      {
        include_blank: t(:choose_promotion_rule, scope: 'solidus_friendly_promotions')
      },
      class: 'custom-select fullwidth',
      onchange: 'this.form.requestSubmit()',
      required: true
  %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_friendly_promotions-1.0.0 app/views/solidus_friendly_promotions/admin/promotion_rules/_type_select.html.erb
solidus_friendly_promotions-1.0.0.rc.3 app/views/solidus_friendly_promotions/admin/promotion_rules/_type_select.html.erb
solidus_friendly_promotions-1.0.0.rc.2 app/views/solidus_friendly_promotions/admin/promotion_rules/_type_select.html.erb
solidus_friendly_promotions-1.0.0.rc.1 app/views/solidus_friendly_promotions/admin/promotion_rules/_type_select.html.erb
solidus_friendly_promotions-1.0.0.pre app/views/solidus_friendly_promotions/admin/promotion_rules/_type_select.html.erb