Sha256: e98730fa0dca3f7bc6561a9033b103e058d1a060baeebb089a5fcd0c794e3d43

Contents?: true

Size: 854 Bytes

Versions: 16

Compression:

Stored size: 854 Bytes

Contents

<% amount_attr ||= :amount %>
<% currency_attr ||= :currency %>
<% currency ||= nil %>
<% required ||= nil %>

<div class="input-group number-with-currency <%= "number-with-currency-with-select" unless currency %> js-number-with-currency">
  <div class="input-group-addon number-with-currency-symbol"></div>
  <%= f.text_field amount_attr, value: number_to_currency(f.object.public_send(amount_attr), unit: ''), class: 'form-control number-with-currency-amount', required: required %>
  <% if currency %>
    <div class="input-group-addon number-with-currency-addon" data-currency="<%= currency %>">
      <%= ::Money::Currency.find(currency).iso_code %>
    </div>
  <% else %>
    <%= f.select currency_attr, ::Money::Currency.all.map(&:iso_code), {include_blank: true}, {required: required, class: 'number-with-currency-select'} %>
  <% end %>
</div>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
solidus_backend-2.4.2 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.4.1 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.3.1 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.2.2 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.4.0 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.4.0.rc1 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.4.0.beta1 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.3.0 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.3.0.rc3 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.3.0.rc2 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.3.0.rc1 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.3.0.beta1 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.2.1 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.2.0 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.2.0.rc1 app/views/spree/admin/shared/_number_with_currency.html.erb
solidus_backend-2.2.0.beta1 app/views/spree/admin/shared/_number_with_currency.html.erb