Richard Knight 6 年之前
父節點
當前提交
a7eb6048f0
共有 4 個文件被更改,包括 7 次插入7 次删除
  1. 0 0
      templates/.gitignore
  2. 1 1
      templates/backend/dashboard.twig
  3. 1 2
      templates/frontend/cardentryform.twig
  4. 5 4
      web/sq-paymentform.js

+ 0 - 0
templates/.gitignore


+ 1 - 1
templates/backend/dashboard.twig

@@ -11,7 +11,7 @@
 	<br>
 
 	<a href="{{ auth_link }}" class="btn btn-primary">Authorise Site</a>
-	<a href="square/revoke-oauth-token" class="btn btn-danger">Revoke Access</a>
+	<a href="square/revoke-oauth-token" class="btn btn-danger" onclick="return confirm('Are you sure? This will disable the connection to Square.');">Revoke Access</a>
 
 	<br><br>
 	{{ dump(config) }}

+ 1 - 2
templates/frontend/cardentryform.twig

@@ -2,7 +2,6 @@
 <script type="text/javascript" src="/extensions/vendor/ginger/squarepay/sq-paymentform.js"></script>
 <script>
 // For sq-paymentform.js	
-var isPaymentsPage = true;
 var applicationId = '{{ testmode ? sq_sandbox_app_id : sq_app_id }}';
 var locationId = '{{ testmode ? sq_sandbox_location_id : sq_location_id }}';
 </script>
@@ -44,7 +43,7 @@ var locationId = '{{ testmode ? sq_sandbox_location_id : sq_location_id }}';
 	</div>
 	<div class="cc-row">
 		<label></label>
-		<a class="ecom-button" onclick="requestCardNonce(event)">Complete Order</a>
+		<a class="ecom-button" onclick="requestCardNonce()">Complete Order</a>
 	</div>
 	</form>
 </div>

+ 5 - 4
web/sq-paymentform.js

@@ -16,9 +16,10 @@ function init() {
 
 		// Customize the CSS for SqPaymentForm iframe elements
 		inputStyles: [{
-			fontSize: '1.25em',
-			fontFamily: 'sans-serif',
+			fontSize: '1.15em',
+			fontFamily: 'courier, monospace',
 			color: 'white',
+			placeholderColor: '#EEE',
 			backgroundColor: '#0f193c',
 			fontWeight: 'normal',
 			padding: '5px 10px'
@@ -35,11 +36,11 @@ function init() {
 		},
 		cvv: {
 			elementId: 'sq-cvv',
-			placeholder: ''
+			placeholder: 'cvv'
 		},
 		expirationDate: {
 			elementId: 'sq-expiration-date',
-			placeholder: 'MM/YY'
+			placeholder: 'mm/yy'
 		},
 		postalCode: {
 			elementId: 'sq-postal-code'