Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide preferences side panel when creating a new payment method #292

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/views/spree/admin/payment_methods/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
</div>
</div>

<% unless @object.new_record? %>
<div class="col-12 col-md-6">
<div class="card mb-3">
<div class="card-header">
<h5 class="mb-0"><%= Spree.t(:payment_provider_settings) %></h5>
</div>
<div class="card-body">
<div id="preference-settings" data-hook class="form-group">
<% unless @object.new_record? %>
<% if preference_fields(@object, f).empty? %>
<%= Spree.t('no_payment_provider_settings_message') %>
<% end %>
Expand All @@ -72,10 +72,11 @@
<% if @object.respond_to?(:preferences) %>
<div id="gateway-settings-warning" class="info warning"><%= Spree.t(:provider_settings_warning) %></div>
<% end %>
<% end %>
</div>
</div>
</div>
</div>
<% end %>

</div>
</div>
Loading