Tweak UI for selecting an existing card at Checkout

This commit is contained in:
Rob Harrington
2017-07-31 11:47:32 +10:00
parent 35912605c3
commit f317cee9e9
6 changed files with 32 additions and 24 deletions

View File

@@ -1,15 +1,11 @@
Darkswarm.controller "PaymentCtrl", ($scope, $timeout, savedCreditCards, Dates) ->
angular.extend(this, new FieldsetMixin($scope))
defaultCard = [ {id: null, formatted: t("new_credit_card")} ]
$scope.savedCreditCards = defaultCard.concat savedCreditCards if savedCreditCards
$scope.selected_card = null
$scope.savedCreditCards = savedCreditCards
$scope.name = "payment"
$scope.months = Dates.months
$scope.years = Dates.years
$scope.secrets.card_month = "1"
$scope.secrets.card_year = moment().year()