mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Closes: #17958 Changes: - Updated the primary and secondary CTAs site-wide - Updated the /start page to have a multi-stage form that users can fill out to personalize their onboarding experience - Updated the signup action to not set a `primaryBuyingSituation` on new user records (This will now be set when users progress through the /start form) - Added two new attributes to the `User` model: `currentGetStartedQuestionnarieStep` and `getStartedQuestionnarieAnswers` that save user's progress in the /start form. Before this PR can be merged we will need to: - [x] Update the Zapier webhook that runs when new users sign up to no longer expect a `primaryBuyingSituation` value - [ ] Update the User table in the website's database - [ ] Migrate the existing user records
48 lines
1 KiB
JavaScript
Vendored
48 lines
1 KiB
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View contact',
|
|
|
|
|
|
description: 'Display "Contact" page.',
|
|
|
|
inputs: {
|
|
sendMessage: {
|
|
type: 'boolean',
|
|
description: 'A boolean that determines whether or not to display the talk to us form when the contact page loads.',
|
|
defaultsTo: false,
|
|
},
|
|
|
|
prefillFormDataFromUserRecord: {
|
|
type: 'boolean',
|
|
description: 'If true, the contact form will be prefilled in with information from this user\'s account.',
|
|
},
|
|
},
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/contact'
|
|
}
|
|
|
|
},
|
|
|
|
|
|
fn: async function ({sendMessage, prefillFormDataFromUserRecord}) {
|
|
|
|
let formToShow = 'talk-to-us';
|
|
|
|
if(sendMessage) {
|
|
formToShow = 'contact';
|
|
}
|
|
// If the prefillFormDataFromUserRecord flag was set to true, but this user is not logged in, set it to false.
|
|
if(prefillFormDataFromUserRecord && !this.req.me){
|
|
prefillFormDataFromUserRecord = false;
|
|
}
|
|
// Respond with view.
|
|
return {formToShow, prefillFormDataFromUserRecord};
|
|
|
|
}
|
|
|
|
|
|
};
|