Sha256: fe7bbd6e1bcf2437ee164a6eed0c54c326983db8be203b40970884082d2d5353

Contents?: true

Size: 1.4 KB

Versions: 39

Compression:

Stored size: 1.4 KB

Contents

<%= label_tag "#{prefix}[calculator_attributes][preferred_base_percent]",
  Spree.t(:base_percent) %>
<%= preference_field_tag(
  "#{prefix}[calculator_attributes][preferred_base_percent]",
  calculator.preferred_base_percent,
  type: calculator.preference_type(:base_percent)) %>

<%= label_tag nil, Spree.t(:tiers) %>
<%= content_tag :div, nil, class: "hidden js-original-tiers",
  data: { :'original-tiers' => Hash[calculator.preferred_tiers.sort] } %>
<div class="js-tiers"></div>
<button class="fa fa-plus button js-add-tier"><%= Spree.t(:add) %></button>

<script type="text/x-handlebars-template" id="tier-input-name">
  <%= prefix %>[calculator_attributes][preferred_tiers][{{base}}]
</script>

<script type="text/x-handlebars-template" id="tier-fields-template">
  <div class="fullwidth tier">
    <a class="fa fa-trash remove js-remove-tier"></a>
    <div class="two columns alpha omega">
      <div class="input-group">
        <span class="input-group-addon">$</span>
        <input class="js-base-input form-control" type="text" value={{baseField.value}}>
      </div>
    </div>
    <div class="two columns alpha omega right">
      <div class="input-group">
        <input class="js-value-input form-control right-align"
          name="{{valueField.name}}" type="text" value={{valueField.value}}>
        <span class="input-group-addon">%</span>
      </div>
    </div>
    <div class="clear"></div>
  </div>
</script>

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
solidus_backend-1.0.7 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.6 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.5 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.4 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.3 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.2 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
spree_backend-2.4.10 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
spree_backend-2.3.13 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.1 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.0 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.0.rc2 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.0.rc1 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
spree_backend-2.4.9 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
spree_backend-2.3.12 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.0.pre3 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.0.pre2 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
spree_backend-2.4.8 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
spree_backend-2.3.11 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
solidus_backend-1.0.0.pre app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
spree_backend-2.4.7 app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb