Merge pull request #7780 from apricot12/new_payment_method_html_bug

Fix HTML bug on new payment method page
This commit is contained in:
Andy Brett
2021-06-23 08:58:45 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -2,6 +2,6 @@ angular.module("admin.paymentMethods").controller "ProvidersCtrl", ($scope, paym
if paymentMethod.type
$scope.include_html = "/admin/payment_methods/show_provider_preferences?" +
"provider_type=#{paymentMethod.type};" +
"pm_id=#{paymentMethod.id};"
"pm_id=#{paymentMethod.id || ''};"
else
$scope.include_html = ""

View File

@@ -27,4 +27,4 @@ describe "ProvidersCtrl", ->
ctrl = $controller 'ProvidersCtrl', {$scope: scope, paymentMethod: paymentMethod }
it "sets the include_html porperty on scope to some address", ->
expect(scope.include_html).toBe "/admin/payment_methods/show_provider_preferences?provider_type=NOT NULL;pm_id=#{paymentMethod.id};"
expect(scope.include_html).toBe "/admin/payment_methods/show_provider_preferences?provider_type=NOT NULL;pm_id=#{paymentMethod.id || ''};"