diff --git a/app/views/settings/payment_method_settings/_form.html.erb b/app/views/settings/payment_method_settings/_form.html.erb index 1b2af479..66e22fab 100755 --- a/app/views/settings/payment_method_settings/_form.html.erb +++ b/app/views/settings/payment_method_settings/_form.html.erb @@ -1,39 +1,69 @@ <% breadcrumb_add t("payment_methods"), settings_payment_method_settings_path, settings_payment_method_settings_path, t("views.btn.#{action_name}") %>
-
-
-
- <%= simple_form_for([:settings, @settings_payment_method_setting]) do |f| %> - <%= f.error_notification %> +
+
+
+ <%= simple_form_for([:settings, @settings_payment_method_setting]) do |f| %> + <%= f.error_notification %> -
- <%= f.input :payment_method %> - <%= f.input :is_active %> - - <%= f.input :gateway_communication_type,:class=>'gateway_type', collection: [ "Api", "Device", "Manual"] %> - <%= f.input :gateway_url ,:class=>'gateway_type', :required => true %> - <%= f.input :auth_token ,:class=>'auth_token', :required => true %> - <%= f.input :merchant_account_id ,:class=>'merchant_id', :required => true%> - <%= f.input :additional_parameters, as: :text %> +
+ <%= f.input :payment_method %> + <%= f.input :is_active %> + <%= f.input :gateway_communication_type, collection: [ "Api", "Device", "Manual"] %> + <%= f.input :gateway_url, required: true %> + <%= f.input :auth_token, required: true %> + <%= f.input :merchant_account_id, required: true %> + +
+ <%= f.label :additional_parameters, 'Additional Parameters (Key-Value Pairs)' %> +
+ <% if @settings_payment_method_setting.additional_parameters.present? %> + <% JSON.parse(@settings_payment_method_setting.additional_parameters).each do |key, value| %> +
+
+ +
+
+ +
+
+ +
+
+ <% end %> + <% else %> +
+
+ +
+
+ +
+
+ +
+
+ <% end %> +
+ + + + <%= f.hidden_field :additional_parameters, id: 'additional-parameters-json' %> +
+ +
+ +
+ <%= f.submit "Submit", class: 'btn btn-primary submitBtn btn-lg waves-effect' %> +
+ <% end %>
- -
- <%= f.submit "Submit",:class => 'btn btn-primary submitBtn btn-lg waves-effect' %> -
- <% end %>
-
@@ -57,23 +87,98 @@ 2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.payment_method_txt") %>

-
+
+ + \ No newline at end of file + -->