Sha256: 87aee03f33d7ab036aa3eb374d36adad9b2aadbd47ca0b2c8b9753f03864fbac
Contents?: true
Size: 1.02 KB
Versions: 11
Compression:
Stored size: 1.02 KB
Contents
<%= content_tag :h3, t('.subscription_fields') %> <%= fields_for :'subscription_line_item', SolidusSubscriptions::LineItem.new do |ff| %> <div> <%= ff.label :quantity, t('.quantity') %> <%= ff.number_field :quantity %> <%= ff.label :quantity, t('.quantity_suffix') %> </div> <div> <%= ff.label :interval_length, t('.interval_length') %> <%= ff.number_field :interval_length %> <%= ff.collection_radio_buttons :interval_units, SolidusSubscriptions::LineItem.interval_units.to_a, :first, :first %> </div> <%= ff.hidden_field :subscribable_id %> <% end %> <script> document.addEventListener("DOMContentLoaded", function(e) { var cartForm = document.querySelector('#cart-form form'); cartForm.addEventListener('submit', function(e) { var quantityInput = e.target.querySelector('[name*="quantity"]'); var subscriptionQuantityInput = e.target.querySelector('[name*="subscribable_id"]'); subscriptionQuantityInput.value = quantityInput.value; return true; }); }); </script>
Version data entries
11 entries across 11 versions & 2 rubygems