Sha256: 9ff49d9282b0e9ca5c18987b4d803496205260277631ea612d4791a260592548

Contents?: true

Size: 1.53 KB

Versions: 97

Compression:

Stored size: 1.53 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 no-marginb">
  <%= 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 panel panel-default">
    <div class="panel-body">
      <div class="form-group">
        <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="form-group">
        <div class="input-group">
          <span class="input-group-addon">$</span>
          <input class="js-value-input form-control"
            name="{{valueField.name}}" type="text" value={{valueField.value}}>
        </div>
      </div>
      <a class="js-remove-tier btn btn-default btn-sm"><span class="icon icon-delete"></span></a>
    </div>
  </div>
</script>

Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
spree_backend-3.7.14.1 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.14 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.13 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.12 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.11 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.4.6 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.10 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.9 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.8 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.7 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.6 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.5 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.4 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.3 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.2 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.1 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.0 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.7.0.rc3 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.2.9 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
spree_backend-3.1.14 app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb