From fd346d4e0f6446e182f51347c45d4106b2f2b001 Mon Sep 17 00:00:00 2001 From: Josh Pollock Date: Wed, 22 May 2019 12:30:56 -0400 Subject: [PATCH] merge develop #3204 --- .../DashboardPanels/ProDashboard.js | 77 +++-- .../MainDashboard/DashboardPanels/index.js | 2 +- .../MainDashboard/components/Addons/Addons.js | 189 +++++++++++ .../components/Translate/Translate.js | 3 - .../ProSettings/ProEnterApp/ProEnterApp.js | 28 ++ .../ProEnterApp/ProEnterApp.test.js | 27 ++ .../__snapshots__/ProEnterApp.test.js.snap | 9 + .../ProFormSettings/ProFormSettings.js | 52 ++++ .../ProFormSettings/ProFormSettings.test.js | 44 +++ .../ProFormSettings.test.js.snap | 293 ++++++++++++++++++ .../ProFormSettings/configFields.js | 55 ++++ .../ProSettings/ProFreeTrial/ProFreeTrial.js | 56 ++++ .../ProFreeTrial/ProFreeTrial.test.js | 27 ++ .../__snapshots__/ProFreeTrial.test.js.snap | 29 ++ .../ProSettings/ProWhatIs/ProWhatIs.js | 56 ++++ .../ProSettings/ProWhatIs/ProWhatIs.test.js | 27 ++ .../__snapshots__/ProWhatIs.test.js.snap | 28 ++ clients/components/ProSettings/index.js | 11 + clients/components/functions/url.js | 2 +- 19 files changed, 978 insertions(+), 37 deletions(-) create mode 100644 clients/admin/MainDashboard/components/Addons/Addons.js create mode 100644 clients/components/ProSettings/ProEnterApp/ProEnterApp.js create mode 100644 clients/components/ProSettings/ProEnterApp/ProEnterApp.test.js create mode 100644 clients/components/ProSettings/ProEnterApp/__snapshots__/ProEnterApp.test.js.snap create mode 100644 clients/components/ProSettings/ProFormSettings/ProFormSettings.js create mode 100644 clients/components/ProSettings/ProFormSettings/ProFormSettings.test.js create mode 100644 clients/components/ProSettings/ProFormSettings/__snapshots__/ProFormSettings.test.js.snap create mode 100644 clients/components/ProSettings/ProFormSettings/configFields.js create mode 100644 clients/components/ProSettings/ProFreeTrial/ProFreeTrial.js create mode 100644 clients/components/ProSettings/ProFreeTrial/ProFreeTrial.test.js create mode 100644 clients/components/ProSettings/ProFreeTrial/__snapshots__/ProFreeTrial.test.js.snap create mode 100644 clients/components/ProSettings/ProWhatIs/ProWhatIs.js create mode 100644 clients/components/ProSettings/ProWhatIs/ProWhatIs.test.js create mode 100644 clients/components/ProSettings/ProWhatIs/__snapshots__/ProWhatIs.test.js.snap create mode 100644 clients/components/ProSettings/index.js diff --git a/clients/admin/MainDashboard/DashboardPanels/ProDashboard.js b/clients/admin/MainDashboard/DashboardPanels/ProDashboard.js index 49df731d1..2defecefd 100644 --- a/clients/admin/MainDashboard/DashboardPanels/ProDashboard.js +++ b/clients/admin/MainDashboard/DashboardPanels/ProDashboard.js @@ -1,36 +1,49 @@ import {TabPanel} from "@wordpress/components"; +import {ProWhatIs} from "../../../components/ProSettings"; -const onSelect = () => {}; -export default function ProDashboard(){ - return( - - { - ( tab ) =>

{ tab.title }

