fleet/website/api/controllers/view-contact.js
Eric a389822f42
Website: Add steps to /start questionnaire (#18074)
Closes: #18047

Changes:
- Added three steps to the /start questionnaire
- Updated the contact page to prefill information for logged-in users by
default
- Updated the layout of the f/leetctl-preview page for users navigating
to it from the /start page.
- Updated the quote for vulnerability management on the /start and
/contact pages to have a logo (There will be a separate PR, to add it to
testimonials.yml)

---------

Co-authored-by: Mike Thomas <[email protected]>
2024-04-08 19:39:19 +09:00

42 lines
694 B
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,
},
},
exits: {
success: {
viewTemplatePath: 'pages/contact'
}
},
fn: async function ({sendMessage}) {
let formToShow = 'talk-to-us';
if(sendMessage) {
formToShow = 'contact';
}
// Respond with view.
return {
formToShow,
prefillFormDataFromUserRecord: this.req.me ? true : false// FUTURE: move to frontend.
};
}
};