app/views/plugins/ecommerce/admin/payment_methods/form.html.erb in camaleon_ecommerce-1.2 vs app/views/plugins/ecommerce/admin/payment_methods/form.html.erb in camaleon_ecommerce-1.2.1

- old
+ new

@@ -1,120 +1,126 @@ <div class="panel panel-default"> <div class="panel-heading ui-draggable-handle"> - <h4><span class="fa fa-credit-card"></span> <%= @payment_method.new_record? ? "#{t('plugin.ecommerce.new_payment_methods')}" : "#{t('plugin.ecommerce.edit_payment_methods')}: #{@payment_method.name}" %></h4> + <h4><span class="fa fa-credit-card"></span> <%= @payment_method.new_record? ? "#{t('plugins.ecommerce.new_payment_methods')}" : "#{t('plugins.ecommerce.edit_payment_methods')}: #{@payment_method.name}" %></h4> </div> <%= form_for @payment_method, url:{action: @payment_method.new_record? ? :create : :update}, html: {class: 'validate-payment_method', id: 'form-payment_method'} do |f| %> <div class="panel-body"> <%= render partial: 'layouts/camaleon_cms/admin/form_error', locals: {data: @payment_method} %> <div class="form-group"> - <%= f.label t('plugin.ecommerce.table.name') %><br> + <%= f.label t('plugins.ecommerce.table.name') %><br> <%= f.text_field :name, :class => "form-control required" %> </div> <div class="form-group hidden"> <%= f.label t('camaleon_cms.admin.table.slug') %><br> <%= f.text_field :slug, :class => "form-control slug", "data-parent" => 'plugins_ecommerce_payment_method_name' %> </div> <div class="form-group"> - <%= f.label t('plugin.ecommerce.table.description') %><br> + <%= f.label t('plugins.ecommerce.table.description') %><br> <%= f.text_area :description, :class => "form-control translatable", :rows => 4 %> </div> <div class="form-group"> - <label><%= f.check_box :status %> &nbsp; <%= t('plugin.ecommerce.active') %> </label> + <label><%= f.check_box :status %> &nbsp; <%= t('plugins.ecommerce.active') %> </label> </div> <% options = @payment_method.options rescue {type: 'bank_transfer'} options = params[:options] if params[:options].present? %> - <h4><%= t('plugin.ecommerce.options_payment_methods') %></h4> + <h4><%= t('plugins.ecommerce.options_payment_methods') %></h4> <hr/> <div id="tab-select-payment-method" class="panel panel-default tabs"> <ul class="nav nav-tabs nav-justified"> - <li class="<%= 'active' if options[:type] == 'bank_transfer' %>"><a href="#tab8" data-toggle="tab"><%= t('plugin.ecommerce.by_bank_transfer') %></a></li> - <li class="<%= 'active' if options[:type] == 'paypal' %>"><a href="#tab9" data-toggle="tab"><%= t('plugin.ecommerce.by_paypal') %></a></li> - <li class="<%= 'active' if options[:type] == 'authorize_net' %>"><a href="#tab10" data-toggle="tab"><%= t('plugin.ecommerce.by_authorize_net') %></a></li> - <li class="<%= 'active' if options[:type] == 'stripe' %>"><a href="#tab11" data-toggle="tab"><%= t('plugin.ecommerce.by_stripe', default: 'Stripe') %></a></li> + <li class="<%= 'active' if options[:type] == 'bank_transfer' %>"><a href="#tab8" data-toggle="tab"><%= t('plugins.ecommerce.by_bank_transfer') %></a></li> + <li class="<%= 'active' if options[:type] == 'on_delivery' %>"><a href="#tab_on_delivery" data-toggle="tab"><%= t('plugins.ecommerce.by_on_delivery', default: 'Payment on delivery') %></a></li> + <li class="<%= 'active' if options[:type] == 'paypal' %>"><a href="#tab9" data-toggle="tab"><%= t('plugins.ecommerce.by_paypal') %></a></li> + <li class="<%= 'active' if options[:type] == 'authorize_net' %>"><a href="#tab10" data-toggle="tab"><%= t('plugins.ecommerce.by_authorize_net') %></a></li> + <li class="<%= 'active' if options[:type] == 'stripe' %>"><a href="#tab11" data-toggle="tab"><%= t('plugins.ecommerce.by_stripe', default: 'Stripe') %></a></li> <% ecommerce_custom_payment_methods.each do |k, obj| %> <li class="<%= 'active' if options[:type] == k %>"><a href="#tab_<%= k %>" data-toggle="tab"><%= obj[:title] %></a></li> <% end %> </ul> <div class="panel-body tab-content"> <div class="tab-pane <%= 'active' if options[:type] == 'bank_transfer' %>" id="tab8"> <%= hidden_field_tag( "options[type]", 'bank_transfer') %> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.number_account_bank') %></label><br> + <label><%= t('plugins.ecommerce.table.number_account_bank') %></label><br> <%= text_field_tag( "options[bank_transfer_number_account]", options[:bank_transfer_number_account], class: "form-control required") %> </div> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.details') %></label><br> + <label><%= t('plugins.ecommerce.table.details') %></label><br> <%= text_area_tag( "options[bank_transfer_detail]", options[:bank_transfer_detail], class: "form-control required") %> </div> </div> <div class="tab-pane <%= 'active' if options[:type] == 'paypal' %>" id="tab9"> + <a href="http://support.berta.me/kb/online-shop/how-to-get-paypal-api-username-password-and-signature-information">Steps here: http://support.berta.me/kb/online-shop/how-to-get-paypal-api-username-password-and-signature-information</a> <%= hidden_field_tag( "options[type]", 'paypal') %> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.username_login') %></label><br> + <label><%= t('plugins.ecommerce.table.username_login') %></label><br> <%= text_field_tag( "options[paypal_login]", options[:paypal_login], class: "form-control required") %> </div> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.password') %></label><br> + <label><%= t('plugins.ecommerce.table.password') %></label><br> <%= text_field_tag( "options[paypal_password]", options[:paypal_password], class: "form-control required") %> </div> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.signature') %></label><br> + <label><%= t('plugins.ecommerce.table.signature') %></label><br> <%= text_field_tag( "options[paypal_signature]", options[:paypal_signature], class: "form-control required") %> </div> <div class="form-group"> - <div class="checkbox"><label><input type="checkbox" name="options[paypal_sandbox]" value="1" <%= 'checked' if options[:paypal_sandbox] %>> <%= t('plugin.ecommerce.table.sandbox') %> </label></div> + <div class="checkbox"><label><input type="checkbox" name="options[paypal_sandbox]" value="1" <%= 'checked' if options[:paypal_sandbox] %>> <%= t('plugins.ecommerce.table.sandbox') %> </label></div> </div> </div> <div class="tab-pane <%= 'active' if options[:type] == 'credit_card' %>" id="tab7"> <%= hidden_field_tag( "options[type]", 'credit_card') %> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.username_login') %></label><br> + <label><%= t('plugins.ecommerce.table.username_login') %></label><br> <%= text_field_tag( "options[cc_paypal_login]", options[:cc_paypal_login], class: "form-control required") %> </div> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.password') %></label><br> + <label><%= t('plugins.ecommerce.table.password') %></label><br> <%= text_field_tag( "options[cc_paypal_password]", options[:cc_paypal_password], class: "form-control required") %> </div> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.signature') %></label><br> + <label><%= t('plugins.ecommerce.table.signature') %></label><br> <%= text_field_tag( "options[cc_paypal_signature]", options[:cc_paypal_signature], class: "form-control required") %> </div> <div class="form-group"> - <div class="checkbox"><label><input type="checkbox" name="options[cc_paypal_sandbox]" value="1" <%= 'checked' if options[:cc_paypal_sandbox] %>> <%= t('plugin.ecommerce.table.sandbox') %> </label></div> + <div class="checkbox"><label><input type="checkbox" name="options[cc_paypal_sandbox]" value="1" <%= 'checked' if options[:cc_paypal_sandbox] %>> <%= t('plugins.ecommerce.table.sandbox') %> </label></div> </div> </div> <div class="tab-pane <%= 'active' if options[:type] == 'authorize_net' %>" id="tab10"> <%= hidden_field_tag('options[type]', 'authorize_net') %> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.login_id') %></label><br> + <label><%= t('plugins.ecommerce.table.login_id') %></label><br> <%= text_field_tag('options[authorize_net_login_id]', options[:authorize_net_login_id], class: 'form-control required') %> </div> <div class="form-group"> - <label><%= t('plugin.ecommerce.table.transaction_key') %></label><br> + <label><%= t('plugins.ecommerce.table.transaction_key') %></label><br> <%= text_field_tag('options[authorize_net_transaction_key]', options[:authorize_net_transaction_key], class: 'form-control required') %> </div> <div class="form-group"> <div class="checkbox"> <label> - <input type="checkbox" name="options[authorize_net_sandbox]" value="1" <%= 'checked' if options[:authorize_net_sandbox] %>> <%= t('plugin.ecommerce.table.sandbox') %> + <input type="checkbox" name="options[authorize_net_sandbox]" value="1" <%= 'checked' if options[:authorize_net_sandbox] %>> <%= t('plugins.ecommerce.table.sandbox') %> </label> </div> </div> </div> + <div class="tab-pane <%= 'active' if options[:type] == 'on_delivery' %>" id="tab_on_delivery"> + <%= hidden_field_tag('options[type]', 'on_delivery') %> + <h3><i class="fa fa-check-circle"></i></h3> + </div> <div class="tab-pane <%= 'active' if options[:type] == 'stripe' %>" id="tab11"> <%= hidden_field_tag('options[type]', 'stripe') %> <div class="form-group"> - <label><%= t('plugin.ecommerce.stripe_scret_key', default: 'Secret Key') %></label><br> + <label><%= t('plugins.ecommerce.stripe_scret_key', default: 'Secret Key') %></label><br> <%= text_field_tag('options[stripe_id]', options[:stripe_id], class: 'form-control required') %> </div> <div class="form-group"> - <label><%= t('plugin.ecommerce.stripe_publish_key', default: 'Publishable Key') %></label><br> + <label><%= t('plugins.ecommerce.stripe_publish_key', default: 'Publishable Key') %></label><br> <%= text_field_tag('options[stripe_key]', options[:stripe_key], class: 'form-control required') %> </div> </div> <% ecommerce_custom_payment_methods.each do |k, obj| %>