Sha256: 3a899f890465f6729acdb05eca06b8c2c03ae08afca38918cd88ab8190e242ba

Contents?: true

Size: 1.65 KB

Versions: 61

Compression:

Stored size: 1.65 KB

Contents

<div class="form-group">
  <%= label_tag "#{prefix}[calculator_attributes][preferred_base_amount]",
    Spree.t(:base_amount) %>
  <%= preference_field_tag(
    "#{prefix}[calculator_attributes][preferred_base_amount]",
    calculator.preferred_base_amount,
    type: calculator.preference_type(:base_amount)) %>
</div>

<div class="form-group mb-0">
  <%= label_tag nil, Spree.t(:tiers) %>
  <%= content_tag :div, nil, class: "hidden js-original-tiers",
    data: { :'original-tiers' => Hash[calculator.preferred_tiers.sort] } %>
</div>

<div class="js-tiers"></div>
<button class="btn btn-success 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="tier card mb-3">
    <div class="card-body p-3">
      <div class="form-group">
        <div class="input-group">
          <div class="input-group-prepend">
            <div class="input-group-text">$</div>
          </div>
          <input class="js-base-input form-control" type="text" value={{baseField.value}}>
        </div>
      </div>
      <div class="form-group">
        <div class="input-group">
          <div class="input-group-prepend">
            <div class="input-group-text">$</div>
          </div>
          <input class="js-value-input form-control"
            name="{{valueField.name}}" type="text" value={{valueField.value}}>
        </div>
      </div>
      <a class="js-remove-tier btn btn-outline-secondary btn-sm"><span class="icon icon-delete"></span></a>
    </div>
  </div>
</script>

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
spree_backend-4.1.13.1 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.0.7.1 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.3 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.2 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.1 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.0.7 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.0 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.0.rc5 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.0.rc4 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.0.rc3 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.1.13 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.0.6 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.0.rc2 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.0.5 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.1.12 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.0.rc1 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.0.4 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.1.11 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.1.10 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-4.2.0.beta app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb