Sha256: 51d7546d0d07690c4606365d4755d69ec313146a4311c2e58486281d993d2e68
Contents?: true
Size: 1.8 KB
Versions: 2
Compression:
Stored size: 1.8 KB
Contents
<div class="panel panel-default"> <div class="panel-heading ui-draggable-handle"> <h4><span class="fa fa-money"></span> <%= @tax_rate.new_record? ? t('plugin.ecommerce.new_tax_rate') : "#{t('plugin.ecommerce.edit_tax_rate')}: #{@tax_rate.name}" %></h4> </div> <%= form_for @tax_rate, url:{action: @tax_rate.new_record? ? :create : :update}, html: {class: 'validate-tax_rate', id: 'form-tax_rate'} do |f| %> <div class="panel-body"> <%= render partial: 'layouts/camaleon_cms/admin/form_error', locals: {data: @tax_rate} %> <div class="form-group"> <%= f.label t('camaleon_cms.admin.table.name') %><br> <%= f.text_field :name, :class => "form-control required" %> </div> <% options = params[:options].present? ? params[:options] : @tax_rate.options rescue {} %> <div class="form-group"> <label for=""><%= t('plugin.ecommerce.table.rate') %></label> (%)<br> <%= number_field_tag "options[rate]", options[:rate] || '', :class => "form-control required" %> </div> <div class="form-group"> <label><%= f.check_box :status %> <%= t('plugin.ecommerce.active')%></label> </div> </div> <div class="panel-footer"> <a class="btn btn-default" href="<%= url_for action: :index %>" role="back"><%= t('camaleon_cms.admin.button.back')%></a> <button class="btn btn-primary pull-right" type="submit"><%= t('camaleon_cms.admin.button.submit')%></button> </div> <% end %> </div> <script> jQuery(function(){ jQuery( '#form-tax_rate' ).on( "change", '#options_rate', function() {setTimeout(function(){jQuery(this).val(Math.abs(jQuery(this).val()) || 0);}.bind(this), 60)}); }) </script>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
camaleon_ecommerce-1.2 | app/views/plugins/ecommerce/admin/tax_rates/form.html.erb |
camaleon_ecommerce-1.1 | app/views/plugins/ecommerce/admin/tax_rates/form.html.erb |