- } -
+const onSelect = () => { +}; +import {Addons} from "../components/AddOns/Addons"; +import {Fragment} from "react"; + +export default function ProDashboard() { + return ( + + + + + { + (tab) => ( + + ) + } + + ); } \ No newline at end of file diff --git a/clients/admin/MainDashboard/DashboardPanels/index.js b/clients/admin/MainDashboard/DashboardPanels/index.js index 65ab886bf..a33e7808d 100644 --- a/clients/admin/MainDashboard/DashboardPanels/index.js +++ b/clients/admin/MainDashboard/DashboardPanels/index.js @@ -55,7 +55,7 @@ export default class DashboardPanels extends Component { diff --git a/clients/admin/MainDashboard/components/Addons/Addons.js b/clients/admin/MainDashboard/components/Addons/Addons.js new file mode 100644 index 000000000..87df3c6ca --- /dev/null +++ b/clients/admin/MainDashboard/components/Addons/Addons.js @@ -0,0 +1,189 @@ +import {Component} from '@wordpress/element'; +import axios from "axios"; +import {cacheAdapterEnhancer} from "axios-extensions"; +import {ProEnterApp} from "../../../../components/ProSettings"; +import {ProFreeTrial} from "../../../../components/ProSettings"; +import url from "../../../../components/functions/url"; +export class Addons extends Component { + + + constructor(props) { + super(props); + this.state = { + paymentAddonsLoaded: false, + emailAddonsLoaded: false, + paymentAddons: {}, + emailAddons: {}, + toolsAddonsLoaded: false, + toolsAddons: {} + }; + } + + componentDidMount() { + const stripTrailingSlash = (str) => { + return str.endsWith('/') ? + str.slice(0, -1) : + str; + }; + + const cacheOptions = { enabledByDefault: true }; + const { + paymentAddonsLoaded, + emailAddonsLoaded, + toolsAddonsLoaded, + toolsAddons + } = this.state; + const {apiRoot} = this.props; + if (!paymentAddonsLoaded) { + axios({ + method: 'get', + url: `${stripTrailingSlash(apiRoot)}/calderawp_api/v2/products/cf-addons?category=payment`, + adapter: cacheAdapterEnhancer(axios.defaults.adapter, cacheOptions ) + }).then((response) => { + this.setState({ + paymentAddons: response.data, + paymentAddonsLoaded: true + }) + + }); + } + + if (!emailAddonsLoaded) { + axios({ + method: 'get', + url: `${stripTrailingSlash(apiRoot)}/calderawp_api/v2/products/cf-addons?category=email`, + adapter: cacheAdapterEnhancer(axios.defaults.adapter, cacheOptions ) + }).then((response) => { + this.setState({ + emailAddons: response.data, + emailAddonsLoaded: true + }) + + }); + }if (!toolsAddonsLoaded) { + axios({ + method: 'get', + url: `${stripTrailingSlash(apiRoot)}/calderawp_api/v2/products/cf-addons?category=tools`, + adapter: cacheAdapterEnhancer(axios.defaults.adapter, cacheOptions ) + }).then((response) => { + const good = [5070,43154,56332,2465,1940,55330,1950,1934,37221,82236,1223]; + const toolsAddons = []; + Object.values(response.data).forEach(addon => { + if( good.includes(addon.id)){ + toolsAddons.push(addon); + } + }); + this.setState({ + toolsAddons, + toolsAddonsLoaded: true + }) + + }); + } + + + } + + + render() { + const {proConnected} = this.props; + const { + paymentAddonsLoaded, + emailAddonsLoaded, + paymentAddons, + emailAddons, + toolsAddonsLoaded, + toolsAddons + } = this.state; + + function Loading() { + return
Loading
+ } + + function AddonPanel({addon,category}) { + const {image_src,tagline,link,name} = addon; + return ( + +
+ +

{name}

+
+ {tagline} +
+ + +
+ + ) + } + + function AddonsPanel({addons,category}) { + return ( + +
+ { + addons.map(addon => { + return () + }) + } +
+ ); + + } + + const {show} = this.props; + switch (show) { + case 'email': + if (emailAddonsLoaded) { + return + } else { + return + } + case 'payment': + if (paymentAddonsLoaded) { + return + } else { + return + } + case 'tools': + if (toolsAddonsLoaded) { + return + } else { + return + } + + case 'pro': + default: + if( proConnected ){ + return + } + return + + } + } + +} + +Addons.defaultProps = { + apiRoot: 'https://calderaforms.com/wp-json', + show: 'email', + proConnected: false +}; \ No newline at end of file diff --git a/clients/admin/MainDashboard/components/Translate/Translate.js b/clients/admin/MainDashboard/components/Translate/Translate.js index 2fadb5ad3..a6700a0eb 100644 --- a/clients/admin/MainDashboard/components/Translate/Translate.js +++ b/clients/admin/MainDashboard/components/Translate/Translate.js @@ -43,7 +43,6 @@ export default class Translate extends Component { url: `${stripTrailingSlash(weglotApiRoot)}/wp/v2/posts/1021`, adapter: cacheAdapterEnhancer(axios.defaults.adapter, true) }).then((response) => { - console.log(response); this.setState({ post1: response.data, post1Loaded: true @@ -58,7 +57,6 @@ export default class Translate extends Component { url: `${stripTrailingSlash(apiRoot)}/wp/v2/posts/133132`, adapter: cacheAdapterEnhancer(axios.defaults.adapter, true) }).then((response) => { - console.log(response); this.setState({ post2: response.data, post2Loaded: true @@ -74,7 +72,6 @@ export default class Translate extends Component { url: `${stripTrailingSlash(weglotApiRoot)}/wp/v2/posts/1297`, adapter: cacheAdapterEnhancer(axios.defaults.adapter, true) }).then((response) => { - console.log(response); this.setState({ post3: response.data, post3Loaded: true diff --git a/clients/components/ProSettings/ProEnterApp/ProEnterApp.js b/clients/components/ProSettings/ProEnterApp/ProEnterApp.js new file mode 100644 index 000000000..6b4a97bda --- /dev/null +++ b/clients/components/ProSettings/ProEnterApp/ProEnterApp.js @@ -0,0 +1,28 @@ +import React from 'react'; +import classNames from 'classnames' + +/** + * Create the global form settings UI + * @param {Object} props + * @return {*} + * @constructor + */ +export const ProEnterApp = (props) => { + return( +
+ ProEnterApp +
+ ) +}; + + + +/** + * Class names used in the GlobalForms settings component + * @type {{wrapper: string}} + */ +ProEnterApp.classNames = { + wrapper: 'caldera-forms-global-form-settings' +}; \ No newline at end of file diff --git a/clients/components/ProSettings/ProEnterApp/ProEnterApp.test.js b/clients/components/ProSettings/ProEnterApp/ProEnterApp.test.js new file mode 100644 index 000000000..e83fa1e10 --- /dev/null +++ b/clients/components/ProSettings/ProEnterApp/ProEnterApp.test.js @@ -0,0 +1,27 @@ +import renderer from 'react-test-renderer'; +import React from 'react'; +import { shallow } from 'enzyme/build'; +import Enzyme from 'enzyme/build'; +import Adapter from 'enzyme-adapter-react-16/build'; +import {ProEnterApp} from "./ProEnterApp"; + +Enzyme.configure({ adapter: new Adapter() }); + +describe( 'ProEnterApp component', () => { + it( 'Matches snapshot with minimal props', () => { + expect( + renderer.create( + + ).toJSON() + ).toMatchSnapshot() + }); + + it( 'Is wrapped in the right class', () => { + expect( + shallow( + + ).find( '.' + ProEnterApp.classNames.wrapper ) + .length + ).toEqual(1) + }); +}); \ No newline at end of file diff --git a/clients/components/ProSettings/ProEnterApp/__snapshots__/ProEnterApp.test.js.snap b/clients/components/ProSettings/ProEnterApp/__snapshots__/ProEnterApp.test.js.snap new file mode 100644 index 000000000..eaced27a5 --- /dev/null +++ b/clients/components/ProSettings/ProEnterApp/__snapshots__/ProEnterApp.test.js.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ProEnterApp component Matches snapshot with minimal props 1`] = ` +
+ ProEnterApp +
+`; diff --git a/clients/components/ProSettings/ProFormSettings/ProFormSettings.js b/clients/components/ProSettings/ProFormSettings/ProFormSettings.js new file mode 100644 index 000000000..8835ba0e0 --- /dev/null +++ b/clients/components/ProSettings/ProFormSettings/ProFormSettings.js @@ -0,0 +1,52 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import {SettingsGroup} from "../../../../../../Desktop/components/Settings/SettingsGroup"; +import configFields, {PRO_FORM_EMAIL_LAYOUT, PRO_FORM_PDF_LAYOUT} from './configFields' +/** + * Create the ProFormSettings UI + * @param {Object} props + * @return {*} + * @constructor + */ +export class ProFormSettings extends SettingsGroup { + + /** + * Get config fields + * + * Adds pro layouts as options when possible + * @return {Array} + */ + getConfigFields(){ + let configFields = super.getConfigFields(); + if ( this.props.layouts.length ) { + configFields.forEach(configField => { + if ([ + PRO_FORM_EMAIL_LAYOUT, + PRO_FORM_PDF_LAYOUT + ].includes(configField.id)) { + configField.options = this.props.layouts; + } + }) + } + return configFields; + } +}; + +/** + * Prop types for the ProFormSettings component + * @type {{}} + */ +ProFormSettings.propTypes = { + classNames: propTypes.string, + layouts: propTypes.array +}; + +/** + * Default props for the ProFormSettings component + * @type {{}} + */ +ProFormSettings.defaultProps = { + configFields, + wrapperClass: 'caldera-forms-pro-form-settings', + layouts: [] +}; diff --git a/clients/components/ProSettings/ProFormSettings/ProFormSettings.test.js b/clients/components/ProSettings/ProFormSettings/ProFormSettings.test.js new file mode 100644 index 000000000..5065fa1ac --- /dev/null +++ b/clients/components/ProSettings/ProFormSettings/ProFormSettings.test.js @@ -0,0 +1,44 @@ +import renderer from 'react-test-renderer'; +import React from 'react'; +import { shallow } from 'enzyme/build'; +import Enzyme from 'enzyme/build'; +import Adapter from 'enzyme-adapter-react-16/build'; +import {ProFormSettings} from "./ProFormSettings"; +import {optionFactory} from "../../../../../../Desktop/components/util/optionFactory"; + +Enzyme.configure({ adapter: new Adapter() }); + +describe( 'ProFormSettings component', () => { + it( 'Matches snapshot with minimal props', () => { + expect( + renderer.create( + + ).toJSON() + ).toMatchSnapshot() + }); + + + it( 'Matches snapshot with layouts', () => { + expect( + renderer.create( + + ).toJSON() + ).toMatchSnapshot() + }); + + it( 'Is wrapped in the right class', () => { + expect( + shallow( + + ).find( '.' + ProFormSettings.defaultProps.wrapperClass ) + .length + ).toEqual(1) + }); +}); \ No newline at end of file diff --git a/clients/components/ProSettings/ProFormSettings/__snapshots__/ProFormSettings.test.js.snap b/clients/components/ProSettings/ProFormSettings/__snapshots__/ProFormSettings.test.js.snap new file mode 100644 index 000000000..56a2bac9a --- /dev/null +++ b/clients/components/ProSettings/ProFormSettings/__snapshots__/ProFormSettings.test.js.snap @@ -0,0 +1,293 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ProFormSettings component Matches snapshot with layouts 1`] = ` +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+`; + +exports[`ProFormSettings component Matches snapshot with minimal props 1`] = ` +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+`; diff --git a/clients/components/ProSettings/ProFormSettings/configFields.js b/clients/components/ProSettings/ProFormSettings/configFields.js new file mode 100644 index 000000000..80c83d37b --- /dev/null +++ b/clients/components/ProSettings/ProFormSettings/configFields.js @@ -0,0 +1,55 @@ +import {optionFactory} from "../../../../../../Desktop/components/util/optionFactory"; + +export const PRO_FORM_SEND_LOCAL = 'SETTINGS/PRO/FORM/SEND_LOCAL'; +export const PRO_FORM_EMAIL_LAYOUT = 'SETTINGS/PRO/FORM/EMAIL_LAYOUT'; +export const PRO_FORM_PDF_LAYOUT = 'SETTINGS/PRO/FORM/PDF_LAYOUT'; +export const PRO_FORM_PDF_ATATCH = 'SETTINGS/PRO/FORM/PDF_ATTACH '; +export const PRO_FORM_PDF_LINK = 'SETTINGS/PRO/FORM/PDF__LINK'; + +const enableOption = optionFactory( + true, + 'Enable' +); + +const disableOption = optionFactory( + false, + 'Disable' +); + +const enableDiable = [enableOption,disableOption] +export default [ + { + id: PRO_FORM_SEND_LOCAL, + label: 'Disable enhanced delivery for this form', + type: 'checkbox', + path: 'pro.send_local', + options: [enableDiable] + }, + { + id: PRO_FORM_EMAIL_LAYOUT, + label: 'Email Layout', + type: 'dropdown', + path: 'pro.layout', + options: [] + }, + { + id: PRO_FORM_PDF_LAYOUT, + label: 'PDF Layout', + type: 'dropdown', + path: 'pro.pdf_layout', + }, + { + id: PRO_FORM_PDF_ATATCH, + label: 'Attach PDF To Main Mailer', + type: 'checkbox', + path: 'pro.attach_pdf', + options: [enableDiable] + }, + { + id: PRO_FORM_PDF_LINK, + label: 'Add PDF Link', + type: 'checkbox', + path: 'pro.pdf_link', + options: [enableDiable] + }, +] \ No newline at end of file diff --git a/clients/components/ProSettings/ProFreeTrial/ProFreeTrial.js b/clients/components/ProSettings/ProFreeTrial/ProFreeTrial.js new file mode 100644 index 000000000..14083516a --- /dev/null +++ b/clients/components/ProSettings/ProFreeTrial/ProFreeTrial.js @@ -0,0 +1,56 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import classNames from 'classnames'; +import {Button} from '@wordpress/components'; + +/** + * Create the ProFreeTrial UI + * @param {Object} props + * @return {*} + * @constructor + */ +export const ProFreeTrial = (props) => { + const documentationHref = `https://calderaforms.com/doc/caldera-forms-pro-getting-started/?utm_source=wp-admin&utm_campaign=pro-screen&utm_term=not-connected`; + const trialHref = `https://calderaforms.com/checkout?edd_action=add_to_cart&download_id=64101&edd_options[price_id]=1?utm_source=wp-admin&utm_campaign=pro-screen&utm_term=not-connected`; + return( +
+

Ready to try Caldera Forms Pro? Plans start at just 14.99/ month with a 7 day free trial.

+ +
+ ) +}; + +/** + * Prop types for the ProFreeTrial component + * @type {{}} + */ +ProFreeTrial.propTypes = { + classNames: propTypes.string +}; + + +/** + * Class names used in ProFreeTrial component + * @type {{wrapper: string}} + */ +ProFreeTrial.classNames = { + wrapper: 'caldera-forms-pro-free-trial' +} \ No newline at end of file diff --git a/clients/components/ProSettings/ProFreeTrial/ProFreeTrial.test.js b/clients/components/ProSettings/ProFreeTrial/ProFreeTrial.test.js new file mode 100644 index 000000000..8d81247df --- /dev/null +++ b/clients/components/ProSettings/ProFreeTrial/ProFreeTrial.test.js @@ -0,0 +1,27 @@ +import renderer from 'react-test-renderer'; +import React from 'react'; +import { shallow } from 'enzyme/build'; +import Enzyme from 'enzyme/build'; +import Adapter from 'enzyme-adapter-react-16/build'; +import {ProFreeTrial} from "./ProFreeTrial"; + +Enzyme.configure({ adapter: new Adapter() }); + +describe( 'ProFreeTrial component', () => { + it( 'Matches snapshot with minimal props', () => { + expect( + renderer.create( + + ).toJSON() + ).toMatchSnapshot() + }); + + it( 'Is wrapped in the right class', () => { + expect( + shallow( + + ).find( '.' + ProFreeTrial.classNames.wrapper ) + .length + ).toEqual(1) + }); +}); \ No newline at end of file diff --git a/clients/components/ProSettings/ProFreeTrial/__snapshots__/ProFreeTrial.test.js.snap b/clients/components/ProSettings/ProFreeTrial/__snapshots__/ProFreeTrial.test.js.snap new file mode 100644 index 000000000..73898dcd5 --- /dev/null +++ b/clients/components/ProSettings/ProFreeTrial/__snapshots__/ProFreeTrial.test.js.snap @@ -0,0 +1,29 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ProFreeTrial component Matches snapshot with minimal props 1`] = ` +
+

+ Ready to try Caldera Forms Pro? Plans start at just 14.99/ month with a 7 day free trial. +

+ +
+`; diff --git a/clients/components/ProSettings/ProWhatIs/ProWhatIs.js b/clients/components/ProSettings/ProWhatIs/ProWhatIs.js new file mode 100644 index 000000000..660e42ebc --- /dev/null +++ b/clients/components/ProSettings/ProWhatIs/ProWhatIs.js @@ -0,0 +1,56 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import classNames from 'classnames' +import {Twemoji} from 'react-emoji-render'; + +/** + * Create the ProWhatIs UI + * @param {Object} props + * @return {*} + * @constructor + */ +export const ProWhatIs = (props) => { + return( +
+

Caldera Forms Pro is an app + plugin that makes forms easy.

+

Benefits

+
    +
  • + + Enhanced Email Delivery +
  • +
  • + + Form To PDF +
  • +
  • + + Priority Support +
  • +
  • + + Add-ons Included in Yearly Plans +
  • +
+
+ ) +}; + +/** + * Prop types for the ProWhatIs component + * @type {{}} + */ +ProWhatIs.propTypes = { + classNames: propTypes.string +}; + + +/** + * Class names used in the ProWhatIs component + * @type {{wrapper: string}} + */ +ProWhatIs.classNames = { + wrapper: 'caldera-forms-pro-what-is' +} \ No newline at end of file diff --git a/clients/components/ProSettings/ProWhatIs/ProWhatIs.test.js b/clients/components/ProSettings/ProWhatIs/ProWhatIs.test.js new file mode 100644 index 000000000..00bcc75cd --- /dev/null +++ b/clients/components/ProSettings/ProWhatIs/ProWhatIs.test.js @@ -0,0 +1,27 @@ +import renderer from 'react-test-renderer'; +import React from 'react'; +import { shallow } from 'enzyme/build'; +import Enzyme from 'enzyme/build'; +import Adapter from 'enzyme-adapter-react-16/build'; +import {ProWhatIs} from "./ProWhatIs"; + +Enzyme.configure({ adapter: new Adapter() }); + +describe( 'ProWhatIs component', () => { + it( 'Matches snapshot with minimal props', () => { + expect( + renderer.create( + + ).toJSON() + ).toMatchSnapshot() + }); + + it( 'Is wrapped in the right class', () => { + expect( + shallow( + + ).find( '.' + ProWhatIs.classNames.wrapper ) + .length + ).toEqual(1) + }); +}); \ No newline at end of file diff --git a/clients/components/ProSettings/ProWhatIs/__snapshots__/ProWhatIs.test.js.snap b/clients/components/ProSettings/ProWhatIs/__snapshots__/ProWhatIs.test.js.snap new file mode 100644 index 000000000..e12a2b589 --- /dev/null +++ b/clients/components/ProSettings/ProWhatIs/__snapshots__/ProWhatIs.test.js.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ProWhatIs component Matches snapshot with minimal props 1`] = ` +
+

+ Caldera Forms Pro is an app + plugin that makes forms easy. +

+

+ Benefits +

+
    +
  • + Enhanced Email Delivery +
  • +
  • + Form To PDF +
  • +
  • + Priority Support +
  • +
  • + Add-ons Included in Yearly Plans +
  • +
+
+`; diff --git a/clients/components/ProSettings/index.js b/clients/components/ProSettings/index.js new file mode 100644 index 000000000..11768838a --- /dev/null +++ b/clients/components/ProSettings/index.js @@ -0,0 +1,11 @@ +import {ProWhatIs} from "./ProWhatIs/ProWhatIs"; +import {ProEnterApp} from "./ProEnterApp/ProEnterApp"; +import {ProFreeTrial} from "./ProFreeTrial/ProFreeTrial"; +//import {ProFormSettings} from "./ProFormSettings/ProFormSettings"; + +export { + //ProFormSettings, + ProFreeTrial, + ProEnterApp, + ProWhatIs +} \ No newline at end of file diff --git a/clients/components/functions/url.js b/clients/components/functions/url.js index 2c50b989e..879fb287a 100755 --- a/clients/components/functions/url.js +++ b/clients/components/functions/url.js @@ -11,7 +11,7 @@ const url =function (lastParams = {},link) { return link; } let query = { - utm_source: 'cf-admin-search' + utm_source:lastParams.source ? lastParams.source : 'cf-admin-search' }; if( lastParams.categories){