Remove "Pay by invoice or VAT invoice" option from group account modal

GitOrigin-RevId: bbcadc98c71a14a97e5c31c3877e83bb8f8bfce2
This commit is contained in:
Paulo Reis 2020-05-07 14:17:23 +01:00 committed by Copybot
parent e9d199a0cf
commit d536ea8a24
7 changed files with 8 additions and 128 deletions

View file

@ -1,30 +0,0 @@
script(type="text/ng-template", id="groupPlanModalInquiryTemplate")
.modal-header
h3 #{translate("group_plan_enquiry")}
.modal-body
form.text-left.form(ng-controller="GroupPlanContactController", ng-submit="contactUs()")
span(ng-show="sent == false && error == false")
.form-group
label#title9(for='Field9')
| Name
input#Field9.field.text.medium.span8.form-control(ng-model="form.name", maxlength='255', tabindex='1', onkeyup='')
label#title11.desc(for='Field11')
| Email
.form-group
input#Field11.field.text.medium.span8.form-control(ng-model="form.email", name='Field11', type='email', spellcheck='false', value='', maxlength='255', tabindex='2')
label#title12.desc(for='Field12')
| University / Company
.form-group
input#Field12.field.text.medium.span8.form-control(ng-model="form.university", name='Field12', type='text', value='', maxlength='255', tabindex='3', onkeyup='')
label#title13.desc(for='Field13')
| Position
.form-group
input#Field13.field.text.medium.span8.form-control(ng-model="form.position", name='Field13', type='text', value='', maxlength='255', tabindex='4', onkeyup='')
.form-group
input(ng-model="form.source", type="hidden", ng-init="form.source = '__ref__'; form.subject = 'General enquiry for larger ShareLaTeX use';")
.form-group.text-center
input#saveForm.btn-success.btn.btn-lg(name='saveForm', type='submit', ng-disabled="sending", value='Request a quote')
span(ng-show="sent == true && error == false")
p Request Sent, Thank you.
span(ng-show="error")
p Error sending request.

View file

@ -45,8 +45,10 @@ script(type="text/ng-template", id="groupPlanModalPurchaseTemplate")
.modal-footer
.text-center
button.btn.btn-primary.btn-lg(ng-click="purchase()") Purchase Now
br
| or
br
a(href, ng-click="payByInvoice()") Pay by invoice or VAT invoice
hr.thin
a(
href
ng-controller="ContactGeneralModal"
ng-click="openModal()"
) Need more than 50 licenses? Please get in touch

View file

@ -31,4 +31,4 @@
p #{translate('faq_how_to_pay_answer')}
.col-md-6
h3 #{translate('faq_pay_by_invoice_question')}
p !{translate('faq_pay_by_invoice_answer', { payByInvoiceLinkOpen: '<a href="#pay-by-invoice" ng-click="openPayByInvoiceModal()">', payByInvoiceLinkClose: '</a>' })}
p !{translate('faq_pay_by_invoice_answer', { payByInvoiceLinkOpen: '<a href="#pay-by-invoice" ng-controller="ContactGeneralModal" ng-click="openModal()">', payByInvoiceLinkClose: '</a>' })}

View file

@ -137,5 +137,4 @@ block content
.row.row-spaced
include _modal_group_inquiry
include _modal_group_purchase

View file

@ -28,7 +28,6 @@ define([
'./main/register-users',
'./main/subscription/team-invite-controller',
'./main/subscription/upgrade-subscription',
'./main/contact-us',
'./main/learn',
'./main/exposed-settings',
'./main/affiliations/components/affiliationForm',

View file

@ -1,64 +0,0 @@
/* eslint-disable
max-len,
no-return-assign,
no-unused-vars,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
define(['../base'], App =>
App.controller('GroupPlanContactController', function(
$scope,
$modal,
$http,
eventTracking
) {
$scope.form = {}
$scope.sent = false
$scope.sending = false
$scope.error = false
return ($scope.contactUs = function() {
if ($scope.form.email == null) {
console.log('email not set')
return
}
$scope.sending = true
const ticketNumber = Math.floor((1 + Math.random()) * 0x10000).toString(
32
)
const data = {
_csrf: window.csrfToken,
name: $scope.form.name || $scope.form.email,
email: $scope.form.email,
labels: `${$scope.form.source} accounts`,
message: 'Please contact me with more details',
subject: `${$scope.form.name} - Group Enquiry - ${
$scope.form.position
} - ${$scope.form.university}`,
inbox: 'accounts'
}
const request = $http.post('/support', data)
request.catch(function() {
$scope.error = true
return $scope.$apply()
})
return request.then(function(response) {
$scope.sent = true
eventTracking.send(
'subscription-funnel',
'plans-page',
'group-inquiry-sent'
)
$scope.error = response.status !== 200
return $scope.$apply()
})
})
}))

View file

@ -270,30 +270,11 @@ define(['../base'], function(App) {
'group-inquiry-potential'
)
}
if ($location.hash() === 'groups') {
$scope.openGroupPlanModal()
}
$scope.openPayByInvoiceModal = function() {
const path = `${window.location.pathname}${window.location.search}`
history.replaceState(null, document.title, path + '#pay-by-invoice')
$modal
.open({
templateUrl: 'groupPlanModalInquiryTemplate'
})
.result.finally(() =>
history.replaceState(null, document.title, window.location.pathname)
)
eventTracking.send(
'subscription-funnel',
'plans-page',
'group-inquiry-potential'
)
}
if ($location.hash() === 'pay-by-invoice') {
$scope.openPayByInvoiceModal()
}
var eventLabel = (label, location) => label
switchEvent = function(e, label, location) {
@ -418,12 +399,5 @@ define(['../base'], function(App) {
plan_code = `group_${plan_code}_${size}_${usage}`
window.location = `/user/subscription/new?planCode=${plan_code}&currency=${currency}&itm_campaign=groups`
}
$scope.payByInvoice = function() {
$modal.open({
templateUrl: 'groupPlanModalInquiryTemplate'
})
$scope.$close()
}
})
})