Sha256: b66c03568b268dd644645f67d44651e75fc69ae6029685718446cf75946135ef
Contents?: true
Size: 1.74 KB
Versions: 2
Compression:
Stored size: 1.74 KB
Contents
<div data-hook="admin_user_form_fields" class="row"> <div class="alpha six columns"> <%= f.field_container :name do %> <%= f.label :name, Spree.t(:name) %> <%= f.text_field :name, class: 'fullwidth' %> <%= error_message_on :user, :name %> <% end %> <%= f.field_container :partial do %> <%= f.label :partial, Spree.t(:partial) + " (leave blank if no partial) " %> <p>app/views/spree/affiliates/<%= f.text_field :partial %></p> <%= f.error_message_on :partial %> <% end %> </div> <div class="omega six columns"> <%= f.field_container :path do %> <%= f.label :path, Spree.t(:path) %> <%= f.text_field :path, class: 'fullwidth' %> <%= f.error_message_on :path %> <% end %> <%= f.field_container :path do %> <%= f.label :layout, Spree.t(:layout) %> <%= select_tag 'fake_layout', options_for_select(@layout_options, selected: @affiliate.layout), class: "fullwidth #{'other' unless @layout_options.flatten.include?(@affiliate.layout)}" %> <%= f.text_field :layout, value: @affiliate.layout.nil? ? @layout_options.first : @affiliate.layout, class: 'fullwidth' %> <script> var fake_layout = $("#fake_layout"), affiliate_layout = $("#affiliate_layout"); fake_layout.on("change", function(){ affiliate_layout.hide(); if ($(this).val() != '') { affiliate_layout.val($(this).val()); } else { affiliate_layout.val('layouts/application').show().focus(); } }); if (!fake_layout.hasClass('other')) { affiliate_layout.hide(); } else { fake_layout.val(''); } </script> <%= f.error_message_on :layout %> <% end %> </div> </div>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_reffiliate-2.4.1 | app/views/spree/admin/affiliates/_form.html.erb |
spree_reffiliate-2.3.1 | app/views/spree/admin/affiliates/_form.html.erb |