diff --git a/services/web/app/views/subscriptions/_modal_group_inquiry.pug b/services/web/app/views/subscriptions/_modal_group_inquiry.pug
deleted file mode 100644
index ff7608908e..0000000000
--- a/services/web/app/views/subscriptions/_modal_group_inquiry.pug
+++ /dev/null
@@ -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.
\ No newline at end of file
diff --git a/services/web/app/views/subscriptions/_modal_group_purchase.pug b/services/web/app/views/subscriptions/_modal_group_purchase.pug
index 3577146a82..7e96b9b4c5 100644
--- a/services/web/app/views/subscriptions/_modal_group_purchase.pug
+++ b/services/web/app/views/subscriptions/_modal_group_purchase.pug
@@ -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
diff --git a/services/web/app/views/subscriptions/_plans_faq.pug b/services/web/app/views/subscriptions/_plans_faq.pug
index 3278f612a5..c9f99cdce0 100644
--- a/services/web/app/views/subscriptions/_plans_faq.pug
+++ b/services/web/app/views/subscriptions/_plans_faq.pug
@@ -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: '', payByInvoiceLinkClose: '' })}
+ p !{translate('faq_pay_by_invoice_answer', { payByInvoiceLinkOpen: '', payByInvoiceLinkClose: '' })}
diff --git a/services/web/app/views/subscriptions/plans.pug b/services/web/app/views/subscriptions/plans.pug
index 5179ab9176..bc3ea21474 100644
--- a/services/web/app/views/subscriptions/plans.pug
+++ b/services/web/app/views/subscriptions/plans.pug
@@ -137,5 +137,4 @@ block content
.row.row-spaced
- include _modal_group_inquiry
include _modal_group_purchase
diff --git a/services/web/frontend/js/main.js b/services/web/frontend/js/main.js
index f10c258a91..8a2fd30633 100644
--- a/services/web/frontend/js/main.js
+++ b/services/web/frontend/js/main.js
@@ -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',
diff --git a/services/web/frontend/js/main/contact-us.js b/services/web/frontend/js/main/contact-us.js
deleted file mode 100644
index cb92c1fe6a..0000000000
--- a/services/web/frontend/js/main/contact-us.js
+++ /dev/null
@@ -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()
- })
- })
- }))
diff --git a/services/web/frontend/js/main/plans.js b/services/web/frontend/js/main/plans.js
index dcbbf581f2..3f53d976da 100644
--- a/services/web/frontend/js/main/plans.js
+++ b/services/web/frontend/js/main/plans.js
@@ -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}¤cy=${currency}&itm_campaign=groups`
}
-
- $scope.payByInvoice = function() {
- $modal.open({
- templateUrl: 'groupPlanModalInquiryTemplate'
- })
- $scope.$close()
- }
})
})