mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 16:39:01 +00:00
Website: Update default /contact page form for users with no primaryBuyingSituation (#18413)
Changes: - Updated the default /contact page form for users who have no primaryBuyingSituation
This commit is contained in:
parent
63d91526d2
commit
b52fe302c9
1 changed files with 4 additions and 1 deletions
5
website/assets/js/pages/contact.page.js
vendored
5
website/assets/js/pages/contact.page.js
vendored
|
|
@ -49,6 +49,9 @@ parasails.registerPage('contact', {
|
|||
beforeMount: function() {
|
||||
if(this.formToShow === 'contact'){
|
||||
this.formToDisplay = this.formToShow;
|
||||
} else if(!this.primaryBuyingSituation){
|
||||
// Default to contact form for users who have no primaryBuyingSituation set.
|
||||
this.formToDisplay = 'contact';
|
||||
}
|
||||
if(this.primaryBuyingSituation){ // If the user has a priamry buying situation set in their sesssion, pre-fill the form.
|
||||
// Note: this will be overriden if the user is logged in and has a primaryBuyingSituation set in the database.
|
||||
|
|
@ -108,7 +111,7 @@ parasails.registerPage('contact', {
|
|||
},
|
||||
|
||||
clickSwitchForms: function(form) {
|
||||
if(this.prefillFormDataFromUserRecord){
|
||||
if(this.me){
|
||||
this.formData = _.clone(this.formDataToPrefillForLoggedInUsers);
|
||||
} else {
|
||||
this.formData = {};
|
||||
|
|
|
|||
Loading…
Reference in a new issue