mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge branch 'master' of github.com:hillelcoren/invoice-ninja
This commit is contained in:
commit
f1d2444cc9
@ -107,11 +107,13 @@ class AccountController extends \BaseController {
|
|||||||
$accountGateway = null;
|
$accountGateway = null;
|
||||||
$config = null;
|
$config = null;
|
||||||
$configFields = null;
|
$configFields = null;
|
||||||
|
$selectedCards = 0;
|
||||||
|
|
||||||
if (count($account->account_gateways) > 0)
|
if (count($account->account_gateways) > 0)
|
||||||
{
|
{
|
||||||
$accountGateway = $account->account_gateways[0];
|
$accountGateway = $account->account_gateways[0];
|
||||||
$config = $accountGateway->config;
|
$config = $accountGateway->config;
|
||||||
|
$selectedCards = $accountGateway->accepted_credit_cards;
|
||||||
|
|
||||||
$configFields = json_decode($config);
|
$configFields = json_decode($config);
|
||||||
|
|
||||||
@ -142,7 +144,10 @@ class AccountController extends \BaseController {
|
|||||||
$creditCards = [];
|
$creditCards = [];
|
||||||
foreach($creditCardsArray as $card => $name)
|
foreach($creditCardsArray as $card => $name)
|
||||||
{
|
{
|
||||||
$creditCards[$name['text']] = ['value' => $card, 'data-imageUrl' => asset($name['card'])];
|
if($selectedCards > 0 && ($selectedCards & $card) == $card)
|
||||||
|
$creditCards[$name['text']] = ['value' => $card, 'data-imageUrl' => asset($name['card']), 'checked' => 'checked'];
|
||||||
|
else
|
||||||
|
$creditCards[$name['text']] = ['value' => $card, 'data-imageUrl' => asset($name['card'])];
|
||||||
}
|
}
|
||||||
|
|
||||||
$otherItem = array(
|
$otherItem = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user