Sha256: a1f543d652d785060b792c5c03e666bdcfa327b066d67ca67ae609b9a2bc2638
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
<% amount_attr ||= :amount %> <% currency_attr ||= :currency %> <% currency ||= nil %> <% required ||= nil %> <number-with-currency class="input-group number-with-currency <%= "number-with-currency-with-select" unless currency %>"> <div class="input-group-prepend"> <span class="input-group-text number-with-currency-symbol"></span> </div> <%= f.text_field amount_attr, value: number_to_currency(f.object.public_send(amount_attr), unit: '', delimiter: ''), class: 'form-control number-with-currency-amount', required: required %> <% if currency %> <div class="input-group-append"> <span class="input-group-text number-with-currency-addon" data-currency="<%= currency %>"> <%= ::Money::Currency.find(currency).iso_code %> </span> </div> <% else %> <%= f.select currency_attr, Spree::Config.available_currencies.map(&:iso_code), {selected: f.object.send(currency_attr) || Spree::Config.currency}, {required: required, class: 'number-with-currency-select'} %> <% end %> </number-with-currency>
Version data entries
6 entries across 6 versions & 2 rubygems