mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Add country to the paypal form.
This commit is contained in:
@@ -279,6 +279,8 @@ block content
|
||||
) ?
|
||||
span.input-feedback-message {{ simpleCCForm.cvv.$error.required ? 'This field is required' : 'Please re-check the security code' }}
|
||||
|
||||
|
||||
div
|
||||
.form-group(ng-class="validation.errorFields.country || inputHasError(simpleCCForm.country) ? 'has-error' : ''")
|
||||
label(for="country") #{translate('country')}
|
||||
select#country.form-control(
|
||||
@@ -290,8 +292,7 @@ block content
|
||||
)
|
||||
mixin countries_options()
|
||||
span.input-feedback-message {{ simpleCCForm.country.$error.required ? 'This field is required' : '' }}
|
||||
|
||||
div
|
||||
|
||||
if (showVatField)
|
||||
.form-group
|
||||
label(for="vat-no") #{translate('vat_number')}
|
||||
@@ -310,6 +311,7 @@ block content
|
||||
)
|
||||
|
||||
p(ng-if="paymentMethod === 'paypal'") #{translate("paypal_upgrade")}
|
||||
|
||||
div.price-breakdown(ng-if="price.next.tax !== '0.00'")
|
||||
hr.thin
|
||||
span Total:
|
||||
@@ -326,7 +328,7 @@ block content
|
||||
sixpack-convert="payment-left-menu-bottom"
|
||||
)
|
||||
span(ng-show="processing")
|
||||
i.fa.fa-refresh.fa-spin
|
||||
i.fa.fa-spinner.fa-spin
|
||||
|
|
||||
| {{ paymentMethod === 'credit_card' ? '#{translate("upgrade_cc_btn")}' : '#{translate("upgrade_paypal_btn")}' }}
|
||||
|
||||
|
||||
@@ -107,13 +107,16 @@ define [
|
||||
return (formItem.$touched && formItem.$invalid)
|
||||
|
||||
$scope.isFormValid = isFormValid = (form) ->
|
||||
return $scope.paymentMethod == 'paypal' or
|
||||
(form.$valid and
|
||||
$scope.validation.correctCardNumber and
|
||||
$scope.validation.correctExpiry and
|
||||
$scope.validation.correctCvv)
|
||||
if $scope.paymentMethod == 'paypal'
|
||||
return $scope.data.country != ""
|
||||
else
|
||||
return (form.$valid and
|
||||
$scope.validation.correctCardNumber and
|
||||
$scope.validation.correctExpiry and
|
||||
$scope.validation.correctCvv)
|
||||
|
||||
$scope.updateCountry = ->
|
||||
console.log $scope.data.country
|
||||
pricing.address({country:$scope.data.country}).done()
|
||||
|
||||
$scope.setPaymentMethod = setPaymentMethod = (method) ->
|
||||
|
||||
Reference in New Issue
Block a user