Skip to content

Commit

Permalink
Address PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjon committed Oct 10, 2019
1 parent 98aa0a0 commit 34e1f0c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 1 addition & 5 deletions admin-dev/themes/new-theme/js/pages/order/view.js
Expand Up @@ -34,11 +34,7 @@ $(() => {
$(OrderViewPageMap.orderPaymentDetailsBtn).on('click', (event) => {
const $paymentDetailRow = $(event.currentTarget).closest('tr').next(':first');

if ($paymentDetailRow.hasClass('d-none')) {
$paymentDetailRow.removeClass('d-none');
} else {
$paymentDetailRow.addClass('d-none');
}
$paymentDetailRow.toggleClass('d-none');
});
}
});
Expand Up @@ -33,20 +33,24 @@

final class InstalledPaymentModulesChoiceProvider implements FormChoiceProviderInterface
{
private static $paymentModules;

/**
* {@inheritdoc}
*/
public function getChoices(): array
{
$paymentModules = [];
if (!self::$paymentModules) {
self::$paymentModules = [];

foreach (PaymentModule::getInstalledPaymentModules() as $payment) {
$module = Module::getInstanceByName($payment['name']);
if (Validate::isLoadedObject($module) && $module->active) {
$paymentModules[$module->name] = $module->displayName;
foreach (PaymentModule::getInstalledPaymentModules() as $payment) {
$module = Module::getInstanceByName($payment['name']);
if (Validate::isLoadedObject($module) && $module->active) {
self::$paymentModules[$module->name] = $module->displayName;
}
}
}

return $paymentModules;
return self::$paymentModules;
}
}
Expand Up @@ -79,7 +79,7 @@ class AddPaymentCommand
* @param float $paymentAmount
* @param float $paymentCurrencyId
* @param int|null $orderInvoiceId
* @param string|null $transactionId
* @param string|null $transactionId Transaction ID, usually payment ID from payment gateway.
*/
public function __construct(
$orderId,
Expand Down
Expand Up @@ -91,7 +91,7 @@ admin_orders_duplicate_cart:
expose: true

admin_orders_change_currency:
path: /{orderId}/change-currency
path: /{orderId}/currency/change
methods: [POST]
defaults:
_controller: PrestaShopBundle:Admin/Sell/Order/Order:changeCurrency
Expand Down
Expand Up @@ -78,7 +78,7 @@
{% endif %}
</p>
<p class="mb-0">
<strong>{{ 'Card Type'|trans({}, 'Admin.Orderscustomers.Feature') }}</strong>&nbsp;
<strong>{{ 'Card type'|trans({}, 'Admin.Orderscustomers.Feature') }}</strong>&nbsp;
{% if payment.cardBrand %}
{{ payment.cardBrand }}
{% else %}
Expand Down

0 comments on commit 34e1f0c

Please sign in to comment.