We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 37705217 authored by Rik ter Beek's avatar Rik ter Beek

Let the component render the holder name and remove loadingContext as this is not needed

parent d250d98a
...@@ -85,8 +85,9 @@ define( ...@@ -85,8 +85,9 @@ define(
var card = checkout.create('card', { var card = checkout.create('card', {
originKey: self.getOriginKey(), originKey: self.getOriginKey(),
loadingContext: self.getLoadingContext(),
type: 'card', type: 'card',
hasHolderName: true,
holderNameRequired: true,
groupTypes: self.getAvailableCardTypeAltCodes(), groupTypes: self.getAvailableCardTypeAltCodes(),
onChange: function(state) { onChange: function(state) {
...@@ -141,6 +142,7 @@ define( ...@@ -141,6 +142,7 @@ define(
self.expiryMonth(state.data.encryptedExpiryMonth); self.expiryMonth(state.data.encryptedExpiryMonth);
self.expiryYear(state.data.encryptedExpiryYear); self.expiryYear(state.data.encryptedExpiryYear);
self.securityCode(state.data.encryptedSecurityCode); self.securityCode(state.data.encryptedSecurityCode);
self.creditCardOwner(state.data.holderName);
self.creditCardDetailsValid(true); self.creditCardDetailsValid(true);
self.placeOrderAllowed(true); self.placeOrderAllowed(true);
}, },
...@@ -232,9 +234,7 @@ define( ...@@ -232,9 +234,7 @@ define(
var validate = $(form).validation() && $(form).validation('isValid'); var validate = $(form).validation() && $(form).validation('isValid');
var owner = Boolean($(form + ' #creditCardHolderName').valid()); if (!validate) {
if (!validate || !owner) {
return false; return false;
} }
......
...@@ -216,7 +216,6 @@ define( ...@@ -216,7 +216,6 @@ define(
var oneClickCard = checkout var oneClickCard = checkout
.create('card', { .create('card', {
originKey: self.getOriginKey(), originKey: self.getOriginKey(),
loadingContext: self.getLoadingContext(),
type: self.agreement_data.variant, type: self.agreement_data.variant,
oneClick: true, oneClick: true,
hideCVC: hideCVC, hideCVC: hideCVC,
......
...@@ -100,29 +100,6 @@ ...@@ -100,29 +100,6 @@
</div> </div>
</div> </div>
<div class="field holdername type">
<label data-bind="attr: {for: 'creditCardHolderName'}" class="label">
<span><!-- ko text: $t('Credit Card Owner')--><!-- /ko --></span>
</label>
<div class="control">
<input type="text"
class="input-text required-entry"
data-encrypted-name="holderName"
value=""
data-bind="attr: {
id: 'creditCardHolderName',
title: $t('Credit Card Owner'),
placeholder: $t('Credit Card Owner'),
'data-container': getCode() + '-cc-owner'
},
enable: isActive($parents),
value: creditCardOwner,
valueUpdate: 'keyup' "
data-validate="{required:true}"
/>
</div>
</div>
<div class="field number cardContainerField"> <div class="field number cardContainerField">
<div afterRender="renderSecureFields()" data-bind="attr: { id: 'cardContainer'}"></div> <div afterRender="renderSecureFields()" data-bind="attr: { id: 'cardContainer'}"></div>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment