diff --git a/package-lock.json b/package-lock.json index 1843293..0c6b747 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "givewp-addon-boilerplate", "dependencies": { "@givewp/form-builder-library": "^1.3.0", "@wordpress/api-fetch": "^6.26.0", diff --git a/src/FormExtension/FormBuilder/ViewModels/GiveAddonViewModel.php b/src/FormExtension/FormBuilder/ViewModels/GiveAddonViewModel.php index 679063a..630a62c 100644 --- a/src/FormExtension/FormBuilder/ViewModels/GiveAddonViewModel.php +++ b/src/FormExtension/FormBuilder/ViewModels/GiveAddonViewModel.php @@ -34,15 +34,15 @@ public function exports(): array ]; $sampleTags = [ - ['tag' => 'sitename', 'desc' => __('Site Name', 'give-addon-receipts')], - ['tag' => 'today', 'desc' => __('Date of Receipt Generation', 'give-addon-receipts')], - ['tag' => 'date', 'desc' => __('Receipt Date', 'give-addon-receipts')], + ['tag' => 'sitename', 'desc' => __('Site Name', 'ADDON_TEXTDOMAIN-receipts')], + ['tag' => 'today', 'desc' => __('Date of Receipt Generation', 'ADDON_TEXTDOMAIN-receipts')], + ['tag' => 'date', 'desc' => __('Receipt Date', 'ADDON_TEXTDOMAIN-receipts')], ]; return [ 'colors' => $colorsArray, - 'colorSettingsUrl' => esc_url_raw(admin_url('edit.php?post_type=give_forms&page=give-addon-color-settings')), - 'globalOptionsUrl' => esc_url_raw(admin_url('edit.php?post_type=give_forms&page=give-settings&tab=give-addon-global-settings')), + 'colorSettingsUrl' => esc_url_raw(admin_url('edit.php?post_type=give_forms&page=ADDON_TEXTDOMAIN-color-settings')), + 'globalOptionsUrl' => esc_url_raw(admin_url('edit.php?post_type=give_forms&page=give-settings&tab=ADDON_TEXTDOMAIN-global-settings')), 'sampleTags' => $sampleTags, 'previewUrl' => esc_url_raw(admin_url('edit.php?post_type=give_forms&page=givewp-form-builder')) ]; diff --git a/src/FormExtension/FormBuilder/resources/css/styles/_components.scss b/src/FormExtension/FormBuilder/resources/css/styles/_components.scss index 44d259d..09174ce 100644 --- a/src/FormExtension/FormBuilder/resources/css/styles/_components.scss +++ b/src/FormExtension/FormBuilder/resources/css/styles/_components.scss @@ -1,4 +1,4 @@ -.give-addon-settings__logo_upload__wrapper { +.ADDON_TEXTDOMAIN-settings__logo_upload__wrapper { display: flex; gap: 0.25rem; @@ -16,7 +16,7 @@ } } -.give-addon-settings-template-tags { +.ADDON_TEXTDOMAIN-settings-template-tags { max-height: 25rem; overflow-y: scroll; border: 1px solid var(--givewp-grey-100); diff --git a/src/FormExtension/FormBuilder/resources/js/components/CopyToClipboardButton.tsx b/src/FormExtension/FormBuilder/resources/js/components/CopyToClipboardButton.tsx index 8be2e86..ec10af1 100644 --- a/src/FormExtension/FormBuilder/resources/js/components/CopyToClipboardButton.tsx +++ b/src/FormExtension/FormBuilder/resources/js/components/CopyToClipboardButton.tsx @@ -26,7 +26,7 @@ const CopyToClipboardButton = ({textToCopy}: CopyClipboardButtonProps) => { ref={ref as Ref} icon={copyIcon} > - {isCopied ? __('Copied!', 'give-addon-receipts') : __('Copy Tag', 'give-addon-receipts')} + {isCopied ? __('Copied!', 'ADDON_TEXTDOMAIN-receipts') : __('Copy Tag', 'ADDON_TEXTDOMAIN-receipts')} ); }; diff --git a/src/FormExtension/FormBuilder/resources/js/components/ImageUpload.tsx b/src/FormExtension/FormBuilder/resources/js/components/ImageUpload.tsx index c612f0d..d7d2ba0 100644 --- a/src/FormExtension/FormBuilder/resources/js/components/ImageUpload.tsx +++ b/src/FormExtension/FormBuilder/resources/js/components/ImageUpload.tsx @@ -26,9 +26,9 @@ export default ({value, onChange}) => { } frame = window.wp.media({ - title: __('Add or upload file', 'give-addon-receipts'), + title: __('Add or upload file', 'ADDON_TEXTDOMAIN-receipts'), button: { - text: __('Use this media', 'give-addon-receipts'), + text: __('Use this media', 'ADDON_TEXTDOMAIN-receipts'), }, multiple: false, // Set to true to allow multiple files to be selected }); @@ -45,14 +45,14 @@ export default ({value, onChange}) => { }; return ( -
+
diff --git a/src/FormExtension/FormBuilder/resources/js/index.tsx b/src/FormExtension/FormBuilder/resources/js/index.tsx index e84da84..da16b98 100644 --- a/src/FormExtension/FormBuilder/resources/js/index.tsx +++ b/src/FormExtension/FormBuilder/resources/js/index.tsx @@ -22,10 +22,10 @@ const addGiveAddonSettings = (settings) => { ...settings, { name: __('Give Addon Settings Sample', 'ADDON_TEXTDOMAIN'), - path: 'give-addon-settings', + path: 'ADDON_TEXTDOMAIN-settings', element: GiveAddonSettings, }, ]; }; -wp.hooks.addFilter('givewp_form_builder_settings_additional_routes', 'give-addon-settings', addGiveAddonSettings); +wp.hooks.addFilter('givewp_form_builder_settings_additional_routes', 'ADDON_TEXTDOMAIN-settings', addGiveAddonSettings); diff --git a/src/FormExtension/FormBuilder/resources/js/settings/CustomSettings/index.tsx b/src/FormExtension/FormBuilder/resources/js/settings/CustomSettings/index.tsx index d87c70c..b328010 100644 --- a/src/FormExtension/FormBuilder/resources/js/settings/CustomSettings/index.tsx +++ b/src/FormExtension/FormBuilder/resources/js/settings/CustomSettings/index.tsx @@ -62,7 +62,7 @@ const CustomSettings = ({addonSettings, updateAddonSettings}: customSettingsProp > - + updateAddonSettings('imageSelectorOptionSample', value)} @@ -167,7 +167,7 @@ const CustomSettings = ({addonSettings, updateAddonSettings}: customSettingsProp description={__('Description Sample Tags.', 'ADDON_TEXTDOMAIN')} > -
    +
      {sampleTags.map((tag) => (
    • {'{' + tag.tag + '}'} @@ -180,7 +180,7 @@ const CustomSettings = ({addonSettings, updateAddonSettings}: customSettingsProp